[arch-commits] Commit in jxrlib/trunk (CMakeLists.txt PKGBUILD)
Filipe Laíns
ffy00 at archlinux.org
Mon Aug 20 12:23:58 UTC 2018
Date: Monday, August 20, 2018 @ 12:23:58
Author: ffy00
Revision: 372870
fix java library (well, almost)
Modified:
jxrlib/trunk/CMakeLists.txt
jxrlib/trunk/PKGBUILD
----------------+
CMakeLists.txt | 30 ++++++++++++++++++++++++++++--
PKGBUILD | 52 +++++++++++++++++++++++++++++++++++++---------------
2 files changed, 65 insertions(+), 17 deletions(-)
Modified: CMakeLists.txt
===================================================================
--- CMakeLists.txt 2018-08-20 09:32:26 UTC (rev 372869)
+++ CMakeLists.txt 2018-08-20 12:23:58 UTC (rev 372870)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8)
-project(jxrlib C)
+project(jxrlib C CXX)
set(JXRLIB_MAJOR 0)
set(JXRLIB_MINOR 0)
@@ -7,6 +7,16 @@
set(JXRLIB_LIB_VERSION ${JXRLIB_MAJOR}.${JXRLIB_MINOR}.0)
set(JXRLIB_SO_VERSION ${JXRLIB_MAJOR})
+#find_package(JNI)
+#if (JNI_FOUND)
+# message (STATUS "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}")
+# message (STATUS "JNI_LIBRARIES=${JNI_LIBRARIES}")
+# message (STATUS "JAVA_INCLUDE_PATH=${JAVA_INCLUDE_PATH}")
+# message (STATUS "JAVA_INCLUDE_PATH2=${JAVA_INCLUDE_PATH2}")
+#endif()
+#INCLUDE_DIRECTORIES(${JAVA_INCLUDE_PATH})
+#INCLUDE_DIRECTORIES(${JAVA_INCLUDE_PATH2})
+
include(TestBigEndian)
test_big_endian(ISBIGENDIAN)
if(ISBIGENDIAN)
@@ -35,7 +45,7 @@
ARCHIVE DESTINATION lib${LIB_SUFFIX}
)
-# JXR-GLUE Library
+# JXR-GLUE Library
file(GLOB jxrglue_SRC jxrgluelib/*.c jxrtestlib/*.c)
file(GLOB jxrglue_HDR jxrgluelib/*.h jxrtestlib/*.h)
@@ -49,6 +59,20 @@
ARCHIVE DESTINATION lib${LIB_SUFFIX}
)
+# JXR-JAVA Library
+#file(GLOB jxrjava_SRC java/target/swig/JXR_wrap.cxx cpp/lib/*.cpp)
+#file(GLOB jxrjava_SRC cpp/lib/*.hpp)
+
+#add_library(jxrjava SHARED ${jxrjava_SRC} ${jxrjava_HDR})
+#set_target_properties(jxrjava PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION})
+#target_link_libraries(jxrjava jpegxr m)
+
+#install(TARGETS jxrjava
+# 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)
@@ -66,3 +90,5 @@
install(DIRECTORY common/include/ DESTINATION include/jxrlib
FILES_MATCHING PATTERN "*.h"
)
+
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-08-20 09:32:26 UTC (rev 372869)
+++ PKGBUILD 2018-08-20 12:23:58 UTC (rev 372870)
@@ -1,31 +1,53 @@
-# Maintainer:
+# $Id$
+# Maintainer: Filipe Laíns (FFY00) <lains at archlinux.org>
+# Contributor: Antonio Rojas <arojas at archlinux.org>
pkgname=jxrlib
pkgver=0.2.1
pkgrel=1
pkgdesc="Open source implementation of jpegxr"
-arch=(x86_64)
+arch=('x86_64')
url="https://archive.codeplex.com/?p=jxrlib"
-license=(GPL)
-depends=(glibc)
-makedepends=(cmake)
-source=($pkgname-$pkgver.tar.gz::https://github.com/glencoesoftware/jxrlib/archive/v$pkgver.tar.gz
- CMakeLists.txt)
-sha256sums=('5ae964ae61f301f38a62b8e18eb8d2eee27eaf2b942477b033435ebf38fa4a19'
- '8d6d49f6288b4e7f425aff7b5e33d2dc89b6ae85fd6805ae5a103f50bb28e746')
+license=('GPL')
+depends=('glibc' 'java-runtime')
+makedepends=('cmake' 'swig' 'maven' 'java-environment')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/glencoesoftware/jxrlib/archive/v$pkgver.tar.gz"
+ 'CMakeLists.txt')
+sha512sums=('bcf69c9bec32829c266e60540fdc2e8d16d9bf7e0d3930327db5bfce6d1fc2c8b67c7a2b236d128ff3ce89b1c2a14b27a69cdf5bda365c4fcaac98d76b8bd406'
+ '832557a5aa0825132aefe38f5136159f1d2ac46bf8455745877342e08db5752c73c34f16a7edf3fd5fa8813f1c48a1b5d77d91901301e2322f18b520bbe97ae6')
prepare() {
- cp CMakeLists.txt $pkgname-$pkgver
- mkdir -p build
+ cp CMakeLists.txt $pkgname-$pkgver/
}
build() {
- cd build
- cmake ../$pkgname-$pkgver \
- -DCMAKE_INSTALL_PREFIX=/usr
+ # Generate jni files
+ cd $pkgname-$pkgver/java
+
+ mkdir -p target/swig/ome/jxrlib
+ swig -java -c++ -package ome.jxrlib -outdir target/swig/ome/jxrlib -o target/swig/JXR_wrap.cxx JXR.i
+
+ # Build source
+ mkdir -p ../build
+ cd ../build
+
+ cmake .. \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release
+
+ make
+
+ # Compile java library
+ cd ../java
+ mvn install -DskipTests
}
package() {
- cd build
+ cd $pkgname-$pkgver/build
+
make DESTDIR="$pkgdir" install
+
+ cd ../java/target
+
+ install -Dm 644 $pkgname-$pkgver.jar "$pkgdir"/usr/share/java/$pkgname-$pkgver.jar
}
More information about the arch-commits
mailing list