pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/databases/postgresql-pljava Import PL/Java 1.5.0 as da...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6bc47a234166
branches:  trunk
changeset: 370885:6bc47a234166
user:      fhajny <fhajny%pkgsrc.org@localhost>
date:      Fri Oct 27 09:51:03 2017 +0000

description:
Import PL/Java 1.5.0 as databases/postgresql-pljava.

PL/Java is a free add-on module that brings Java Stored Procedures,
Triggers, and Functions to the PostgreSQL backend.

diffstat:

 databases/postgresql-pljava/DESCR                                        |   2 +
 databases/postgresql-pljava/Makefile                                     |  78 +++++++++
 databases/postgresql-pljava/PLIST                                        |  11 +
 databases/postgresql-pljava/distinfo                                     |  11 +
 databases/postgresql-pljava/files/aol.netbsd.properties                  |  79 ++++++++++
 databases/postgresql-pljava/patches/patch-pljava-so_src_main_c_Backend.c |  15 +
 6 files changed, 196 insertions(+), 0 deletions(-)

diffs (220 lines):

diff -r 28b1b505315e -r 6bc47a234166 databases/postgresql-pljava/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql-pljava/DESCR Fri Oct 27 09:51:03 2017 +0000
@@ -0,0 +1,2 @@
+PL/Java is a free add-on module that brings Java Stored Procedures,
+Triggers, and Functions to the PostgreSQL backend.
diff -r 28b1b505315e -r 6bc47a234166 databases/postgresql-pljava/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql-pljava/Makefile      Fri Oct 27 09:51:03 2017 +0000
@@ -0,0 +1,78 @@
+# $NetBSD: Makefile,v 1.1 2017/10/27 09:51:03 fhajny Exp $
+
+DISTNAME=      pljava-1.5.0
+PKGNAME=       postgresql${PGSQL_VERSION}-${DISTNAME}
+CATEGORIES=    databases
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=tada/}
+
+GITHUB_PROJECT=                        pljava
+GITHUB_TAG=                    V${PKGVERSION_NOREV:S/./_/g}
+DISTFILES=                     ${DEFAULT_DISTFILES} ${DISTNAME}-deps.tar.gz
+SITES.${DISTNAME}-deps.tar.gz= ftp://ftp.NetBSD.org/pub/NetBSD/misc/fhajny/
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/tada/pljava/
+COMMENT=       Java Stored Procedures, Triggers, and Functions for PostgreSQL
+LICENSE=       modified-bsd
+
+DEPENDS+=      apache-maven-[0-9]*:../../devel/apache-maven
+DEPENDS+=      postgresql${PGSQL_VERSION}-server>=0:../../databases/postgresql${PGSQL_VERSION}-server
+
+PGSQL_VERSIONS_ACCEPTED=       95 94 93 92
+
+USE_JAVA2=     7
+USE_LANGUAGES= c c++
+
+WRKSRC=                ${WRKDIR}/${DISTNAME:S/./_/g}
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/compiler.mk"
+.include "../../mk/java-vm.mk"
+
+.if !empty(PKG_JVM:Mopenjdk*)
+LIBJVM=        ${PKG_JAVA_HOME}/jre/lib/${MACHINE_ARCH:S/x86_64/amd64/:S/sparc64/sparcv9/:C/^e?arm.*$/arm/}/server/libjvm.${PG_LIB_EXT}
+.else
+LIBJVM=        ${PKG_JAVA_HOME}/lib/${MACHINE_ARCH:S/x86_64/amd64/:S/sparc64/sparcv9/:C/^e?arm.*$/arm/}/server/libjvm.${PG_LIB_EXT}
+.endif
+
+SUBST_CLASSES+=                sun
+SUBST_STAGE.sun=       pre-configure
+SUBST_FILES.sun=       pljava-so/aol.solaris-gcc.properties
+SUBST_MESSAGE.sun=     Fix SunOS build target
+SUBST_SED.sun=         -e 's,/usr/sfw/include,${PGSQL_PREFIX}/include -I${PKG_JAVA_HOME}/include,'
+
+SUBST_CLASSES+=                jvm
+SUBST_MESSAGE.jvm=     Setting default libjvm path
+SUBST_STAGE.jvm=       pre-configure
+SUBST_FILES.jvm=       pljava-so/src/main/c/Backend.c
+SUBST_VARS.jvm=                LIBJVM
+
+MAVEN_FLAGS+=  --offline
+MAVEN_FLAGS+=  -Plinkpglibs
+MAVEN_FLAGS+=  -Pwnosign
+MAVEN_FLAGS+=  -Duser.home=${FAKEHOMEDIR}
+MAVEN_FLAGS+=  -Dmaven.repo.local=${WRKDIR}/deps
+MAVEN_FLAGS+=  -Dnar.cores=${MAKE_JOBS:U1}
+MAVEN_FLAGS+=  -Dpgsql.runpath=${PGSQL_PREFIX}/lib
+MAVEN_FLAGS+=  -Dpgsql.runpathpfx=${COMPILER_RPATH_FLAG}
+.if ${OPSYS} == "SunOS" && !empty(CC_VERSION:Mgcc*)
+MAVEN_FLAGS+=  -Dnar.aolProperties=pljava-so/aol.solaris-gcc.properties
+.elif ${OPSYS} == "NetBSD"
+MAVEN_FLAGS+=  -Dnar.aolProperties=pljava-so/aol.netbsd.properties
+.endif
+
+INSTALL_FLAGS+=        -Dpgconfig.sharedir=${DESTDIR}${PREFIX}/share/postgresql
+INSTALL_FLAGS+=        -Dpgconfig.pkglibdir=${DESTDIR}${PREFIX}/lib/postgresql
+
+post-extract:
+       ${CP} ${PKGDIR}/files/aol.netbsd.properties ${WRKSRC}/pljava-so
+
+do-build:
+       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} mvn ${MAVEN_FLAGS} install
+
+do-install:
+       cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} java ${INSTALL_FLAGS} -jar \
+       pljava-packaging/target/pljava-pg${VER:!pg_config --version!:[2]:C/\.[0-9]+$//}-${MACHINE_ARCH:S/x86_64/amd64/}-${OPSYS}-gpp.jar
+
+.include "../../mk/pgsql.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 28b1b505315e -r 6bc47a234166 databases/postgresql-pljava/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql-pljava/PLIST Fri Oct 27 09:51:03 2017 +0000
@@ -0,0 +1,11 @@
+@comment $NetBSD: PLIST,v 1.1 2017/10/27 09:51:03 fhajny Exp $
+lib/postgresql/libpljava-so-1.5.0.so
+share/postgresql/extension/pljava.control
+share/postgresql/pljava/pljava--1.5.0-BETA1--1.5.0.sql
+share/postgresql/pljava/pljava--1.5.0-BETA2--1.5.0.sql
+share/postgresql/pljava/pljava--1.5.0-BETA3--1.5.0.sql
+share/postgresql/pljava/pljava--1.5.0.sql
+share/postgresql/pljava/pljava--unpackaged--1.5.0.sql
+share/postgresql/pljava/pljava-1.5.0.jar
+share/postgresql/pljava/pljava-api-1.5.0.jar
+share/postgresql/pljava/pljava-examples-1.5.0.jar
diff -r 28b1b505315e -r 6bc47a234166 databases/postgresql-pljava/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql-pljava/distinfo      Fri Oct 27 09:51:03 2017 +0000
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.1 2017/10/27 09:51:03 fhajny Exp $
+
+SHA1 (pljava-1.5.0-deps.tar.gz) = de3caaf37632ee9c5ecb0ec4517f791c641cf64a
+RMD160 (pljava-1.5.0-deps.tar.gz) = 42221976038127e59b8b6e1ae536d7be57eb9d19
+SHA512 (pljava-1.5.0-deps.tar.gz) = 6511a664282e21063d5c2ee9211eb564ad41e9c51136c25361acab3711a2d594e66bb0b2c0298f8d560d31739dc52d295f70e5684b9675937579f0b4200f9fb2
+Size (pljava-1.5.0-deps.tar.gz) = 74764782 bytes
+SHA1 (pljava-1.5.0.tar.gz) = fcd9898a43aa9b0d008c7500be10bca88234e506
+RMD160 (pljava-1.5.0.tar.gz) = 8127ede299d38dec7da11865927f63468c967d37
+SHA512 (pljava-1.5.0.tar.gz) = f676c12d4134fe95c10b7b5d7dd73ae7716c5fdb1278d91dfd769fd414af34667fd1af4fa4de90ea0c3fb10206e19fc3768f17da5339b2f6a7e7d55e7bb1499d
+Size (pljava-1.5.0.tar.gz) = 430744 bytes
+SHA1 (patch-pljava-so_src_main_c_Backend.c) = d81ab70a52de5049aa3e8d62256e64f4f720707c
diff -r 28b1b505315e -r 6bc47a234166 databases/postgresql-pljava/files/aol.netbsd.properties
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql-pljava/files/aol.netbsd.properties   Fri Oct 27 09:51:03 2017 +0000
@@ -0,0 +1,79 @@
+#
+# NetBSD
+#
+i386.NetBSD.linker=g++
+
+i386.NetBSD.gpp.cpp.compiler=g++
+i386.NetBSD.gpp.cpp.defines=NetBSD GNU_GCC
+i386.NetBSD.gpp.cpp.options=-Wall -Wno-long-long -Wpointer-arith -Wconversion -fPIC
+i386.NetBSD.gpp.cpp.includes=**/*.cc **/*.cpp **/*.cxx
+i386.NetBSD.gpp.cpp.excludes=
+
+i386.NetBSD.gpp.c.compiler=gcc
+i386.NetBSD.gpp.c.defines=NetBSD GNU_GCC
+i386.NetBSD.gpp.c.options=-Wall -Wno-long-long -Wpointer-arith -Wconversion -fPIC
+i386.NetBSD.gpp.c.includes=**/*.c
+i386.NetBSD.gpp.c.excludes=
+
+i386.NetBSD.gpp.fortran.compiler=gfortran
+i386.NetBSD.gpp.fortran.defines=NetBSD GNU_GCC
+i386.NetBSD.gpp.fortran.options=-Wall
+i386.NetBSD.gpp.fortran.includes=**/*.f **/*.for **/*.f90
+i386.NetBSD.gpp.fortran.excludes=
+
+i386.NetBSD.gpp.java.include=include;include/netbsd
+i386.NetBSD.gpp.java.runtimeDirectory=jre/lib/i386/server
+
+i386.NetBSD.gpp.lib.prefix=lib
+i386.NetBSD.gpp.shared.prefix=lib
+i386.NetBSD.gpp.static.extension=a
+i386.NetBSD.gpp.shared.extension=so
+i386.NetBSD.gpp.plugin.extension=so
+i386.NetBSD.gpp.jni.extension=so
+i386.NetBSD.gpp.executable.extension=
+
+# FIXME to be removed when NAR-6
+i386.NetBSD.gcc.static.extension=a
+i386.NetBSD.gcc.shared.extension=so*
+i386.NetBSD.gcc.plugin.extension=so
+i386.NetBSD.gcc.jni.extension=so
+
+#
+# NetBSD
+#
+amd64.NetBSD.linker=g++
+
+amd64.NetBSD.gpp.cpp.compiler=g++
+amd64.NetBSD.gpp.cpp.defines=NetBSD GNU_GCC
+amd64.NetBSD.gpp.cpp.options=-Wall -Wno-long-long -Wpointer-arith -Wconversion -fPIC
+amd64.NetBSD.gpp.cpp.includes=**/*.cc **/*.cpp **/*.cxx
+amd64.NetBSD.gpp.cpp.excludes=
+
+amd64.NetBSD.gpp.c.compiler=gcc
+amd64.NetBSD.gpp.c.defines=NetBSD GNU_GCC
+amd64.NetBSD.gpp.c.options=-Wall -Wno-long-long -Wpointer-arith -Wconversion -fPIC
+amd64.NetBSD.gpp.c.includes=**/*.c
+amd64.NetBSD.gpp.c.excludes=
+
+amd64.NetBSD.gpp.fortran.compiler=gfortran
+amd64.NetBSD.gpp.fortran.defines=NetBSD GNU_GCC
+amd64.NetBSD.gpp.fortran.options=-Wall
+amd64.NetBSD.gpp.fortran.includes=**/*.f **/*.for **/*.f90
+amd64.NetBSD.gpp.fortran.excludes=
+
+amd64.NetBSD.gpp.java.include=include;include/netbsd
+amd64.NetBSD.gpp.java.runtimeDirectory=jre/lib/amd64/server
+
+amd64.NetBSD.gpp.lib.prefix=lib
+amd64.NetBSD.gpp.shared.prefix=lib
+amd64.NetBSD.gpp.static.extension=a
+amd64.NetBSD.gpp.shared.extension=so
+amd64.NetBSD.gpp.plugin.extension=so
+amd64.NetBSD.gpp.jni.extension=so
+amd64.NetBSD.gpp.executable.extension=
+
+# FIXME to be removed when NAR-6
+amd64.NetBSD.gcc.static.extension=a
+amd64.NetBSD.gcc.shared.extension=so*
+amd64.NetBSD.gcc.plugin.extension=so
+amd64.NetBSD.gcc.jni.extension=so
diff -r 28b1b505315e -r 6bc47a234166 databases/postgresql-pljava/patches/patch-pljava-so_src_main_c_Backend.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql-pljava/patches/patch-pljava-so_src_main_c_Backend.c  Fri Oct 27 09:51:03 2017 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-pljava-so_src_main_c_Backend.c,v 1.1 2017/10/27 09:51:03 fhajny Exp $
+
+Set a default libjvm path, because we can and it saves user an awkward step.
+
+--- pljava-so/src/main/c/Backend.c.orig        2016-03-29 16:52:02.000000000 +0000
++++ pljava-so/src/main/c/Backend.c
+@@ -1291,7 +1291,7 @@ static void registerGUCOptions(void)
+               NULL, /* extended description */
+               &libjvmlocation,
+               #if PG_VERSION_NUM >= 80400
+-                      "libjvm",
++                      "@LIBJVM@",
+               #endif
+               PGC_SUSET,
+               #if PG_VERSION_NUM >= 80400



Home | Main Index | Thread Index | Old Index