[gentoo-commits] repo/gentoo:master commit in: app-text/hyperestraier/files/, app-text/hyperestraier/
commit: fb87abe19150270ba0448d6192e0d6d0d5e782cc Author: Akinori Hattori gentoo org> AuthorDate: Sun Sep 11 01:46:47 2022 + Commit: Akinori Hattori gentoo org> CommitDate: Sun Sep 11 01:46:47 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb87abe1 app-text/hyperestraier: fix build with Java 11+ Closes: https://bugs.gentoo.org/867862 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Akinori Hattori gentoo.org> .../files/hyperestraier-java-11.patch | 78 ++ ...13-r1.ebuild => hyperestraier-1.4.13-r2.ebuild} | 3 +- 2 files changed, 80 insertions(+), 1 deletion(-) diff --git a/app-text/hyperestraier/files/hyperestraier-java-11.patch b/app-text/hyperestraier/files/hyperestraier-java-11.patch new file mode 100644 index ..fa143fb23872 --- /dev/null +++ b/app-text/hyperestraier/files/hyperestraier-java-11.patch @@ -0,0 +1,78 @@ +--- a/javanative/Database.java b/javanative/Database.java +@@ -135,7 +135,7 @@ + /** last happened error code */ + private int ecode; + /** callback function to inform of database events */ +- private DatabaseInformer informer; ++ private long informer; + // + // constructors and finalizers + // +--- a/javanative/database.c b/javanative/database.c +@@ -19,7 +19,7 @@ + + + /* global variables */ +-JNIEnv *infoenv = NULL; ++static JavaVM* jvm = NULL; + + + /* private function prototypes */ +@@ -181,8 +181,8 @@ + err = TRUE; + } + (*env)->SetLongField(env, obj, fid, 0); +- fid = (*env)->GetFieldID(env, cls, "informer", "L" CLSDBINFO ";"); +- if((infoobj = (*env)->GetObjectField(env, obj, fid)) != NULL) ++ fid = (*env)->GetFieldID(env, cls, "informer", "J"); ++ if((infoobj = (jobject)(*env)->GetLongField(env, obj, fid)) != NULL) + (*env)->DeleteGlobalRef(env, infoobj); + (*env)->SetObjectField(env, obj, fid, NULL); + return err ? FALSE : TRUE; +@@ -735,16 +735,17 @@ + throwillarg(env); + return; + } +- fid = (*env)->GetFieldID(env, cls, "informer", "L" CLSDBINFO ";"); +- if((oldobj = (*env)->GetObjectField(env, obj, fid)) != NULL) ++ fid = (*env)->GetFieldID(env, cls, "informer", "J"); ++ if((oldobj = (jobject)(*env)->GetLongField(env, obj, fid)) != NULL) + (*env)->DeleteGlobalRef(env, oldobj); + (*env)->SetObjectField(env, obj, fid, NULL); + if(!(informer = (*env)->NewGlobalRef(env, informer))){ + throwoutmem(env); + return; + } +- (*env)->SetObjectField(env, obj, fid, informer); +- infoenv = env; ++ (*env)->SetLongField(env, obj, fid, (PTRNUM)informer); ++ if(jvm == NULL) ++(*env)->GetJavaVM(env, ); + est_mtdb_set_informer((ESTMTDB *)(PTRNUM)coreptr, dbinform, informer); + } + +@@ -767,10 +768,12 @@ + + /* callback function for database events */ + static void dbinform(const char *message, void *opaque){ ++ JNIEnv *infoenv; + jstring msgobj; + jobject opobj; + jclass cls; + jmethodID mid; ++ (*jvm)->GetEnv(jvm, (void **), JNI_VERSION_1_8); + if(!(msgobj = (*infoenv)->NewStringUTF(infoenv, message))) return; + opobj = (jobject)opaque; + cls = (*infoenv)->GetObjectClass(infoenv, opobj); +--- a/javanative/myconf.h b/javanative/myconf.h +@@ -69,7 +69,6 @@ + #define CLSDOC "estraier/Document" + #define CLSCOND"estraier/Condition" + #define CLSDB "estraier/Database" +-#define CLSDBINFO "estraier/DatabaseInformer" + #define CLSRES "estraier/Result" + + diff --git a/app-text/hyperestraier/hyperestraier-1.4.13-r1.ebuild b/app-text/hyperestraier/hyperestraier-1.4.13-r2.ebuild similarity index 98% rename from app-text/hyperestraier/hyperestraier-1.4.13-r1.ebuild rename to app-text/hyperestraier/hyperestraier-1.4.13-r2.ebuild index 28d438f7c840..94667fffd8b0 100644 --- a/app-text/hyperestraier/hyperestraier-1.4.13-r1.ebuild +++ b/app-text/hyperestraier/hyperestraier-1.4.13-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" @@ -31,6 +31,7 @@ S="${WORKDIR}/all/${P}" PATCHES=( "${FILESDIR}"/${PN}-configure.patch + "${FILESDIR}"/${PN}-java-11.patch "${FILESDIR}"/${PN}-perl.patch "${FILESDIR}"/${PN}-ruby19.patch )
[gentoo-commits] repo/gentoo:master commit in: app-text/hyperestraier/files/, app-text/hyperestraier/
commit: 64be34bbb9eac97408ddfe61ff0fa71363aee37c Author: Akinori Hattori gentoo org> AuthorDate: Fri Apr 7 12:20:49 2017 + Commit: Akinori Hattori gentoo org> CommitDate: Fri Apr 7 12:20:49 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64be34bb app-text/hyperestraier: fix build Gentoo-Bug: 562566 Package-Manager: Portage-2.3.3, Repoman-2.3.1 .../files/hyperestraier-configure.patch| 294 + app-text/hyperestraier/hyperestraier-1.4.13.ebuild | 1 + 2 files changed, 295 insertions(+) diff --git a/app-text/hyperestraier/files/hyperestraier-configure.patch b/app-text/hyperestraier/files/hyperestraier-configure.patch new file mode 100644 index 000..4e747d9c754 --- /dev/null +++ b/app-text/hyperestraier/files/hyperestraier-configure.patch @@ -0,0 +1,294 @@ +--- a/configure.in b/configure.in +@@ -24,24 +24,6 @@ + MYRUNPATH="" + MYPOSTCMD="true" + +-# Building paths +-pathtmp="$PATH" +-PATH="$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin" +-PATH="$PATH:/usr/ccs/bin:/usr/ucb:/usr/xpg4/bin:/usr/xpg6/bin:$pathtmp" +-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH" +-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH" +-CPATH="$HOME/include:/usr/local/include:$CPATH" +-PKG_CONFIG_PATH="$HOME/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" +-export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH PKG_CONFIG_PATH +-if type pkg-config > /dev/null 2>&1 +-then +- PATH="$PATH:`pkg-config --variable=bindir qdbm`" +- LIBRARY_PATH="$LIBRARY_PATH:`pkg-config --variable=libdir qdbm`" +- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:`pkg-config --variable=libdir qdbm`" +- CPATH="$CPATH:`pkg-config --variable=includedir qdbm`" +- export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH PKG_CONFIG_PATH +-fi +- + + + # +@@ -60,7 +42,6 @@ + then + MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g" + MYDEFS="" +- MYLDOPTS="-static" + enables="$enables (debug)" + stable="yes" + fi +@@ -187,19 +169,20 @@ + fi + + # Underlying libraries ++PKG_PROG_PKG_CONFIG + AC_CHECK_LIB(c, main) + AC_CHECK_LIB(m, main) + AC_CHECK_LIB(regex, main) + AC_CHECK_LIB(iconv, main) +-if test "$enable_zlib" != "no" || pkg-config --libs qdbm 2>&1 | grep '\-lz' > /dev/null 2>&1 ++if test "$enable_zlib" != "no" || $PKG_CONFIG --libs qdbm 2>&1 | grep '\-lz' > /dev/null 2>&1 + then + AC_CHECK_LIB(z, main) + fi +-if test "$enable_lzo" = "yes" || pkg-config --libs qdbm 2>&1 | grep '\-llzo2' > /dev/null 2>&1 ++if test "$enable_lzo" = "yes" || $PKG_CONFIG --libs qdbm 2>&1 | grep '\-llzo2' > /dev/null 2>&1 + then + AC_CHECK_LIB(lzo2, main) + fi +-if test "$enable_bzip" = "yes" || pkg-config --libs qdbm 2>&1 | grep '\-lbz2' > /dev/null 2>&1 ++if test "$enable_bzip" = "yes" || $PKG_CONFIG --libs qdbm 2>&1 | grep '\-lbz2' > /dev/null 2>&1 + then + AC_CHECK_LIB(bz2, main) + fi +@@ -227,15 +210,15 @@ + fi + + # Checking the version of QDBM with pkg-config +-if type pkg-config > /dev/null 2>&1 ++if true + then + printf 'checking the version of QDBM ... ' +- if pkg-config --atleast-version=1.8.75 qdbm ++ if $PKG_CONFIG --atleast-version=1.8.75 qdbm + then +-printf 'ok (%s)\n' `pkg-config --modversion qdbm` +-MYCPPOPTS="$MYCPPOPTS -I`pkg-config --variable=includedir qdbm`" +-MYLDOPTS="$MYLDOPTS -L`pkg-config --variable=libdir qdbm`" +-MYRUNPATH="$MYRUNPATH:`pkg-config --variable=libdir qdbm`" ++printf 'ok (%s)\n' `$PKG_CONFIG --modversion qdbm` ++MYCPPOPTS="$MYCPPOPTS -I`$PKG_CONFIG --variable=includedir qdbm`" ++MYLDOPTS="$MYLDOPTS -L`$PKG_CONFIG --variable=libdir qdbm`" ++MYRUNPATH="$MYRUNPATH:`$PKG_CONFIG --variable=libdir qdbm`" + else + printf 'no (maybe not installed or too old)\n' + fi +--- a/javanative/configure.in b/javanative/configure.in +@@ -27,28 +27,6 @@ + MYSKLIBS="" + MYRUNPATH="" + +-# Building paths +-pathtmp="$PATH" +-PATH="..:$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin" +-PATH="$PATH:/usr/ccs/bin:/usr/ucb:/usr/xpg4/bin:/usr/xpg6/bin:$pathtmp" +-LIBRARY_PATH="..:$HOME/lib:/usr/local/lib:$LIBRARY_PATH" +-LD_LIBRARY_PATH="..:$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH" +-CPATH="..:$HOME/include:/usr/local/include:$CPATH" +-PKG_CONFIG_PATH="..:$HOME/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" +-export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH PKG_CONFIG_PATH +-if type pkg-config > /dev/null 2>&1 +-then +- PATH="$PATH:`pkg-config --variable=bindir qdbm`" +- PATH="$PATH:`pkg-config --variable=bindir hyperestraier`" +- LIBRARY_PATH="$LIBRARY_PATH:`pkg-config --variable=libdir qdbm`" +- LIBRARY_PATH="$LIBRARY_PATH:`pkg-config --variable=libdir hyperestraier`" +- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:`pkg-config --variable=libdir qdbm`" +- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:`pkg-config --variable=libdir hyperestraier`" +- CPATH="$CPATH:`pkg-config
[gentoo-commits] repo/gentoo:master commit in: app-text/hyperestraier/files/, app-text/hyperestraier/
commit: f481bbbaa3653bc40522f0a9052018f282519913 Author: Akinori Hattori gentoo org> AuthorDate: Fri Apr 7 12:10:06 2017 + Commit: Akinori Hattori gentoo org> CommitDate: Fri Apr 7 12:10:06 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f481bbba app-text/hyperestraier: fix build with Ruby 1.9+ Gentoo-Bug: 608104 Package-Manager: Portage-2.3.3, Repoman-2.3.1 .../hyperestraier/files/hyperestraier-ruby19.patch | 146 + app-text/hyperestraier/hyperestraier-1.4.13.ebuild | 15 ++- 2 files changed, 160 insertions(+), 1 deletion(-) diff --git a/app-text/hyperestraier/files/hyperestraier-ruby19.patch b/app-text/hyperestraier/files/hyperestraier-ruby19.patch new file mode 100644 index 000..25d8ffad7da --- /dev/null +++ b/app-text/hyperestraier/files/hyperestraier-ruby19.patch @@ -0,0 +1,146 @@ +--- a/rubynative/Makefile.in b/rubynative/Makefile.in +@@ -82,21 +82,21 @@ + + check : + rm -rf casket +- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb put casket ../misc/test001.est +- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb put casket ../misc/test002.est +- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb put casket ../misc/test003.est +- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb put casket ../misc/test004.est +- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb put casket ../misc/test005.est +- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb put casket ../misc/test006.est +- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb edit casket 1 "@title" "java" +- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb get casket 1 +- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb get casket 1 "@title" +- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb out casket 1 +- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb inform casket +- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb optimize casket +- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb search \ ++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb put casket ../misc/test001.est ++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb put casket ../misc/test002.est ++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb put casket ../misc/test003.est ++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb put casket ../misc/test004.est ++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb put casket ../misc/test005.est ++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb put casket ../misc/test006.est ++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb edit casket 1 "@title" "java" ++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb get casket 1 ++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb get casket 1 "@title" ++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb out casket 1 ++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb inform casket ++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb optimize casket ++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb search \ + -vf -cd casket "estraier" > check.out +- $(RUNENV) $(RUBY) -I./src -w -d estcmd.rb search \ ++ $(RUNENV) $(RUBY) -I./src -I. -w -d estcmd.rb search \ + -vs -gs -attr "@uri" -ord "@mdate NUMD" -max 1 casket "estraier OR mikio" > check.out + rm -rf casket + +--- a/rubynative/configure.in b/rubynative/configure.in +@@ -41,7 +41,7 @@ + # Setting the default prefix + if test "$prefix" = NONE + then +- prefix=`ruby -rrbconfig -e 'puts(Config::CONFIG.fetch("prefix"))'` ++ prefix=`ruby -rrbconfig -e 'puts(RbConfig::CONFIG.fetch("prefix"))'` + fi + + +@@ -68,7 +68,7 @@ + printf '%s\n' "$RDOC" + + # Librarh path +-myrblibdir=`ruby -rrbconfig -e 'puts(Config::CONFIG.fetch("sitelibdir"))'` ++myrblibdir=`ruby -rrbconfig -e 'puts(RbConfig::CONFIG.fetch("sitelibdir"))'` + if test -n "$myrblibdir" + then + MYRBLIBDIR="$myrblibdir" +--- a/rubynative/src/estraier.c b/rubynative/src/estraier.c +@@ -24,6 +24,16 @@ + #define VNINFO "@informer" + #define VNCOND "@cond" + ++#ifndef RSTRING_PTR ++# define RSTRING_PTR(s) (RSTRING(s)->ptr) ++#endif ++#ifndef RSTRING_LEN ++# define RSTRING_LEN(s) (RSTRING(s)->len) ++#endif ++#ifndef RARRAY_LEN ++# define RARRAY_LEN(a) (RARRAY(a)->len) ++#endif ++ + typedef struct { + int *ids; + int *dbidxs; +@@ -351,7 +361,7 @@ + vdoc = rb_iv_get(vself, VNDATA); + Data_Get_Struct(vdoc, ESTDOC, doc); + Check_Type(vwords, T_ARRAY); +- len = RARRAY(vwords)->len; ++ len = RARRAY_LEN(vwords); + for(i = 0; i < len; i++){ + Check_Type(rb_ary_entry(vwords, i), T_STRING); + } +@@ -764,7 +774,7 @@ + CBMAP *hints; + int i, dnum, *res, rnum; + Check_Type(vdbs, T_ARRAY); +- dnum = RARRAY(vdbs)->len; ++ dnum = RARRAY_LEN(vdbs); + dbs = cbmalloc(dnum * sizeof(ESTMTDB *) + 1); + for(i = 0; i < dnum; i++){ + vdb = rb_ary_entry(vdbs, i); +@@ -1189,10 +1199,10 @@ + VALUE str; + int i, len; + list = cblistopen(); +- len = RARRAY(obj)->len; ++ len = RARRAY_LEN(obj); + for(i = 0; i < len; i++){ +