pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/comms/java-rxtx Fix the build under MacOS X



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b332d144ccad
branches:  trunk
changeset: 458341:b332d144ccad
user:      dsainty <dsainty%pkgsrc.org@localhost>
date:      Mon Sep 13 11:37:34 2021 +0000

description:
Fix the build under MacOS X

diffstat:

 comms/java-rxtx/Makefile                   |   9 ++++++-
 comms/java-rxtx/PLIST                      |   4 +-
 comms/java-rxtx/distinfo                   |   4 +-
 comms/java-rxtx/patches/patch-configure_in |  38 +++++++++++++++++++++++------
 4 files changed, 42 insertions(+), 13 deletions(-)

diffs (142 lines):

diff -r b864f92bcce6 -r b332d144ccad comms/java-rxtx/Makefile
--- a/comms/java-rxtx/Makefile  Mon Sep 13 11:24:02 2021 +0000
+++ b/comms/java-rxtx/Makefile  Mon Sep 13 11:37:34 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2020/05/17 00:54:00 tnn Exp $
+# $NetBSD: Makefile,v 1.13 2021/09/13 11:37:34 dsainty Exp $
 #
 
 DISTNAME=      rxtx-2.1-7r2
@@ -27,6 +27,12 @@
 
 .include "../../mk/bsd.prefs.mk"
 
+.if ${OPSYS} == "Darwin"
+JNILIB=        jnilib
+.else
+JNILIB=        la
+.endif
+
 .if ${MACHINE_ARCH} == "x86_64"
 JAVA_MACHINE_ARCH=     amd64
 .elif !empty(MACHINE_CPU:Marm*)
@@ -55,6 +61,7 @@
 
 PLIST_SUBST+=  JAVA_MACHINE_ARCH=${JAVA_MACHINE_ARCH:Q}
 PLIST_SUBST+=  JAVA_HOME="${JAVA_INSTALL_BASE:C/^${PREFIX}\///}"
+PLIST_SUBST+=  JNILIB=${JNILIB}
 
 pre-configure:
        set -e; cd ${WRKSRC}; \
diff -r b864f92bcce6 -r b332d144ccad comms/java-rxtx/PLIST
--- a/comms/java-rxtx/PLIST     Mon Sep 13 11:24:02 2021 +0000
+++ b/comms/java-rxtx/PLIST     Mon Sep 13 11:37:34 2021 +0000
@@ -1,3 +1,3 @@
-@comment $NetBSD: PLIST,v 1.4 2013/03/29 12:40:24 dsainty Exp $
+@comment $NetBSD: PLIST,v 1.5 2021/09/13 11:37:34 dsainty Exp $
 ${JAVA_HOME}/jre/lib/ext/RXTXcomm.jar
-${JAVA_HOME}/jre/lib/${JAVA_MACHINE_ARCH}/librxtxSerial.la
+${JAVA_HOME}/jre/lib/${JAVA_MACHINE_ARCH}/librxtxSerial.${JNILIB}
diff -r b864f92bcce6 -r b332d144ccad comms/java-rxtx/distinfo
--- a/comms/java-rxtx/distinfo  Mon Sep 13 11:24:02 2021 +0000
+++ b/comms/java-rxtx/distinfo  Mon Sep 13 11:37:34 2021 +0000
@@ -1,11 +1,11 @@
-$NetBSD: distinfo,v 1.4 2015/11/03 01:34:54 agc Exp $
+$NetBSD: distinfo,v 1.5 2021/09/13 11:37:34 dsainty Exp $
 
 SHA1 (rxtx-2.1-7r2.zip) = 1d9ef2f80b23bc08b8fdeaa547ee78cb5f76e613
 RMD160 (rxtx-2.1-7r2.zip) = dc569a654fbef58aa521013e170c0200b8b3668f
 SHA512 (rxtx-2.1-7r2.zip) = 977f098da9e9618a2bc1d2265f1a59c8bdeb00a228378af0176e2f7fa408fb0dcb309a8168de0febc13fa0e04d9d54c76c267a61b815037b5881100c4025a1ce
 Size (rxtx-2.1-7r2.zip) = 1345757 bytes
 SHA1 (patch-Makefile_am) = a0f4bdf62bab3c21bfe062cd489b5f9b8941194c
-SHA1 (patch-configure_in) = 4cdfa8c7c870e1d03df1571071e898360496d970
+SHA1 (patch-configure_in) = b3dc1e2e2dd94d682798348a5a613a1923a1ff26
 SHA1 (patch-src_I2CImp_c) = 2d6bba8aa2f1460722dc69d17da091cb55f5c844
 SHA1 (patch-src_RS485Imp_c) = 6606b79c629556fd010e8d38ec3a0f88c2d8ecfd
 SHA1 (patch-src_RawImp_c) = eedc53a9f30e77a8a5437003177e9b20adf64f28
diff -r b864f92bcce6 -r b332d144ccad comms/java-rxtx/patches/patch-configure_in
--- a/comms/java-rxtx/patches/patch-configure_in        Mon Sep 13 11:24:02 2021 +0000
+++ b/comms/java-rxtx/patches/patch-configure_in        Mon Sep 13 11:37:34 2021 +0000
@@ -1,7 +1,9 @@
-$NetBSD: patch-configure_in,v 1.3 2015/08/13 20:16:22 joerg Exp $
+$NetBSD: patch-configure_in,v 1.4 2021/09/13 11:37:34 dsainty Exp $
 
 AM_CONFIG_HEADER is obsolete.
 
+Mac OS X has a normal include directory if the JPATH is set appropriately.
+
 UTS_RELEASE isn't even reliably available on Linux, let alone portable.
 
 Recognise Java 1.6, and openjdk7 as 1.7.
@@ -10,8 +12,10 @@
 platforms.  Disable it for consistency, using a patch since
 --disable-PRINTER only works on Linux.
 
---- configure.in.orig  2006-01-30 04:37:47.000000000 +0000
-+++ configure.in
+Force use of Pkgsrc libtool, even on Mac OS X.
+ 
+--- configure.in.orig  2006-01-30 15:37:47.000000000 +1100
++++ configure.in       2017-04-24 19:53:54.000000000 +1000
 @@ -17,7 +17,7 @@
  #   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  #-------------------------------------------------------------------------
@@ -21,7 +25,24 @@
  AC_CANONICAL_SYSTEM
  AC_MSG_WARN(Trying libtool.  If the following fails install libtool)
  AC_PROG_CC
-@@ -458,12 +458,12 @@ fi
+@@ -409,15 +409,7 @@
+               echo "------------------------------------------------------" 1>&2
+       fi;
+ }
+-[ case $OS_NAME in
+-      Mac\ OS\ X)
+-        JAVAINCLUDEDIR=$JPATH/../../../Headers
+-        ;;
+-      *)
+-        JAVAINCLUDEDIR=$JPATH/include
+-        ;;
+-esac ]
+-
++JAVAINCLUDEDIR=$JPATH/include
+ JAVAINCLUDE="-I\$(JAVAINCLUDEDIR)"
+ if test "$CC" = "gcc" || test "$CC"="egcs"; then
+       case $JAVA_VENDOR in
+@@ -458,12 +450,12 @@
  [ case $OS_NAME in 
  Linux)
        LDFLAGS=$LDFLAGS" -lpthread"
@@ -36,7 +57,7 @@
                #fix_parameters $JPATH/jre/lib/javax.comm.properties
                CLASSPATH=".:\$(TOP):\$(TOP)/src:"`find $JPATH/ -name RXTXcomm.jar |head -n1`
                JHOME=$JPATH"/jre/lib/ext"
-@@ -527,13 +527,13 @@ Linux)
+@@ -527,13 +519,13 @@
  ;;
  
  *BSD)
@@ -52,7 +73,7 @@
                #fix_parameters $JPATH/jre/lib/javax.comm.properties
                CLASSPATH=".:\$(TOP):\$(TOP)/src:"`find $JPATH/ -name RXTXcomm.jar |head -n1`
                RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)"
-@@ -721,7 +721,7 @@ Solaris*)
+@@ -721,7 +713,7 @@
        CLASSPATH=".:\$(TOP):\$(TOP)/src:\$(JPATH)/lib/classes.zip:\$(JPATH)/lib/RXTXcomm.jar:$CLASSPATH"
  
        case $JAVA_VERSION in
@@ -61,11 +82,12 @@
                RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)"
        ;;
        1.1*)
-@@ -816,6 +816,8 @@ QNX)
+@@ -816,6 +808,9 @@
  ;;
  esac ]
  
-+TARGETLIB="\$(target_triplet)/librxtxSerial.la"
++TARGETLIB="\$(target_triplet)/librxtxSerial.\$(LIB_EXTENSION)"
++GLIBTOOL="\$(SHELL) \$(TOP)/libtool"
 +
  AC_OUTPUT(Makefile)
  



Home | Main Index | Thread Index | Old Index