On Sat, Nov 11, 2017 at 03:18:18PM +0000, Stuart Henderson wrote: > > On 2017/11/10 11:28, Kevin Lo wrote: > > On Thu, Nov 09, 2017 at 04:13:44PM +0800, Kevin Lo wrote: > > > > > > Hi, > > > > > > Update both libchewing and scim-chewing to 0.5.1. > > > Tested scim and uim on amd64. > > > > > > While here, I would like to take over maintainership of the libchewing. > > > > > > Comments? OK? > > > > Here's the revised diff that removes unneeded MAKE_ENV in > > libchewing's Makefile. > > > > Index: chinese/libchewing/Makefile > > =================================================================== > > RCS file: /cvs/ports/chinese/libchewing/Makefile,v > > retrieving revision 1.9 > > diff -u -p -u -p -r1.9 Makefile > > --- chinese/libchewing/Makefile 11 Mar 2016 19:59:12 -0000 1.9 > > +++ chinese/libchewing/Makefile 10 Nov 2017 03:22:07 -0000 > > @@ -1,24 +1,34 @@ > > # $OpenBSD: Makefile,v 1.9 2016/03/11 19:59:12 naddy Exp $ > > > > -COMMENT= intelligent phonetic input method library > > +COMMENT = intelligent phonetic input method library > > > > -V = 0.3.3 > > -DISTNAME= libchewing-$V > > -PKGNAME= zh-libchewing-$V > > -REVISION = 2 > > +V = 0.5.1 > > +PKGNAME = zh-${GH_PROJECT}-${V} > > > > -SHARED_LIBS= chewing 0.0 # .3.1 > > +GH_ACCOUNT = chewing > > +GH_PROJECT = libchewing > > +GH_TAGNAME = v${V} > > They still have a proper uploaded tarball (rather than just the > auto generated ones) in https://github.com/chewing/libchewing/releases .. > Generally it is better to use these because it insulates the port > from any changes in github's infrastructure or from upstream commits > on the tag. (Also the auto-generated files often miss some files > which are included in the proper release tarball - probably not so > important here with the cmake build - but the changelog and autoconf > files aren't included).
Thanks for reviewing my diff. Ok, I use a proper uploaded tarball instead. > > +CONFIGURE_ARGS =-DMAKEINFO=${LOCALBASE}/bin/gmakeinfo \ > > + -DCMAKE_SHARED_LINKER_FLAGS="-lc" > > Having to specify -lc seems very odd.. Any idea what's going on here? Fixed. That was my fault since we don't use "-Wl,--no-undefined" when linking. > > -CONFIGURE_STYLE=gnu > > +CFLAGS += -I${LOCALBASE}/include -fno-stack-protector > > Is that (-fno-stack-protector) really needed? Tests pass without it.. No, it's not needed. Here's an updated diff: Index: chinese/libchewing/Makefile =================================================================== RCS file: /cvs/ports/chinese/libchewing/Makefile,v retrieving revision 1.9 diff -u -p -u -p -r1.9 Makefile --- chinese/libchewing/Makefile 11 Mar 2016 19:59:12 -0000 1.9 +++ chinese/libchewing/Makefile 13 Nov 2017 03:26:57 -0000 @@ -1,24 +1,35 @@ # $OpenBSD: Makefile,v 1.9 2016/03/11 19:59:12 naddy Exp $ -COMMENT= intelligent phonetic input method library +COMMENT = intelligent phonetic input method library -V = 0.3.3 -DISTNAME= libchewing-$V -PKGNAME= zh-libchewing-$V -REVISION = 2 +V = 0.5.1 +DISTNAME = libchewing-$V +PKGNAME = zh-libchewing-$V -SHARED_LIBS= chewing 0.0 # .3.1 +SHARED_LIBS = chewing 0.1 # .3.3 -CATEGORIES= chinese inputmethods +CATEGORIES = chinese inputmethods -HOMEPAGE= http://chewing.im/ +HOMEPAGE = http://chewing.im/ + +MAINTAINER = Kevin Lo <ke...@openbsd.org> # LGPLv2.1 only PERMIT_PACKAGE_CDROM= Yes +WANTLIB += m pthread sqlite3 + MASTER_SITES = https://github.com/chewing/libchewing/releases/download/v$V/ + EXTRACT_SUFX= .tar.bz2 -CONFIGURE_STYLE=gnu +BUILD_DEPENDS = print/texinfo +LIB_DEPENDS = databases/sqlite3 + +MAKE_FLAGS = MAKEINFO=${LOCALBASE}/bin/gmakeinfo + +CONFIGURE_STYLE = gnu +CONFIGURE_ARGS = CPPFLAGS="-I${LOCALBASE}/include" \ + LDFLAGS="-L${LOCALBASE}/lib" .include <bsd.port.mk> Index: chinese/libchewing/distinfo =================================================================== RCS file: /cvs/ports/chinese/libchewing/distinfo,v retrieving revision 1.4 diff -u -p -u -p -r1.4 distinfo --- chinese/libchewing/distinfo 18 Jan 2015 03:12:54 -0000 1.4 +++ chinese/libchewing/distinfo 13 Nov 2017 03:26:57 -0000 @@ -1,2 +1,2 @@ -SHA256 (libchewing-0.3.3.tar.bz2) = cqDeErhsTV9kaKaNiMc2In/xb6epFfhZX/5aMcrpXq4= -SIZE (libchewing-0.3.3.tar.bz2) = 1798134 +SHA256 (libchewing-0.5.1.tar.bz2) = lwjGNBX6YDRDXA84EA59MNDhuskn9nvsbf6z/vAWFys= +SIZE (libchewing-0.5.1.tar.bz2) = 3141084 Index: chinese/libchewing/patches/patch-configure =================================================================== RCS file: chinese/libchewing/patches/patch-configure diff -N chinese/libchewing/patches/patch-configure --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ chinese/libchewing/patches/patch-configure 13 Nov 2017 03:26:57 -0000 @@ -0,0 +1,14 @@ +$OpenBSD$ + +Index: configure +--- configure.orig ++++ configure +@@ -15425,7 +15425,7 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_undefined" >&5 + $as_echo "$ac_cv_no_undefined" >&6; } + if test x$ac_cv_no_undefined = "xyes"; then : +- NO_UNDEFINED_LDFLAGS="-Wl,--no-undefined" ++ NO_UNDEFINED_LDFLAGS="" + fi + + Index: chinese/libchewing/patches/patch-src_hash_c =================================================================== RCS file: chinese/libchewing/patches/patch-src_hash_c diff -N chinese/libchewing/patches/patch-src_hash_c --- chinese/libchewing/patches/patch-src_hash_c 2 May 2011 06:55:07 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -$OpenBSD: patch-src_hash_c,v 1.1 2011/05/02 06:55:07 kevlo Exp $ ---- src/hash.c.orig Mon May 2 12:34:53 2011 -+++ src/hash.c Mon May 2 13:05:53 2011 -@@ -524,7 +524,7 @@ int InitHash( const char *path ) - } else { - sprintf( hashfilename, "%s" PLAT_SEPARATOR "%s", path, HASH_FILE ); - } -- memset( hashtable, (int) NULL, HASH_TABLE_SIZE ); -+ memset( hashtable, 0, HASH_TABLE_SIZE ); - - open_hash_file: - dump = _load_hash_file( hashfilename, &fsize ); Index: chinese/libchewing/pkg/PLIST =================================================================== RCS file: /cvs/ports/chinese/libchewing/pkg/PLIST,v retrieving revision 1.3 diff -u -p -u -p -r1.3 PLIST --- chinese/libchewing/pkg/PLIST 16 Mar 2015 18:07:37 -0000 1.3 +++ chinese/libchewing/pkg/PLIST 13 Nov 2017 03:26:57 -0000 @@ -1,20 +1,18 @@ @comment $OpenBSD: PLIST,v 1.3 2015/03/16 18:07:37 naddy Exp $ include/chewing/ +include/chewing/chewing-compat.h include/chewing/chewing.h include/chewing/chewingio.h include/chewing/global.h include/chewing/mod_aux.h +@info info/libchewing.info lib/libchewing.a lib/libchewing.la @lib lib/libchewing.so.${LIBchewing_VERSION} lib/pkgconfig/chewing.pc -share/chewing/ -share/chewing/ch_index_begin.dat -share/chewing/ch_index_phone.dat -share/chewing/dict.dat -share/chewing/fonetree.dat -share/chewing/ph_index.dat -share/chewing/pinyin.tab -share/chewing/swkb.dat -share/chewing/symbols.dat -share/chewing/us_freq.dat +share/libchewing/ +share/libchewing/dictionary.dat +share/libchewing/index_tree.dat +share/libchewing/pinyin.tab +share/libchewing/swkb.dat +share/libchewing/symbols.dat Index: inputmethods/scim-chewing/Makefile =================================================================== RCS file: /cvs/ports/inputmethods/scim-chewing/Makefile,v retrieving revision 1.23 diff -u -p -u -p -r1.23 Makefile --- inputmethods/scim-chewing/Makefile 23 Oct 2017 17:10:51 -0000 1.23 +++ inputmethods/scim-chewing/Makefile 13 Nov 2017 03:27:21 -0000 @@ -2,31 +2,30 @@ COMMENT= scim input method module for chewing -DISTNAME= scim-chewing-0.3.4 -REVISION= 6 +GH_ACCOUNT= chewing +GH_PROJECT= scim-chewing +GH_TAGNAME= v0.5.1 CATEGORIES= inputmethods chinese -HOMEPAGE= http://chewing.csie.net/ +HOMEPAGE= http://chewing.im/ # GPLv2 PERMIT_PACKAGE_CDROM= Yes -WANTLIB+= GL X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes Xi -WANTLIB+= Xinerama Xrandr Xrender Xxf86vm atk-1.0 cairo chewing drm -WANTLIB+= expat ffi fontconfig freetype gdk-x11-2.0 gdk_pixbuf-2.0 -WANTLIB+= gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 graphite2 gthread-2.0 -WANTLIB+= gtk-x11-2.0 harfbuzz m pango-1.0 pangocairo-1.0 pangoft2-1.0 -WANTLIB+= pcre pixman-1 png pthread scim-1.0 -WANTLIB+= scim-gtkutils-1.0 scim-x11utils-1.0 ${COMPILER_LIBCXX} xcb xcb-render -WANTLIB+= xcb-shm z +WANTLIB += ${COMPILER_LIBCXX} X11 Xcomposite Xcursor Xdamage Xext +WANTLIB += Xfixes Xi Xinerama Xrandr Xrender atk-1.0 cairo chewing +WANTLIB += expat ffi fontconfig freetype gdk-x11-2.0 gdk_pixbuf-2.0 +WANTLIB += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 graphite2 +WANTLIB += gthread-2.0 gtk-x11-2.0 harfbuzz m pango-1.0 pangocairo-1.0 +WANTLIB += pangoft2-1.0 pcre pixman-1 png scim-1.0 scim-gtkutils-1.0 +WANTLIB += scim-x11utils-1.0 sqlite3 xcb xcb-render xcb-shm z MODULES= devel/gettext \ textproc/intltool - -MASTER_SITES= http://chewing.csie.net/download/scim/ -EXTRACT_SUFX= .tar.bz2 - +BUILD_DEPENDS= ${MODGNU_AUTOCONF_DEPENDS} \ + ${MODGNU_AUTOMAKE_DEPENDS} \ + devel/libtool LIB_DEPENDS= x11/gtk+2 \ chinese/libchewing \ inputmethods/scim @@ -34,8 +33,15 @@ LIB_DEPENDS= x11/gtk+2 \ LIBTOOL_FLAGS= --tag=disable-static CONFIGURE_STYLE=gnu -CONFIGURE_ARGS= --disable-static +CONFIGURE_ARGS= --disable-static CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" + +AUTOCONF_VERSION= 2.69 +AUTOMAKE_VERSION= 1.15 + +post-patch: + @cd ${WRKSRC} && env AUTOCONF_VERSION=${AUTOCONF_VERSION} \ + AUTOMAKE_VERSION=${AUTOMAKE_VERSION} ./autogen.sh .include <bsd.port.mk> Index: inputmethods/scim-chewing/distinfo =================================================================== RCS file: /cvs/ports/inputmethods/scim-chewing/distinfo,v retrieving revision 1.4 diff -u -p -u -p -r1.4 distinfo --- inputmethods/scim-chewing/distinfo 18 Jan 2015 03:14:16 -0000 1.4 +++ inputmethods/scim-chewing/distinfo 13 Nov 2017 03:27:21 -0000 @@ -1,2 +1,2 @@ -SHA256 (scim-chewing-0.3.4.tar.bz2) = tpGl/9IOnN7N6ZhuId7tPup4nTYcbtwVTLOZddrpB3Q= -SIZE (scim-chewing-0.3.4.tar.bz2) = 374182 +SHA256 (scim-chewing-0.5.1.tar.gz) = SRsSd4T6OHNPMGL9V+pX5U9fRNN7VRqyWqsQxWXPbrs= +SIZE (scim-chewing-0.5.1.tar.gz) = 62938