[packages/Wnn7-SDK] - initial, based on Wnn6-SDK.spec and its patches - config patch adjusts imake configuration - incl

qboosh qboosh at pld-linux.org
Tue Apr 12 18:38:28 CEST 2016


commit 5ff70d8b4efc21b06486635b128013a02e438a05
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Apr 12 18:37:18 2016 +0200

    - initial, based on Wnn6-SDK.spec and its patches
    - config patch adjusts imake configuration
    - incl patch adds include dir for make install
    - shared patch enables shared library build
    - nonroot patch allows non-root make install
    - header patch fixes missing includes and prototypes issues

 Wnn7-SDK-config.patch  | 205 +++++++++++++++++++++++++++++++++++++++++++++++++
 Wnn7-SDK-header.patch  |  97 +++++++++++++++++++++++
 Wnn7-SDK-incl.patch    |  11 +++
 Wnn7-SDK-nonroot.patch |  11 +++
 Wnn7-SDK-shared.patch  |  46 +++++++++++
 Wnn7-SDK.spec          |  95 +++++++++++++++++++++++
 6 files changed, 465 insertions(+)
---
diff --git a/Wnn7-SDK.spec b/Wnn7-SDK.spec
new file mode 100644
index 0000000..aa217b0
--- /dev/null
+++ b/Wnn7-SDK.spec
@@ -0,0 +1,95 @@
+Summary:	Wnn6 Client Library
+Summary(pl.UTF-8):	Biblioteka kliencka Wnn6
+Name:		Wnn7-SDK
+Version:	1.0
+Release:	1
+License:	OMRON Corporation (distributable, see README)
+Group:		Libraries
+#Source0Download: http://www.omronsoft.co.jp/SP/pcunix/sdk/
+Source0:	http://www.omronsoft.co.jp/SP/pcunix/sdk/wnn/Wnn7SDK.tgz
+# Source0-md5:	19b41bf2ef86d7f4cb889c7f689602fb
+Patch0:		%{name}-config.patch
+Patch1:		%{name}-incl.patch
+Patch2:		%{name}-shared.patch
+Patch3:		%{name}-nonroot.patch
+Patch4:		%{name}-header.patch
+BuildRequires:	xorg-util-imake
+BuildRequires:	xorg-util-makedepend
+URL:		http://www.omronsoft.co.jp/SP/pcunix/sdk/
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Runtime Wnn6 client library necessary to run Wnn6 clients.
+
+%description -l pl.UTF-8
+Biblioteka kliencka Wnn6 potrzebna do uruchamiania klientów Wnn6.
+
+%package devel
+Summary:	Header files for Wnn6
+Summary(pl.UTF-8):	Pliki nagłówkowe Wnn6
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+This package contains header files for Wnn6 client developments.
+
+%description devel -l pl.UTF-8
+Ten pakiet zawiera pliki nagłówkowe do tworzenia klientów Wnn6.
+
+%package static
+Summary:	Static Wnn6 client library
+Summary(pl.UTF-8):	Statyczna biblioteka kliencka Wnn6
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static Wnn6 client library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka kliencka Wnn6.
+
+%prep
+%setup -q -c
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+
+cd src
+%{__sed} -i -e 's|/usr/lib64/X11|%{_libdir}/X11|g' \
+	config/X11.tmpl config/Project.tmpl Makefile.ini
+
+%build
+%{__make} -C src -f Makefile.ini World \
+	WNNLIBDIR=%{_libdir} \
+	CC="%{__cc}" \
+	CDEBUGFLAGS="%{rpmcflags} -fPIC" \
+	REQUIREDLIBS="-lcrypt" \
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C src install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc src/README
+%attr(755,root,root) %{_libdir}/libwnn7.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libwnn7.so.1
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libwnn7.so
+%{_includedir}/wnn7
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libwnn7.a
diff --git a/Wnn7-SDK-config.patch b/Wnn7-SDK-config.patch
new file mode 100644
index 0000000..a30fa73
--- /dev/null
+++ b/Wnn7-SDK-config.patch
@@ -0,0 +1,205 @@
+--- Wnn7-SDK-1.0/src/config/Project.tmpl.orig	2001-10-17 03:37:18.000000000 +0200
++++ Wnn7-SDK-1.0/src/config/Project.tmpl	2016-04-11 22:05:19.340036189 +0200
+@@ -6,9 +6,9 @@ XCOMM ----------------------------------
+ #include "/usr/openwin/lib/config/Project.tmpl"
+ #else	/* Sun & SVR4 */
+ #if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(NetBSDArchitecture) || defined(OpenBSDArchitecture) || defined(BSD386Architecture)
+-#include "/usr/X11R6/lib/X11/config/Project.tmpl"
++#include "/usr/lib64/X11/config/Project.tmpl"
+ #else	/* Linux || *BSD */
+-#include "/usr/lib/X11/config/Project.tmpl"
++#include "/usr/lib64/X11/config/Project.tmpl"
+ #endif	/* Linux || *BSD */
+ #endif	/* Sun & SVR4 */
+ 
+@@ -53,20 +53,23 @@ XCOMM ----------------------------------
+ #define BinDir Concat(ProjectRoot,/bin)
+ #else
+ #if ((defined LINUX) || (defined FREEBSD)
+-#define BinDir /usr/X11R6/bin
++#define BinDir /usr/bin
+ #else
+-#define BinDir /usr/bin/X11
++#define BinDir /usr/bin
+ #endif /* LINUX || FREEBSD */
+ #endif /* ProjectRoot */
+ #endif /* BinDir */
+ #ifndef BuildIncRoot
+ #define BuildIncRoot $(TOP)
+ #endif
++#ifndef IncRoot
++#define IncRoot /usr/include
++#endif
+ #ifndef BuildIncTop
+ #define BuildIncTop ..		/* relative to $(TOP)/X11 */
+ #endif
+ #ifndef LibDir
+-#define LibDir $(USRLIBDIR)/X11
++#define LibDir $(USRLIBDIR)
+ #endif
+ #ifndef ConfigDir
+ #define ConfigDir $(LIBDIR)/config
+@@ -502,6 +505,10 @@ install:: list								@@\
+ #define WnnOwner	wnn
+ #endif
+ 
++#ifndef InstallHeader
++#define InstallHeader YES
++#endif
++
+ #ifndef ImTop
+ /*
+ #define ImTop	$(CONTRIBSRC)/im/Xsi
+@@ -510,7 +517,7 @@ install:: list								@@\
+ #endif
+ 
+ #ifndef WnnWnnDir
+-#define WnnWnnDir	/usr/lib/wnn7
++#define WnnWnnDir	/var/lib/wnn7
+ #endif
+ 
+ #ifndef WnnEtcDir
+@@ -518,7 +525,7 @@ install:: list								@@\
+ #endif /* WnnEtcDir */
+ 
+ #ifndef WnnBinDir
+-#define WnnBinDir	/usr/local/bin
++#define WnnBinDir	/usr/bin
+ #endif
+ 
+ #ifndef WnnIncDir
+@@ -542,7 +549,7 @@ install:: list								@@\
+       WNNWNNDIR = WnnWnnDir
+       WNNETCDIR = WnnEtcDir
+       WNNBINDIR = WnnBinDir
+-      WNNINCDIR = WnnIncRoot
++      WNNINCDIR = IncRoot
+       WNNLIBDIR = WnnLibDir
+       WNNVARDIR = WnnVarDir
+     WNNSHAREDIR = WnnShareDir
+@@ -556,7 +563,7 @@ install:: list								@@\
+      JWNNWNNDIR = $(WNNWNNDIR)/ja_JP
+      JWNNBINDIR = $(WNNBINDIR)/Wnn7
+ 
+-     JWNNINCDIR = $(WNNINCDIR)/wnn
++     JWNNINCDIR = $(WNNINCDIR)/wnn7
+      JWNNDICDIR = $(JWNNWNNDIR)/dic
+   JWNNPUBDICDIR = $(JWNNDICDIR)/pubdic
+ JWNNWNNCONSDICDIR = $(JWNNDICDIR)/wnncons
+@@ -583,7 +590,7 @@ WNNWNNCONSDICSRC = $(WNNWNNCONSSRC)/dic
+    WNNCNVFILEDIR = $(WNNJDSRC)/cvtfileDir
+     WNNINCLUDES = -I$(WNNINCLUDESRC) -I$(WNNROMKANMSRC)
+      WNNDEFINES = -DLIBDIR=\"$(WNNWNNDIR)\" -DETCDIR=\"$(WNNETCDIR)\" -DVARDIR=\"$(WNNVARDIR)\" -DSHAREDIR=\"$(WNNSHAREDIR)\"
+-        WNNJLIB = $(WNNJLIBSRC)/libwnn7_fromsrc.a
++        WNNJLIB = $(WNNJLIBSRC)/libwnn7.a
+      WNNCONVLIB = $(WNNCONVSRC)/libconvkey.a
+    WNNYOSOKULIB = $(WNNYOSOKUSRC)/libyosoku.a
+  WNNKANAFURILIB = $(WNNKANAFURISRC)/libkanafuri.a
+--- Wnn7-SDK-1.0/src/config/X11.tmpl.orig	2001-10-17 03:37:18.000000000 +0200
++++ Wnn7-SDK-1.0/src/config/X11.tmpl	2016-04-11 22:05:19.866702834 +0200
+@@ -6,9 +6,9 @@ XCOMM ----------------------------------
+ #include "/usr/openwin/lib/config/Project.tmpl"
+ #else	/* Sun & SVR4 */
+ #if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(NetBSDArchitecture) || defined(OpenBSDArchitecture) || defined(BSD386Architecture)
+-#include "/usr/X11R6/lib/X11/config/X11.tmpl"
++#include "/usr/lib64/X11/config/X11.tmpl"
+ #else	/* Linux || *BSD */
+-#include "/usr/lib/X11/config/Project.tmpl"
++#include "/usr/lib64/X11/config/Project.tmpl"
+ #endif	/* Linux || *BSD */
+ #endif	/* Sun & SVR4 */
+ 
+@@ -53,20 +53,23 @@ XCOMM ----------------------------------
+ #define BinDir Concat(ProjectRoot,/bin)
+ #else
+ #if ((defined LINUX) || (defined FREEBSD)
+-#define BinDir /usr/X11R6/bin
++#define BinDir /usr/bin
+ #else
+-#define BinDir /usr/bin/X11
++#define BinDir /usr/bin
+ #endif /* LINUX || FREEBSD */
+ #endif /* ProjectRoot */
+ #endif /* BinDir */
+ #ifndef BuildIncRoot
+ #define BuildIncRoot $(TOP)
+ #endif
++#ifndef IncRoot
++#define IncRoot /usr/include
++#endif
+ #ifndef BuildIncTop
+ #define BuildIncTop ..		/* relative to $(TOP)/X11 */
+ #endif
+ #ifndef LibDir
+-#define LibDir $(USRLIBDIR)/X11
++#define LibDir $(USRLIBDIR)
+ #endif
+ #ifndef ConfigDir
+ #define ConfigDir $(LIBDIR)/config
+@@ -502,6 +505,10 @@ install:: list								@@\
+ #define WnnOwner	wnn
+ #endif
+ 
++#ifndef InstallHeader
++#define InstallHeader YES
++#endif
++
+ #ifndef ImTop
+ /*
+ #define ImTop	$(CONTRIBSRC)/im/Xsi
+@@ -510,7 +517,7 @@ install:: list								@@\
+ #endif
+ 
+ #ifndef WnnWnnDir
+-#define WnnWnnDir	/usr/lib/wnn7
++#define WnnWnnDir	/var/lib/wnn7
+ #endif
+ 
+ #ifndef WnnEtcDir
+@@ -518,7 +525,7 @@ install:: list								@@\
+ #endif /* WnnEtcDir */
+ 
+ #ifndef WnnBinDir
+-#define WnnBinDir	/usr/local/bin
++#define WnnBinDir	/usr/bin
+ #endif
+ 
+ #ifndef WnnIncDir
+@@ -542,7 +549,7 @@ install:: list								@@\
+       WNNWNNDIR = WnnWnnDir
+       WNNETCDIR = WnnEtcDir
+       WNNBINDIR = WnnBinDir
+-      WNNINCDIR = WnnIncRoot
++      WNNINCDIR = IncRoot
+       WNNLIBDIR = WnnLibDir
+       WNNVARDIR = WnnVarDir
+     WNNSHAREDIR = WnnShareDir
+@@ -556,7 +563,7 @@ install:: list								@@\
+      JWNNWNNDIR = $(WNNWNNDIR)/ja_JP
+      JWNNBINDIR = $(WNNBINDIR)/Wnn7
+ 
+-     JWNNINCDIR = $(WNNINCDIR)/wnn
++     JWNNINCDIR = $(WNNINCDIR)/wnn7
+      JWNNDICDIR = $(JWNNWNNDIR)/dic
+   JWNNPUBDICDIR = $(JWNNDICDIR)/pubdic
+ JWNNWNNCONSDICDIR = $(JWNNDICDIR)/wnncons
+@@ -583,7 +590,7 @@ WNNWNNCONSDICSRC = $(WNNWNNCONSSRC)/dic
+    WNNCNVFILEDIR = $(WNNJDSRC)/cvtfileDir
+     WNNINCLUDES = -I$(WNNINCLUDESRC) -I$(WNNROMKANMSRC)
+      WNNDEFINES = -DLIBDIR=\"$(WNNWNNDIR)\" -DETCDIR=\"$(WNNETCDIR)\" -DVARDIR=\"$(WNNVARDIR)\" -DSHAREDIR=\"$(WNNSHAREDIR)\"
+-        WNNJLIB = $(WNNJLIBSRC)/libwnn7_fromsrc.a
++        WNNJLIB = $(WNNJLIBSRC)/libwnn7.a
+      WNNCONVLIB = $(WNNCONVSRC)/libconvkey.a
+    WNNYOSOKULIB = $(WNNYOSOKUSRC)/libyosoku.a
+  WNNKANAFURILIB = $(WNNKANAFURISRC)/libkanafuri.a
+--- Wnn7-SDK-1.0/src/Makefile.ini.orig	2001-10-17 03:37:18.000000000 +0200
++++ Wnn7-SDK-1.0/src/Makefile.ini	2016-04-10 22:13:18.310308621 +0200
+@@ -15,7 +15,7 @@
+              MAKE = make
+ #       CONFIGSRC = /usr/lib/X11/config
+ #       CONFIGSRC = /usr/openwin/lib/X11/config
+-        CONFIGSRC = /usr/X11R6/lib/X11/config
++        CONFIGSRC = /usr/lib64/X11/config
+          IMAKESRC = $(CONFIGSRC)
+          IRULESRC = $(CONFIGSRC)
+           WSFLAGS = 
diff --git a/Wnn7-SDK-header.patch b/Wnn7-SDK-header.patch
new file mode 100644
index 0000000..1e241a3
--- /dev/null
+++ b/Wnn7-SDK-header.patch
@@ -0,0 +1,97 @@
+--- Wnn7-SDK-1.0/src/Wnn/jlib/js.c.orig	2001-10-17 03:37:17.000000000 +0200
++++ Wnn7-SDK-1.0/src/Wnn/jlib/js.c	2016-04-11 15:49:50.440981639 +0200
+@@ -159,9 +159,8 @@
+ */
+ 
+ 
+-extern	char	*malloc();
+-
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <ctype.h>
+ #ifdef UX386
+ #include <X11/Xos.h>
+@@ -199,8 +198,6 @@
+ #include "../etc/pwd.c"
+ 
+ 
+-char *malloc();
+-
+ typedef struct _host_address {
+ 	int address_len;
+ 	char *address;
+--- Wnn7-SDK-1.0/src/Wnn/etc/bdic.c.orig	2001-10-17 03:37:17.000000000 +0200
++++ Wnn7-SDK-1.0/src/Wnn/etc/bdic.c	2016-04-11 16:34:07.077536815 +0200
+@@ -370,6 +370,17 @@
+ void put_short(), output_file_uniq(), new_pwd();
+ #endif /* BDIC_WRITE_CHECK */
+ 
++#ifdef WNN_CHECK_INODE
++static
++#else
++#ifdef JS
++static
++#else
++extern
++#endif
++#endif
++int change_file_uniq1();
++
+ #ifdef BDIC_WRITE_CHECK
+ static int
+ vputc(c, fp)
+--- Wnn7-SDK-1.0/src/Wnn/jlib/jl.c.orig	2001-10-17 03:37:17.000000000 +0200
++++ Wnn7-SDK-1.0/src/Wnn/jlib/jl.c	2016-04-11 17:11:09.070776902 +0200
+@@ -143,6 +143,7 @@
+ #include "commonhd.h"
+ #include "config.h"
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <sys/types.h>
+ #ifdef SYSVR2
+ #   include <string.h>
+@@ -559,6 +560,7 @@
+ }
+ 
+ 
++static void jl_disconnect_if_server_dead_body_by_jsid();
+ 
+ static struct wnn_env *
+ jl_connect_lang_core(env_n, server_n, lang, wnnrc_n,
+@@ -568,7 +570,6 @@
+ int  (*error_handler)(), (*message_handler)();
+ int timeout;
+ {
+-	extern void jl_disconnect_if_server_dead_body_by_jsid();
+ 	register WNN_JSERVER_ID	*js = NULL;
+ 	struct wnn_env_int *env;
+ 	int env_exist, cnt;
+--- Wnn7-SDK-1.0/src/Wnn/etc/msg.c.orig	2001-10-17 03:37:17.000000000 +0200
++++ Wnn7-SDK-1.0/src/Wnn/etc/msg.c	2016-04-12 16:32:52.427247417 +0200
+@@ -148,6 +148,8 @@
+ 	    <message id>\t<message>
+ */
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+ #include "commonhd.h"
+ #include "config.h"
+ #include "dslib.h"
+@@ -158,7 +158,7 @@
+ 
+ 
+ static char *
+-bsearch(ky, bs, nel, width, compar)
++wnn_bsearch(ky, bs, nel, width, compar)
+ char *ky;
+ char *bs;
+ unsigned long nel;
+@@ -246,7 +246,7 @@
+ 		return(NULL);
+ 	if (cd->msg_bd == 0 || cd->msg_cnt == 0)
+ 		return(NULL);
+-	bd = (struct msg_bd *)bsearch(id, cd->msg_bd, cd->msg_cnt,
++	bd = (struct msg_bd *)wnn_bsearch(id, cd->msg_bd, cd->msg_cnt,
+ 		sizeof(struct msg_bd), _search);
+ 	if (bd == NULL)
+ 		return(NULL);
diff --git a/Wnn7-SDK-incl.patch b/Wnn7-SDK-incl.patch
new file mode 100644
index 0000000..6515a67
--- /dev/null
+++ b/Wnn7-SDK-incl.patch
@@ -0,0 +1,11 @@
+--- Wnn7-SDK-1.0/src/Wnn/Imakefile.orig	2001-10-17 03:37:18.000000000 +0200
++++ Wnn7-SDK-1.0/src/Wnn/Imakefile	2016-04-10 22:15:03.826970858 +0200
+@@ -7,7 +7,7 @@
+ 
+ #if BuildJlib
+ JLIBDIR = romkan jlib
+-SUBDIRS = $(JLIBDIR)
++SUBDIRS = $(JLIBDIR) include
+ #endif
+ 
+ MakeSubdirs($(SUBDIRS))
diff --git a/Wnn7-SDK-nonroot.patch b/Wnn7-SDK-nonroot.patch
new file mode 100644
index 0000000..b238647
--- /dev/null
+++ b/Wnn7-SDK-nonroot.patch
@@ -0,0 +1,11 @@
+--- Wnn7-SDK-1.0/src/config/X11.tmpl.orig	2016-04-10 22:05:08.883662495 +0200
++++ Wnn7-SDK-1.0/src/config/X11.tmpl	2016-04-10 22:20:48.266956404 +0200
+@@ -422,7 +422,7 @@
+ #undef MakeDir
+ #endif
+ #define MakeDir(dir) DirFailPrefix at if [ -d dir ]; then set +x; \	@@\
+-	else (set -x; $(MKDIRHIER) dir; chown $(WNNOWNER) dir); fi
++	else (set -x; $(MKDIRHIER) dir); fi
+ 
+ #ifdef MakeDirectory
+ #undef MakeDirectory
diff --git a/Wnn7-SDK-shared.patch b/Wnn7-SDK-shared.patch
new file mode 100644
index 0000000..c991665
--- /dev/null
+++ b/Wnn7-SDK-shared.patch
@@ -0,0 +1,46 @@
+--- Wnn7-SDK-1.0/src/Wnn/jlib/Imakefile.orig	2001-10-17 03:37:17.000000000 +0200
++++ Wnn7-SDK-1.0/src/Wnn/jlib/Imakefile	2016-04-10 22:16:52.493632965 +0200
+@@ -60,9 +60,9 @@
+ 
+ LibraryObjectRule()
+ #if DoSharedLib
+-AllTarget($(OBJS) libwnn.a libwnn.so.$(SOWNN7LIBREV))
++AllTarget($(OBJS) libwnn7.a libwnn7.so.$(SOWNN7LIBREV))
+ #else
+-AllTarget($(OBJS) libwnn.a)
++AllTarget($(OBJS) libwnn7.a)
+ #endif
+ 
+ 
+@@ -75,10 +75,10 @@
+ SingleProgramTarget(kankana,kankana.o,$(WNNJLIB),)
+ 
+ #if DoSharedLib
+-SharedLibraryTarget(wnn,$(SOWNN7LIBREV),$(OBJS),.,.)
++SharedLibraryTarget(wnn7,$(SOWNN7LIBREV),$(OBJS),.,.)
+ #endif
+-UnsharedLibraryTarget(wnn,$(UNSHAREDOBJS),unshared,..)
+-LintLibraryTarget(wnn,$(SRCS))
++UnsharedLibraryTarget(wnn7,$(UNSHAREDOBJS),unshared,..)
++LintLibraryTarget(wnn7,$(SRCS))
+ 
+ 
+ 
+@@ -85,13 +85,13 @@
+ instlib:: install
+ 
+ #if DoSharedLib
+-InstallSharedLibrary(wnn,$(SOWNN7LIBREV),$(WNNLIBDIR))
++InstallSharedLibrary(wnn7,$(SOWNN7LIBREV),$(WNNLIBDIR))
+ #endif
+-InstallLibrary(wnn,$(WNNLIBDIR))
++InstallLibrary(wnn7,$(WNNLIBDIR))
+ 
+ #if ProfileLibJlib
+-ProfiledLibraryTarget(wnn,$(OBJS))
+-InstallLibrary(wnn_p,$(WNNLIBDIR))
++ProfiledLibraryTarget(wnn7,$(OBJS))
++InstallLibrary(wnn7_p,$(WNNLIBDIR))
+ #endif
+ 
+ #if DoSharedLib
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/Wnn7-SDK.git/commitdiff/5ff70d8b4efc21b06486635b128013a02e438a05



More information about the pld-cvs-commit mailing list