[arch-commits] Commit in jxrlib/trunk (CMakeLists.txt PKGBUILD)
Antonio Rojas
arojas at archlinux.org
Wed Jun 13 20:42:56 UTC 2018
Date: Wednesday, June 13, 2018 @ 20:42:56
Author: arojas
Revision: 342941
Use Fedora's CMakeLists.txt to fix messed up build system (FS#59003)
Added:
jxrlib/trunk/CMakeLists.txt
Modified:
jxrlib/trunk/PKGBUILD
----------------+
CMakeLists.txt | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
PKGBUILD | 25 ++++++++++----------
2 files changed, 81 insertions(+), 12 deletions(-)
Added: CMakeLists.txt
===================================================================
--- CMakeLists.txt (rev 0)
+++ CMakeLists.txt 2018-06-13 20:42:56 UTC (rev 342941)
@@ -0,0 +1,68 @@
+cmake_minimum_required(VERSION 2.8)
+project(jxrlib C)
+
+set(JXRLIB_MAJOR 0)
+set(JXRLIB_MINOR 0)
+
+set(JXRLIB_LIB_VERSION ${JXRLIB_MAJOR}.${JXRLIB_MINOR}.0)
+set(JXRLIB_SO_VERSION ${JXRLIB_MAJOR})
+
+include(TestBigEndian)
+test_big_endian(ISBIGENDIAN)
+if(ISBIGENDIAN)
+ set(DEF_ENDIAN -D_BIG__ENDIAN_)
+endif()
+
+add_definitions(-D__ANSI__ -DDISABLE_PERF_MEASUREMENT ${DEF_ENDIAN})
+
+include_directories(
+ common/include
+ image/sys
+ jxrgluelib
+ jxrtestlib
+)
+
+# JXR Library
+file(GLOB jpegxr_SRC image/sys/*.c image/decode/*.c image/encode/*.c)
+file(GLOB jpegxr_HDR image/sys/*.h image/decode/*.h image/encode/*.h)
+
+add_library(jpegxr SHARED ${jpegxr_SRC} ${jpegxr_HDR})
+set_target_properties(jpegxr PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION})
+
+install(TARGETS jpegxr
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib${LIB_SUFFIX}
+ ARCHIVE DESTINATION lib${LIB_SUFFIX}
+)
+
+# JXR-GLUE Library
+file(GLOB jxrglue_SRC jxrgluelib/*.c jxrtestlib/*.c)
+file(GLOB jxrglue_HDR jxrgluelib/*.h jxrtestlib/*.h)
+
+add_library(jxrglue SHARED ${jxrglue_SRC} ${jxrglue_HDR})
+set_target_properties(jxrglue PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION})
+target_link_libraries(jxrglue jpegxr m)
+
+install(TARGETS jxrglue
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib${LIB_SUFFIX}
+ ARCHIVE DESTINATION lib${LIB_SUFFIX}
+)
+
+# JxrEncApp Executable
+add_executable(JxrEncApp jxrencoderdecoder/JxrEncApp.c)
+target_link_libraries(JxrEncApp jxrglue)
+install(TARGETS JxrEncApp RUNTIME DESTINATION bin)
+
+# JxrDecApp Executable
+add_executable(JxrDecApp jxrencoderdecoder/JxrDecApp.c)
+target_link_libraries(JxrDecApp jxrglue)
+install(TARGETS JxrDecApp RUNTIME DESTINATION bin)
+
+# Headers
+install(FILES jxrgluelib/JXRGlue.h jxrgluelib/JXRMeta.h jxrtestlib/JXRTest.h image/sys/windowsmediaphoto.h
+ DESTINATION include/jxrlib
+)
+install(DIRECTORY common/include/ DESTINATION include/jxrlib
+ FILES_MATCHING PATTERN "*.h"
+)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-06-13 20:17:46 UTC (rev 342940)
+++ PKGBUILD 2018-06-13 20:42:56 UTC (rev 342941)
@@ -2,29 +2,30 @@
pkgname=jxrlib
pkgver=0.2.0
-pkgrel=1
+pkgrel=2
pkgdesc="Open source implementation of jpegxr"
arch=(x86_64)
url="https://archive.codeplex.com/?p=jxrlib"
license=(GPL)
depends=(glibc)
-makedepends=(swig java-environment python)
-source=($pkgname-$pkgver.tar.gz::https://github.com/glencoesoftware/jxrlib/archive/v$pkgver.tar.gz)
-md5sums=('cc8ead8dc4238fac11d08310c31fd5b2')
+makedepends=(cmake)
+source=($pkgname-$pkgver.tar.gz::https://github.com/glencoesoftware/jxrlib/archive/v$pkgver.tar.gz
+ CMakeLists.txt)
+sha256sums=('5bc79bd563b22149bd9bdb9f4b42c1ced10c94f90c782cac9712f270cbbf10ef'
+ '8d6d49f6288b4e7f425aff7b5e33d2dc89b6ae85fd6805ae5a103f50bb28e746')
prepare() {
- cd $pkgname-$pkgver
- sed -e 's|install: all|install:|' -i Makefile # Don't build again on make install
+ cp CMakeLists.txt $pkgname-$pkgver
+ mkdir -p build
}
build() {
- cd $pkgname-$pkgver
- make SHARED=1 PREFIX=/usr JAVA_INCLUDE=/usr/lib/jvm/default/include swig all
+ cd build
+ cmake ../$pkgname-$pkgver \
+ -DCMAKE_INSTALL_PREFIX=/usr
}
package() {
- cd $pkgname-$pkgver
- make SHARED=1 DIR_INSTALL="$pkgdir/usr" install
- mv "$pkgdir"/usr/include/libjxr/*/{*.h,*/*.h} "$pkgdir"/usr/include/libjxr/
- rm -r "$pkgdir"/usr/include/libjxr/{image,glue,test,common}
+ cd build
+ make DESTDIR="$pkgdir" install
}
More information about the arch-commits
mailing list