Skip to content

Commit c756e7a

Browse files
committed
libraw: update to 0.22.0
1 parent 028bdad commit c756e7a

File tree

4 files changed

+56
-31
lines changed

4 files changed

+56
-31
lines changed
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
--- a/libraw.pc.in
22
+++ b/libraw.pc.in
3-
@@ -7,6 +7,6 @@
3+
@@ -7,6 +7,7 @@
44
Description: Raw image decoder library (non-thread-safe)
55
Requires: @PACKAGE_REQUIRES@
66
Version: @PACKAGE_VERSION@
77
-Libs: -L${libdir} -lraw -lstdc++@PC_OPENMP@
8-
+Libs: -L${libdir} -lraw @PC_OPENMP@
8+
+Libs: -L${libdir} -lraw@PC_OPENMP@
99
Libs.private: @PACKAGE_LIBS_PRIVATE@
1010
Cflags: -I${includedir}/libraw -I${includedir}
11+
+Cflags.private: -DLIBRAW_NODLL
1112
--- a/libraw_r.pc.in
1213
+++ b/libraw_r.pc.in
13-
@@ -7,6 +7,6 @@
14+
@@ -7,6 +7,7 @@
1415
Description: Raw image decoder library (thread-safe)
1516
Requires: @PACKAGE_REQUIRES@
1617
Version: @PACKAGE_VERSION@
1718
-Libs: -L${libdir} -lraw_r -lstdc++@PC_OPENMP@
18-
+Libs: -L${libdir} -lraw_r @PC_OPENMP@
19+
+Libs: -L${libdir} -lraw_r@PC_OPENMP@
1920
Libs.private: @PACKAGE_LIBS_PRIVATE@
2021
Cflags: -I${includedir}/libraw -I${includedir}
22+
+Cflags.private: -DLIBRAW_NODLL
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/libraw/libraw.h b/libraw/libraw.h
2+
index 50d4276d43..d4363fe01e 100644
3+
--- a/libraw/libraw.h
4+
+++ b/libraw/libraw.h
5+
@@ -55,8 +55,8 @@ it under the terms of the one of two licenses as you choose:
6+
# define LIBRAW_WIN32_CALLS
7+
# endif
8+
9+
-/* DLLs: Microsoft or Intel compiler */
10+
-# if defined(_MSC_VER) || defined(__INTEL_COMPILER)
11+
+/* DLLs: MinGW, Microsoft or Intel compiler */
12+
+# if defined(__GNUC__) || defined(_MSC_VER) || defined(__INTEL_COMPILER)
13+
# ifndef LIBRAW_WIN32_DLLDEFS
14+
# define LIBRAW_WIN32_DLLDEFS
15+
# endif

mingw-w64-libraw/LibRaw_obsolete-macros.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.

mingw-w64-libraw/PKGBUILD

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pkgname="${MINGW_PACKAGE_PREFIX}-libraw"
77
provides=("${MINGW_PACKAGE_PREFIX}-${_realname}")
88
replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}")
99
conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}")
10-
pkgver=0.21.5
10+
pkgver=0.22.0
1111
pkgrel=1
1212
pkgdesc="Library for reading RAW files obtained from digital photo cameras (mingw-w64)"
1313
arch=('any')
@@ -20,20 +20,19 @@ url="https://www.libraw.org/"
2020
license=("spdx:LGPL-2.1 OR CDDL-1.0")
2121
makedepends=("${MINGW_PACKAGE_PREFIX}-autotools" "${MINGW_PACKAGE_PREFIX}-cc")
2222
depends=("${MINGW_PACKAGE_PREFIX}-cc-libs"
23-
"${MINGW_PACKAGE_PREFIX}-jasper"
2423
"${MINGW_PACKAGE_PREFIX}-lcms2"
2524
"${MINGW_PACKAGE_PREFIX}-libjpeg"
26-
"${MINGW_PACKAGE_PREFIX}-zlib"
2725
"${MINGW_PACKAGE_PREFIX}-libwinpthread"
28-
"${MINGW_PACKAGE_PREFIX}-omp")
26+
"${MINGW_PACKAGE_PREFIX}-omp"
27+
"${MINGW_PACKAGE_PREFIX}-zlib")
2928
source=("https://www.libraw.org/data/${_realname}-${pkgver}.tar.gz"
3029
"0001-libraw-pkgconfig-remove-stdcxx.patch"
31-
"LibRaw_obsolete-macros.patch"
32-
"0002-libraw-datastream-utf8-api.patch")
33-
sha256sums=('20ecfa6aad943d383ab3f66d303727ef542b042cbba2bb7ddaeff0bb2e9ff916'
34-
'3b4c6aece23e020bf50a8bf349a25186273a601286fa2bb1f0a7269083277c13'
35-
'4a31c0ee066f43915beff6f7959b6b2cd246d390720df379bfc047d4cedb6a8f'
36-
'262c29b7e51d0916340b827fe1810ce1581b267886a98b4d6bccf720bd2789d3')
30+
"0002-libraw-datastream-utf8-api.patch"
31+
"0003-libraw-win32-dlldefs.patch")
32+
sha256sums=('1071e6e8011593c366ffdadc3d3513f57c90202d526e133174945ec1dd53f2a1'
33+
'f3b9cc8eb9e557ad6298cc05285c7f3a91b15ccbc65577f03505e0a38f62c8e8'
34+
'262c29b7e51d0916340b827fe1810ce1581b267886a98b4d6bccf720bd2789d3'
35+
'4222276a8d5c95ddd5e4c719a8d79e028e611b930dd4fbddeca3631a8624a995')
3736

3837
prepare() {
3938
cd "${srcdir}/${_realname}-${pkgver}"
@@ -43,12 +42,13 @@ prepare() {
4342
# https://github.com/LibRaw/LibRaw/issues/632
4443
patch -p1 -i "${srcdir}/0002-libraw-datastream-utf8-api.patch"
4544

45+
# https://github.com/LibRaw/LibRaw/issues/709
46+
patch -p1 -i "${srcdir}/0003-libraw-win32-dlldefs.patch"
47+
4648
autoreconf -ifv
4749
}
4850

4951
build() {
50-
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
51-
5252
if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]]; then
5353
LDFLAGS+=" -lomp"
5454
fi
@@ -58,17 +58,37 @@ build() {
5858
# https://github.com/LibRaw/LibRaw/blob/27144e42000/Changelog.txt#L417
5959
# CPPFLAGS+=" -DUSE_6BY9RPI -DUSE_X3FTOOLS"
6060

61-
CPPFLAGS+=" -DLIBRAW_FORCE_OPENMP"
61+
mkdir -p "${srcdir}/build-${MSYSTEM}-static" && cd "${srcdir}/build-${MSYSTEM}-static"
62+
63+
CPPFLAGS+=" -DLIBRAW_FORCE_OPENMP -DLIBRAW_NODLL"
6264
../${_realname}-${pkgver}/configure \
6365
--prefix=${MINGW_PREFIX} \
6466
--build=${MINGW_CHOST} \
65-
--host=${MINGW_CHOST}
67+
--host=${MINGW_CHOST} \
68+
--enable-shared=yes \
69+
--enable-static=yes
70+
71+
make
72+
73+
mkdir -p "${srcdir}/build-${MSYSTEM}-shared" && cd "${srcdir}/build-${MSYSTEM}-shared"
74+
75+
CPPFLAGS+=" -ULIBRAW_NODLL -DLIBRAW_BUILDLIB"
76+
../${_realname}-${pkgver}/configure \
77+
--prefix=${MINGW_PREFIX} \
78+
--build=${MINGW_CHOST} \
79+
--host=${MINGW_CHOST} \
80+
--enable-shared=yes \
81+
--enable-static=no
6682

6783
make
6884
}
6985

7086
package() {
71-
cd "${srcdir}/build-${MSYSTEM}"
87+
cd "${srcdir}/build-${MSYSTEM}-static"
88+
89+
make install DESTDIR="${pkgdir}"
90+
91+
cd "${srcdir}/build-${MSYSTEM}-shared"
7292

7393
make install DESTDIR="${pkgdir}"
7494

0 commit comments

Comments
 (0)