Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Apr 2014 04:57:30 GMT
From:      Jia-Shiun Li <jiashiun@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/188156: make chinese/gcin make jobs safe
Message-ID:  <201404010457.s314vU2k032158@cgiserv.freebsd.org>
Resent-Message-ID: <201404010500.s31500sl009959@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         188156
>Category:       ports
>Synopsis:       make chinese/gcin make jobs safe
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 01 05:00:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Jia-Shiun Li
>Release:        11.0-CURRENT
>Organization:
>Environment:
FreeBSD 4cbsd 11.0-CURRENT FreeBSD 11.0-CURRENT #27 r263420: Thu Mar 20 20:05:24 CST 2014     jsli@4cbsd:/usr/obj/usr/src/sys/Minimal  amd64
>Description:
Make chinese/gcin make jobs safe.

Primarily add dependency rules of libgcin-im-client.so. The other parts are auto generated by 'make makepatch'.

>How-To-Repeat:

>Fix:
patch attached. Tested ok with MAKE_JOBS_NUMBER=16 on an i5-3450 4-core system.

Patch attached with submission follows:

diff -burN gcin.orig/Makefile gcin/Makefile
--- gcin.orig/Makefile	2014-01-23 01:00:46.000000000 +0800
+++ gcin/Makefile	2014-03-28 20:59:28.000000000 +0800
@@ -22,7 +22,6 @@
 USE_XORG=	x11 xtst xext
 INSTALLS_ICONS=	YES
 USE_LDCONFIG=	YES
-MAKE_JOBS_UNSAFE=	yes
 OPTIONS_DEFINE=	ANTHY QT_IM_MODULE
 ANTHY_DESC=	Japanese anthy IM module
 QT_IM_MODULE_DESC=	QT IM module
diff -burN gcin.orig/files/patch-Makefile gcin/files/patch-Makefile
--- gcin.orig/files/patch-Makefile	2014-01-23 01:40:44.000000000 +0800
+++ gcin/files/patch-Makefile	2014-03-28 20:46:16.000000000 +0800
@@ -1,5 +1,5 @@
---- ./Makefile.orig	2012-12-08 00:32:13.000000000 +0000
-+++ ./Makefile	2014-01-04 22:34:02.000000000 +0000
+--- ./Makefile.orig	2012-12-08 08:32:13.000000000 +0800
++++ ./Makefile	2014-03-28 20:46:01.000000000 +0800
 @@ -94,7 +94,7 @@
  all:	$(PROGS) trad2sim $(GCIN_SO) $(DATA) $(PROGS_CV) gcin.spec gcin-fedora.spec
  	$(MAKE) -C data
@@ -9,7 +9,51 @@
  	if [ $(USE_I18N) = 'Y' ]; then $(MAKE) -C po; fi
  	if [ $(GTK3_IM) = 'Y' ]; then $(MAKE) -C gtk3-im; fi
  	if [ $(QT_IM) = 'Y' ]; then $(MAKE) -C qt-im; fi
-@@ -215,11 +215,11 @@
+@@ -103,18 +103,18 @@
+ #gcc_ld_run_path=-Wl,-rpath,$(gcin_ld_run_path)
+ 
+ gcin:   $(OBJS) $(IMdkitLIB) $(OBJ_IMSRV)
+-	$(CCLD) $(EXTRA_LDFLAGS) $(gcc_ld_run_path) -o $@ $(OBJS) $(IMdkitLIB) $(OBJ_IMSRV) -lXtst $(LDFLAGS) -L/usr/X11R6/$(LIB)
++	$(CCLD) $(EXTRA_LDFLAGS) $(gcc_ld_run_path) -o $@ $(OBJS) $(IMdkitLIB) $(OBJ_IMSRV) -lXtst $(LDFLAGS) -L/usr/local/$(LIB)
+ 	rm -f core.* vgcore.*
+ 	ln -sf $@ $@.test
+ 
+ gcin-nocur:   $(OBJS) $(IMdkitLIB) $(OBJ_IMSRV)
+-	$(CCLD) -Wl,-rpath,$(gcinlibdir) $(EXTRA_LDFLAGS) -o $@ $(OBJS) $(IMdkitLIB) $(OBJ_IMSRV) -lXtst $(LDFLAGS) -L/usr/X11R6/$(LIB)
++	$(CCLD) -Wl,-rpath,$(gcinlibdir) $(EXTRA_LDFLAGS) -o $@ $(OBJS) $(IMdkitLIB) $(OBJ_IMSRV) -lXtst $(LDFLAGS) -L/usr/local/$(LIB)
+ 	rm -f core.*
+ 
+-tslearn:        $(OBJS_TSLEARN)
++tslearn:        $(OBJS_TSLEARN) im-client/libgcin-im-client.so
+ 	$(CCLD) $(gcc_ld_run_path) -o $@ $(OBJS_TSLEARN) -L./im-client -lgcin-im-client $(LDFLAGS)
+ 
+-ts-edit:        $(OBJS_TS_EDIT)
++ts-edit:        $(OBJS_TS_EDIT) im-client/libgcin-im-client.so
+ 	$(CCLD) $(gcc_ld_run_path) -o $@ $(OBJS_TS_EDIT) -L./im-client -lgcin-im-client $(LDFLAGS)
+ 
+ ts-contribute:	ts-edit
+@@ -158,16 +158,16 @@
+ kbmcv:  $(OBJS_kbmcv)
+ 	$(CCLD) -o $@ $(OBJS_kbmcv) $(LDFLAGS)
+ 
+-gcin-gb-toggle:	$(OBJS_gcin_gb_toggle)
++gcin-gb-toggle:	$(OBJS_gcin_gb_toggle) im-client/libgcin-im-client.so
+ 	$(CCLD) $(gcc_ld_run_path) -o $@ $(OBJS_gcin_gb_toggle) -L./im-client -lgcin-im-client $(LDFLAGS)
+ 
+-gcin-kbm-toggle:	$(OBJS_gcin_kbm_toggle)
++gcin-kbm-toggle:	$(OBJS_gcin_kbm_toggle) im-client/libgcin-im-client.so
+ 	$(CCLD) $(gcc_ld_run_path) -o $@ $(OBJS_gcin_kbm_toggle) -L./im-client -lgcin-im-client $(LDFLAGS)
+ 
+-gcin-exit:	$(OBJS_gcin_exit)
++gcin-exit:	$(OBJS_gcin_exit) im-client/libgcin-im-client.so
+ 	$(CCLD) $(gcc_ld_run_path) -o $@ $(OBJS_gcin_exit) -L./im-client -lgcin-im-client $(LDFLAGS)
+ 
+-gcin-message:	$(OBJS_gcin_message)
++gcin-message:	$(OBJS_gcin_message) im-client/libgcin-im-client.so
+ 	$(CCLD) $(gcc_ld_run_path) -o $@ $(OBJS_gcin_message) -L./im-client -lgcin-im-client $(LDFLAGS)
+ 
+ pin-juyin:	$(OBJS_pin_juyin)
+@@ -215,12 +215,12 @@
  	$(MAKE) -C data install
  	$(MAKE) -C im-client install
  	$(MAKE) -C gtk-im install
@@ -19,10 +63,12 @@
  	if [ $(QT_IM) = 'Y' ]; then $(MAKE) -C qt-im install; fi
  	if [ $(QT4_IM) = 'Y' ]; then $(MAKE) -C qt4-im install; fi
 -	if [ $(prefix) = /usr/local ]; then \
+-	   install -m 644 gcin.png /usr/share/icons; \
 +	if [ $(prefix) = /nonstaged ]; then \
- 	   install -m 644 gcin.png /usr/share/icons; \
++	   install -m 644 gcin.png $(prefix)/share/icons; \
  	   install -d $(DOC_DIR); \
  	   install -m 644 README.html Changelog.html $(DOC_DIR); \
+ 	   install $(PROGS) $(bindir); \
 @@ -234,6 +234,7 @@
  	   rm -f $(bindir)/ts-contribute; ln -sf ts-edit $(bindir)/ts-contribute; \
  	fi
diff -burN gcin.orig/files/patch-modules_Makefile gcin/files/patch-modules_Makefile
--- gcin.orig/files/patch-modules_Makefile	2014-01-23 01:40:44.000000000 +0800
+++ gcin/files/patch-modules_Makefile	1970-01-01 08:00:00.000000000 +0800
@@ -1,29 +0,0 @@
---- modules/Makefile.orig	2012-09-05 15:46:26.000000000 +0800
-+++ modules/Makefile	2012-09-05 15:49:16.000000000 +0800
-@@ -3,15 +3,18 @@ include ../suffixes-rule
- 
- CFLAGS+=-I.. -I../IMdkit/include
- GCIN_MODULE=intcode-module.so
-+SOURCES=intcode.cpp win-int.cpp
- 
- ifeq ($(USE_ANTHY),Y)
- GCIN_MODULE+=anthy-module.so
-+SOURCES+=anthy.cpp
- endif
- 
- ifeq ($(USE_CHEWING),Y)
- GCIN_MODULE+=chewing-module.so
- CHEWING_DATADIR=$(shell pkg-config --variable=datadir chewing)
- CFLAGS += -DCHEWING_DATADIR=\"$(CHEWING_DATADIR)\"
-+SOURCES+=chewing-conf.cpp chewing.cpp gcin-setup-chewing.cpp
- endif
- 
- all:	$(GCIN_MODULE)
-@@ -35,6 +38,6 @@ install:
- clean:
- 	rm -f *.pico *.so *.o .depend
- .depend:
--	$(CCX) $(CFLAGS) -MM *.cpp > $@
-+	$(CCX) $(CFLAGS) -MM $(SOURCES) > $@
- 
- include .depend
diff -burN gcin.orig/files/patch-modules__Makefile gcin/files/patch-modules__Makefile
--- gcin.orig/files/patch-modules__Makefile	1970-01-01 08:00:00.000000000 +0800
+++ gcin/files/patch-modules__Makefile	2014-03-28 20:46:16.000000000 +0800
@@ -0,0 +1,29 @@
+--- ./modules/Makefile.orig	2012-04-10 13:50:44.000000000 +0800
++++ ./modules/Makefile	2014-03-28 20:45:33.000000000 +0800
+@@ -3,15 +3,18 @@
+ 
+ CFLAGS+=-I.. -I../IMdkit/include
+ GCIN_MODULE=intcode-module.so
++SOURCES=intcode.cpp win-int.cpp
+ 
+ ifeq ($(USE_ANTHY),Y)
+ GCIN_MODULE+=anthy-module.so
++SOURCES+=anthy.cpp
+ endif
+ 
+ ifeq ($(USE_CHEWING),Y)
+ GCIN_MODULE+=chewing-module.so
+ CHEWING_DATADIR=$(shell pkg-config --variable=datadir chewing)
+ CFLAGS += -DCHEWING_DATADIR=\"$(CHEWING_DATADIR)\"
++SOURCES+=chewing-conf.cpp chewing.cpp gcin-setup-chewing.cpp
+ endif
+ 
+ all:	$(GCIN_MODULE)
+@@ -35,6 +38,6 @@
+ clean:
+ 	rm -f *.pico *.so *.o .depend
+ .depend:
+-	$(CCX) $(CFLAGS) -MM *.cpp > $@
++	$(CCX) $(CFLAGS) -MM $(SOURCES) > $@
+ 
+ include .depend
diff -burN gcin.orig/files/patch-qt4-im-Makefile gcin/files/patch-qt4-im-Makefile
--- gcin.orig/files/patch-qt4-im-Makefile	2014-01-23 01:40:44.000000000 +0800
+++ gcin/files/patch-qt4-im-Makefile	1970-01-01 08:00:00.000000000 +0800
@@ -1,11 +0,0 @@
---- qt4-im/Makefile.orig	2012-01-08 01:45:14.000000000 +0800
-+++ qt4-im/Makefile	2012-01-08 01:47:10.000000000 +0800
-@@ -3,7 +3,7 @@ QT=qt4
- QTIM=$(QT)/plugins/inputmethods
- IMMODULES=$(libdir)/$(QTIM)
- 
--INCS=-I../im-client -I/usr/include/X11 `pkg-config QtCore QtGui --cflags`
-+INCS=-I../im-client -I$(prefix)/include/X11 -I$(prefix)/include `pkg-config QtCore QtGui --cflags`
- CXXFLAGS=$(OPTFLAGS) $(INCS) -Wall -D_REENTRANT -DUNIX=1 -fPIC  -DQT4 -DQT_SHARED \
- -DQT_IMMODULE -DPIC
- OBJS= moc_gcin-qt.o gcin-qt.o im-gcin-qt.o gcin-imcontext-qt.o
diff -burN gcin.orig/files/patch-qt4-im__Makefile gcin/files/patch-qt4-im__Makefile
--- gcin.orig/files/patch-qt4-im__Makefile	1970-01-01 08:00:00.000000000 +0800
+++ gcin/files/patch-qt4-im__Makefile	2014-03-28 20:46:16.000000000 +0800
@@ -0,0 +1,11 @@
+--- ./qt4-im/Makefile.orig	2012-03-05 20:26:54.000000000 +0800
++++ ./qt4-im/Makefile	2014-03-28 20:45:33.000000000 +0800
+@@ -3,7 +3,7 @@
+ QTIM=$(QT)/plugins/inputmethods
+ IMMODULES=$(libdir)/$(DEB_BUILD_MULTIARCH)/$(QTIM)
+ 
+-INCS=-I../im-client -I/usr/include/X11 `pkg-config QtCore QtGui --cflags`
++INCS=-I../im-client -I$(prefix)/include/X11 -I$(prefix)/include `pkg-config QtCore QtGui --cflags`
+ CXXFLAGS=$(OPTFLAGS) $(INCS) -Wall -D_REENTRANT -DUNIX=1 -fPIC  -DQT4 -DQT_SHARED \
+ -DQT_IMMODULE -DPIC
+ OBJS= moc_gcin-qt.o gcin-qt.o im-gcin-qt.o gcin-imcontext-qt.o


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404010457.s314vU2k032158>