[packages/inchi] - updated to 1.05 - updated rpm patch

qboosh qboosh at pld-linux.org
Thu Jun 22 18:01:50 CEST 2017


commit 28bcb081e3a810cc94d8f17335dc51795f380c51
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Jun 22 18:03:09 2017 +0200

    - updated to 1.05
    - updated rpm patch

 inchi-rpm.patch | 179 ++++++++++++++++++++++++++++++++++++++++++++++++--------
 inchi.spec      |  57 ++++++++++--------
 2 files changed, 190 insertions(+), 46 deletions(-)
---
diff --git a/inchi.spec b/inchi.spec
index 1f8ba18..b8e1ee2 100644
--- a/inchi.spec
+++ b/inchi.spec
@@ -2,23 +2,24 @@
 # Conditional build:
 %bcond_without	tests		# build without tests
 
-%define inchi_so_ver 1.04.00
-%define url_ver 1.04
+%define inchi_so_ver 1.05.00
+%define url_ver 105
 Summary:	The IUPAC International Chemical Identifier library
 Summary(pl.UTF-8):	Biblioteka międzynarodowych identyfikatorów chemicznych IUPAC
 Name:		inchi
-Version:	1.0.4
-Release:	2
+Version:	1.05
+Release:	1
 License:	LGPL v2+
 Group:		Libraries
-Source0:	http://www.inchi-trust.org/fileadmin/user_upload/software/inchi-v%{url_ver}/INCHI-1-API.ZIP
-# Source0-md5:	8447bf108af12fe66eecba41bbc89918
-Source1:	http://www.inchi-trust.org/fileadmin/user_upload/software/inchi-v%{url_ver}/INCHI-1-DOC.ZIP
-# Source1-md5:	4b438cc7da7472577307a2063414c973
-Source2:	http://www.inchi-trust.org/fileadmin/user_upload/software/inchi-v%{url_ver}/INCHI-1-TEST.ZIP
-# Source2-md5:	8176b5e0e24c6aad78c522265378362e
+#Source0Download: http://www.inchi-trust.org/downloads/
+Source0:	http://www.inchi-trust.org/download/%{url_ver}/INCHI-1-SRC.zip
+# Source0-md5:	ccc497c7e6ced1521a6953d859e49af4
+Source1:	http://www.inchi-trust.org/download/%{url_ver}/INCHI-1-DOC.zip
+# Source1-md5:	7e40a7f8c0048dc2c63fd5a590a256df
+Source2:	http://www.inchi-trust.org/download/%{url_ver}/INCHI-1-TEST.zip
+# Source2-md5:	96800539d586f115b47baf245a8abdf3
 Patch0:		%{name}-rpm.patch
-URL:		http://www.inchi-trust.org/?q=node/14
+URL:		http://www.inchi-trust.org/
 BuildRequires:	dos2unix
 BuildRequires:	sed >= 4.0
 BuildRequires:	unzip
@@ -98,31 +99,38 @@ Ten pakiet zawiera dokumentację użytkownika do oprogramowania InChI
 oraz dokumentację API biblioteki InChI dla programistów.
 
 %prep
-%setup -q -n INCHI-1-API -a 1 -a 2
+%setup -q -n INCHI-1-SRC -a 1 -a 2
 %patch0 -p1
 
-%{__sed} -i -e 's,gcc,$(CC),' INCHI_API/gcc_so_makefile/makefile
-
-rm INCHI_API/gcc_so_makefile/result/{libinchi,inchi}*
-for file in INCHI_API/inchi_dll/inchi_api.h LICENCE readme.txt ; do
+for file in LICENCE readme.txt ; do
 	dos2unix -k $file
 done
 
 cd INCHI-1-TEST/test
 unzip -d reference -qq -a InChI_TestSet-result.zip
-sed -i -e 's,./inchi-1,../../INCHI_API/gcc_so_makefile/result/inchi_main,g' TestSet2InChI.sh
+for file in reference/its-*.txt ; do
+	dos2unix $file
+done
+%{__sed} -i -e 's,./inchi-1,../../INCHI_EXE/bin/Linux/inchi-1,g' TestSet2InChI.sh
 
 %build
-%{__make} -C INCHI_API/gcc_so_makefile \
+for project in libinchi demos/inchi_main demos/mol2inchi ; do
+%{__make} -C INCHI_API/${project}/gcc \
 	ISLINUX=1 \
 	CC="%{__cc}" \
 	OPTFLAGS="%{rpmcflags}"
+done
+
+%{__make} -C INCHI_EXE/inchi-1/gcc \
+	C_COMPILER="%{__cc}" \
+	LINKER="%{__cc}" \
+	OPTFLAGS="%{rpmcflags}"
 
 %if %{with tests}
-export LD_LIBRARY_PATH=$(pwd)/INCHI_API/gcc_so_makefile/result/
+export LD_LIBRARY_PATH=$(pwd)/INCHI_API/bin/Linux
 cd INCHI-1-TEST/test
 sh ./TestSet2InChI.sh
-for t in InChI_TestSet*.txt; do
+for t in its-*.txt; do
 	cmp $t reference/$t
 done
 %endif
@@ -130,11 +138,13 @@ done
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/inchi}
-install -pm 755 INCHI_API/gcc_so_makefile/result/inchi_main $RPM_BUILD_ROOT%{_bindir}/inchi-1
-install -p INCHI_API/gcc_so_makefile/result/libinchi.so.%{inchi_so_ver} $RPM_BUILD_ROOT%{_libdir}
+
+install -p INCHI_EXE/bin/Linux/inchi-1 $RPM_BUILD_ROOT%{_bindir}
+install -p INCHI_API/bin/Linux/mol2inchi $RPM_BUILD_ROOT%{_bindir}
+install -p INCHI_API/bin/Linux/libinchi.so.%{inchi_so_ver} $RPM_BUILD_ROOT%{_libdir}
 ln -s libinchi.so.%{inchi_so_ver} $RPM_BUILD_ROOT%{_libdir}/libinchi.so.1
 ln -s libinchi.so.1 $RPM_BUILD_ROOT%{_libdir}/libinchi.so
-install -pm644 INCHI_API/inchi_dll/inchi_api.h $RPM_BUILD_ROOT%{_includedir}/inchi
+cp -p INCHI_BASE/src/{inchi_api,ixa}.h $RPM_BUILD_ROOT%{_includedir}/inchi
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -145,6 +155,7 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/inchi-1
+%attr(755,root,root) %{_bindir}/mol2inchi
 
 %files libs
 %defattr(644,root,root,755)
diff --git a/inchi-rpm.patch b/inchi-rpm.patch
index c727b0d..d7445f6 100644
--- a/inchi-rpm.patch
+++ b/inchi-rpm.patch
@@ -1,30 +1,163 @@
-diff -up INCHI-1-API/INCHI_API/gcc_so_makefile/makefile.r INCHI-1-API/INCHI_API/gcc_so_makefile/makefile
---- INCHI-1-API/INCHI_API/gcc_so_makefile/makefile.r	2011-08-03 15:45:06.000000000 +0200
-+++ INCHI-1-API/INCHI_API/gcc_so_makefile/makefile	2014-05-02 01:42:47.322481085 +0200
-@@ -62,7 +62,7 @@ endif
+--- INCHI-1-SRC/INCHI_API/libinchi/gcc/makefile.orig	2017-06-21 19:51:24.162061661 +0200
++++ INCHI-1-SRC/INCHI_API/libinchi/gcc/makefile	2017-06-21 19:53:20.892060327 +0200
+@@ -38,14 +38,14 @@
+ API_CALLER_PATHNAME = $(LIB_DIR)/$(API_CALLER_NAME)
+ # === Linker to create (Shared) InChI library ====
+ ifndef SHARED_LINK
+-  SHARED_LINK = gcc -shared
++  SHARED_LINK = $(CC) -shared
+ endif
+ # === Linker to create Main program =====
  ifndef LINKER
-   ifndef windir
    ifdef ISLINUX
--     LINKER_CWD_PATH = -Wl,-R,""
-+     LINKER_CWD_PATH = 
+-	 LINKER_CWD_PATH = -Wl,-R,""
++	 LINKER_CWD_PATH =
    endif
+-  LINKER = gcc -s $(LINKER_CWD_PATH)
++  LINKER = $(CC) $(LINKER_CWD_PATH)
+ endif
+ ifndef P_LIBR
+ 	P_LIBR = ../../libinchi/src/
+@@ -65,14 +65,14 @@
+ endif
+ # === C Compiler ===============
+ ifndef C_COMPILER
+-  C_COMPILER = gcc
++  C_COMPILER = $(CC)
+ endif
+ # === C Compiler Options =======
+ ifndef C_OPTIONS
+   ifndef CALLER_IS_MOL2INCHI
+-	C_OPTIONS = -ansi -O3 -c
++	C_OPTIONS = -ansi $(OPTFLAGS) -c
+   else
+-	C_OPTIONS = -O3 -c  
++	C_OPTIONS = $(OPTFLAGS) -c  
    endif
-   LINKER = gcc -s $(LINKER_CWD_PATH)
-@@ -84,7 +84,7 @@ endif
- 
+   ifdef ISLINUX
+ 	ifndef C_SO_OPTIONS
+--- INCHI-1-SRC/INCHI_API/demos/inchi_main/gcc/makefile.orig	2017-01-17 14:40:34.000000000 +0100
++++ INCHI-1-SRC/INCHI_API/demos/inchi_main/gcc/makefile	2017-06-21 21:00:25.642014371 +0200
+@@ -30,22 +30,22 @@
+ # === Main program name ====
+ ifndef API_CALLER_NAME
+   ifndef CALLER_IS_MOL2INCHI 
+-  API_CALLER_NAME = inchi_main$
++  API_CALLER_NAME = inchi_main
+   else
+-  API_CALLER_NAME = mol2inchi$
++  API_CALLER_NAME = mol2inchi
+   endif
+ endif
+ API_CALLER_PATHNAME = $(LIB_DIR)/$(API_CALLER_NAME)
+ # === Linker to create (Shared) InChI library ====
+ ifndef SHARED_LINK
+-  SHARED_LINK = gcc -shared
++  SHARED_LINK = $(CC) -shared
+ endif
+ # === Linker to create Main program =====
+ ifndef LINKER
+   ifdef ISLINUX
+-	 LINKER_CWD_PATH = -Wl,-R,""
++	 LINKER_CWD_PATH =
+   endif
+-  LINKER = gcc -s $(LINKER_CWD_PATH)
++  LINKER = $(CC) $(LINKER_CWD_PATH)
+ endif
+ ifndef P_LIBR
+ 	P_LIBR = ../../../libinchi/src/
+@@ -65,14 +65,14 @@
+ endif
+ # === C Compiler ===============
+ ifndef C_COMPILER
+-  C_COMPILER = gcc
++  C_COMPILER = $(CC)
+ endif
  # === C Compiler Options =======
  ifndef C_OPTIONS
--  C_OPTIONS = -ansi -O3 -c
-+  C_OPTIONS = -ansi $(OPTFLAGS) -c
-   ifndef windir
+   ifndef CALLER_IS_MOL2INCHI
+-	C_OPTIONS = -ansi -O3 -c
++	C_OPTIONS = -ansi $(OPTFLAGS) -c
+   else
+-	C_OPTIONS = -O3 -c  
++	C_OPTIONS = $(OPTFLAGS) -c  
+   endif
    ifdef ISLINUX
-     ifndef C_SO_OPTIONS
-@@ -213,7 +213,7 @@ $(INCHI_LIB_PATHNAME).so$(VERSION): $(IN
- 	$(SHARED_LINK) $(SHARED_LINK_PARM) -o \
-   $(INCHI_LIB_PATHNAME).so$(VERSION) \
-   $(INCHI_LIB_OBJS) \
--  -Wl$(LINUX_MAP)$(LINUX_Z_RELRO),-soname,$(INCHI_LIB_NAME).so$(MAIN_VERSION)
-+  -Wl$(LINUX_MAP)$(LINUX_Z_RELRO),-soname,$(INCHI_LIB_NAME).so$(MAIN_VERSION) -lm
- 	ln -fs $(INCHI_LIB_NAME).so$(VERSION) \
-   $(INCHI_LIB_PATHNAME).so$(MAIN_VERSION)
- 
+ 	ifndef C_SO_OPTIONS
+--- INCHI-1-SRC/INCHI_API/demos/mol2inchi/gcc/makefile.orig	2017-01-17 14:40:34.000000000 +0100
++++ INCHI-1-SRC/INCHI_API/demos/mol2inchi/gcc/makefile	2017-06-21 21:01:20.392013745 +0200
+@@ -30,22 +30,22 @@
+ # === Main program name ====
+ ifndef API_CALLER_NAME
+   ifndef CALLER_IS_MOL2INCHI 
+-  API_CALLER_NAME = inchi_main$
++  API_CALLER_NAME = inchi_main
+   else
+-  API_CALLER_NAME = mol2inchi$
++  API_CALLER_NAME = mol2inchi
+   endif
+ endif
+ API_CALLER_PATHNAME = $(LIB_DIR)/$(API_CALLER_NAME)
+ # === Linker to create (Shared) InChI library ====
+ ifndef SHARED_LINK
+-  SHARED_LINK = gcc -shared
++  SHARED_LINK = $(CC) -shared
+ endif
+ # === Linker to create Main program =====
+ ifndef LINKER
+   ifdef ISLINUX
+-	 LINKER_CWD_PATH = -Wl,-R,""
++	 LINKER_CWD_PATH =
+   endif
+-  LINKER = gcc -s $(LINKER_CWD_PATH)
++  LINKER = $(CC) $(LINKER_CWD_PATH)
+ endif
+ ifndef P_LIBR
+ 	P_LIBR = ../../../libinchi/src/
+@@ -65,14 +65,14 @@
+ endif
+ # === C Compiler ===============
+ ifndef C_COMPILER
+-  C_COMPILER = gcc
++  C_COMPILER = $(CC)
+ endif
+ # === C Compiler Options =======
+ ifndef C_OPTIONS
+   ifndef CALLER_IS_MOL2INCHI
+-	C_OPTIONS = -ansi -O3 -c
++	C_OPTIONS = -ansi $(OPTFLAGS) -c
+   else
+-	C_OPTIONS = -O3 -c
++	C_OPTIONS = $(OPTFLAGS) -c
+   endif
+   ifdef ISLINUX
+ 	ifndef C_SO_OPTIONS
+--- INCHI-1-SRC/INCHI_EXE/inchi-1/gcc/makefile.orig	2016-09-08 19:08:16.000000000 +0200
++++ INCHI-1-SRC/INCHI_EXE/inchi-1/gcc/makefile	2017-06-22 16:03:35.017897870 +0200
+@@ -13,7 +13,7 @@
+ 	CPP_COMPILER = g++
+ endif
+ ifndef LINKER
+-	LINKER = g++ -s
++	LINKER = $(C_COMPILER)
+ endif
+ ifndef INCHI_EXECUTABLE_NAME
+ 	ifdef windir
+@@ -36,14 +36,14 @@
+ endif
+ #P_INCL = -I$(P_MAIN) -I$(P_BASE)
+ P_INCL = -I$(P_MAIN) -I$(P_BASE)
+-C_COMPILER_OPTIONS = $(P_INCL) -ansi -DCOMPILE_ANSI_ONLY -DTARGET_EXE_STANDALONE -O3 -c
++C_COMPILER_OPTIONS = $(P_INCL) -ansi -DCOMPILE_ANSI_ONLY -DTARGET_EXE_STANDALONE $(OPTLAGS) -c
+ #C_COMPILER_OPTIONS = -c $(P_INCL) -ansi -O3 -fsigned-char -ffunction-sections -fexpensive-optimizations -fstack-check -fexceptions -Wall -pedantic -Wbad-function-cast -Wreturn-type -Wformat -Wuninitialized -Wcast-align -Wshadow -Wunused -Wunused-value -Wunused-variable -Wunused-function -Wunused-parameter -Wunused-label -Wcomment -Wcast-qual -Wconversion -Wimplicit-int -Wmissing-braces -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wsign-compare -Wfloat-equal -Wstrict-prototypes -Wwrite-strings -Wundef -Waggregate-return -Wchar-subscripts -Wformat-nonliteral -Wnested-externs -Wsequence-point -Wpointer-arith -mfancy-math-387 -mieee-fp -mno-soft-float
+ ifdef windir
+ # no -ansi option due to reported MinGw bug
+-	CPP_COMPILER_OPTIONS = $(P_INCL) -D_LIB -DTARGET_EXE_STANDALONE -O3 -frtti -c
++	CPP_COMPILER_OPTIONS = $(P_INCL) -D_LIB -DTARGET_EXE_STANDALONE $(OPTLAGS) -frtti -c
+ 	#CPP_COMPILER_OPTIONS = -c $(P_INCL) -D_LIB -O3 -frtti -Wall -pedantic -Wreturn-type -Wformat -Wuninitialized -ffunction-sections -fexpensive-optimizations -fstack-check -fexceptions -Wcast-align -Wshadow -Wunused -Wunused-value -Wunused-variable -Wunused-function -fsigned-char -Wcast-qual -Wconversion -Wmissing-braces -Wredundant-decls -Wsign-compare -Wfloat-equal -Wwrite-strings -mfancy-math-387 -mieee-fp -mno-soft-float
+ else
+-	CPP_COMPILER_OPTIONS = $(P_INCL) -D_LIB -DTARGET_EXE_STANDALONE -ansi -O3 -frtti -c
++	CPP_COMPILER_OPTIONS = $(P_INCL) -D_LIB -DTARGET_EXE_STANDALONE -ansi $(OPTLAGS) -frtti -c
+ 	#CPP_COMPILER_OPTIONS = -c $(P_INCL) -D_LIB -ansi -O3 -frtti -Wall -pedantic -Wreturn-type -Wformat -Wuninitialized -ffunction-sections -fexpensive-optimizations -fstack-check -fexceptions -Wcast-align -Wshadow -Wunused -Wunused-value -Wunused-variable -Wunused-function -fsigned-char -Wcast-qual -Wconversion -Wmissing-braces -Wredundant-decls -Wsign-compare -Wfloat-equal -Wwrite-strings -mfancy-math-387 -mieee-fp -mno-soft-float
+ endif
+ #LINKER_OPTIONS = -static-libgcc
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/inchi.git/commitdiff/28bcb081e3a810cc94d8f17335dc51795f380c51



More information about the pld-cvs-commit mailing list