libharu: Fix library name and header version.
This commit is contained in:
committed by
مهدي شينون (Mehdi Chinoune)
parent
87335a9830
commit
4182868e22
@@ -27,7 +27,7 @@
|
||||
|
||||
install(
|
||||
- TARGETS
|
||||
+ TARGETS haru
|
||||
+ TARGETS hpdf
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
|
||||
26
mingw-w64-libharu/002-rename-haru-to-hpdf.patch
Normal file
26
mingw-w64-libharu/002-rename-haru-to-hpdf.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -72,19 +72,19 @@
|
||||
# =======================================================================
|
||||
# create haru library
|
||||
# =======================================================================
|
||||
-add_library(haru ${LIBHPDF_SRCS})
|
||||
+add_library(hpdf ${LIBHPDF_SRCS})
|
||||
if (PNG_FOUND)
|
||||
include_directories (${PNG_INCLUDE_DIRS})
|
||||
- target_link_libraries (haru ${PNG_LIBRARIES})
|
||||
+ target_link_libraries (hpdf ${PNG_LIBRARIES})
|
||||
endif()
|
||||
if (ZLIB_FOUND)
|
||||
include_directories (${ZLIB_INCLUDE_DIRS})
|
||||
- target_link_libraries (haru ${ZLIB_LIBRARIES})
|
||||
+ target_link_libraries (hpdf ${ZLIB_LIBRARIES})
|
||||
endif()
|
||||
|
||||
# Math library
|
||||
if(UNIX AND NOT APPLE)
|
||||
- target_link_libraries (haru ${M_LIB})
|
||||
+ target_link_libraries (hpdf ${M_LIB})
|
||||
endif()
|
||||
|
||||
install(
|
||||
11
mingw-w64-libharu/003-fix-header-version.patch
Normal file
11
mingw-w64-libharu/003-fix-header-version.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/include/hpdf_version.h
|
||||
+++ b/include/hpdf_version.h
|
||||
@@ -3,6 +3,6 @@
|
||||
#define HPDF_MAJOR_VERSION 2
|
||||
#define HPDF_MINOR_VERSION 4
|
||||
#define HPDF_BUGFIX_VERSION 0
|
||||
-#define HPDF_EXTRA_VERSION "dev"
|
||||
-#define HPDF_VERSION_TEXT "2.4.0dev"
|
||||
+#define HPDF_EXTRA_VERSION ""
|
||||
+#define HPDF_VERSION_TEXT "2.4.0"
|
||||
#define HPDF_VERSION_ID 20400
|
||||
10
mingw-w64-libharu/004-add-compile-definitions.patch
Normal file
10
mingw-w64-libharu/004-add-compile-definitions.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -3,6 +3,7 @@
|
||||
# create haru library
|
||||
# =======================================================================
|
||||
add_library(hpdf ${LIBHPDF_SRCS})
|
||||
+target_compile_definitions(hpdf PRIVATE HPDF_DLL_MAKE INTERFACE HPDF_DLL)
|
||||
if (PNG_FOUND)
|
||||
include_directories (${PNG_INCLUDE_DIRS})
|
||||
target_link_libraries (hpdf ${PNG_LIBRARIES})
|
||||
@@ -4,7 +4,7 @@ _realname=libharu
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=2.4.0
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="C library for generating PDF documents (mingw-w64)"
|
||||
url="https://github.com/libharu/libharu"
|
||||
arch=('any')
|
||||
@@ -15,13 +15,32 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
||||
"${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
"${MINGW_PACKAGE_PREFIX}-ninja")
|
||||
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/libharu/libharu/archive/v${pkgver}.tar.gz"
|
||||
001-fix-installation-destination.patch)
|
||||
001-fix-installation-destination.patch
|
||||
002-rename-haru-to-hpdf.patch
|
||||
003-fix-header-version.patch
|
||||
004-add-compile-definitions.patch)
|
||||
sha256sums=('d1c38c0492257c61fb60c85238d500c05184fd8e9e68fecba9cf304ff2d8726d'
|
||||
'06744157a002a7f024a048ba18eec041379ae918cd8596a3cc1764e5b7f08640')
|
||||
'b9dbd3ddfbf24eb1bc6d8a009b5dfcc6ab4344d20019f7d18f9bd6954c1feccd'
|
||||
'bcf2801ca0ce0b8f0236cc072730cb564fc62bf7627690d5ef0bfd61316a7f08'
|
||||
'bb1bfff1eca0b97f4feefd6b928b93fba0ac88ca54b5ec1f7fd064d92319bea4'
|
||||
'89bebe5ce1ecad776ba4442e8c9f19c867fcee5ff656df589236cafe3a0414ca')
|
||||
|
||||
# Helper macros to help make tasks easier #
|
||||
apply_patch_with_msg() {
|
||||
for _patch in "$@"
|
||||
do
|
||||
msg2 "Applying ${_patch}"
|
||||
patch -Nbp1 -i "${srcdir}/${_patch}"
|
||||
done
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
patch -p1 -i "${srcdir}"/001-fix-installation-destination.patch
|
||||
apply_patch_with_msg \
|
||||
001-fix-installation-destination.patch \
|
||||
002-rename-haru-to-hpdf.patch \
|
||||
003-fix-header-version.patch \
|
||||
004-add-compile-definitions.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
Reference in New Issue
Block a user