Browse Source

update: gprolog

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@3753 ec354946-7b23-47d6-9f5a-488ba84defc7
inagaki 13 years ago
parent
commit
28f47722a8
1 changed files with 66 additions and 27 deletions
  1. 66 27
      g/gprolog/gprolog-vl.spec

+ 66 - 27
g/gprolog/gprolog-vl.spec

@@ -2,31 +2,37 @@ Summary: GNU Prolog is a free Prolog compiler with constraint solving over Finit
 Summary(ja): GNU Prolog: 有限領域の制約解決に適したフリーな Prolog コンパイラ
 Name: gprolog
 Version: 1.3.1
-Release: 1%{?_dist_release}
-License: GPL
+Release: 2%{?_dist_release}
+
+License: GPLv2
 Group: Development/Languages
-Source: ftp://ftp.inria.fr/Projects/loco/%{name}/%{name}-%{version}.tar.gz
 URL: http://gprolog.inria.fr/
+
+Source: ftp://ftp.inria.fr/Projects/loco/%{name}/%{name}-%{version}.tar.gz
+
+Buildroot: %{_tmppath}/%{name}-%{version}-root
+BuildRequires: sed
+
 Vendor: Project Vine
 Distribution: Vine Linux
-Buildroot: %{_tmppath}/%{name}-%{version}-root
 
-%description 
+Packager: inagaki
 
-   GNU Prolog is a native Prolog compiler with constraint solving over finite
-   domains (FD) developed by Daniel Diaz (http://loco.inria.fr/~diaz).
+%description 
+GNU Prolog is a native Prolog compiler with constraint solving over finite
+domains (FD) developed by Daniel Diaz (http://loco.inria.fr/~diaz).
 
-   GNU Prolog is a very efficient native compiler producing (small) stand-alone
-   executables. GNU-Prolog also offers a classical top-level+debugger.
+GNU Prolog is a very efficient native compiler producing (small) stand-alone
+executables. GNU-Prolog also offers a classical top-level+debugger.
 
-   GNU Prolog conforms to the ISO standard for Prolog but also includes a lot 
-   of extensions (global variables, DCG, sockets, OS interface,...).
+GNU Prolog conforms to the ISO standard for Prolog but also includes a lot 
+of extensions (global variables, DCG, sockets, OS interface,...).
 
-   GNU Prolog also includes a powerful constraint solver over finite domains 
-   with many predefined constraints+heuristics.
+GNU Prolog also includes a powerful constraint solver over finite domains 
+with many predefined constraints+heuristics.
 
-   More information can be found at http://www.gnu.org/software/prolog
-   or better at http://gprolog.inria.fr.
+More information can be found at http://www.gnu.org/software/prolog
+or better at http://gprolog.inria.fr.
 
 %description -l ja
 GNU Prolog は有限領域 (FD) の制約解決に適したネイティブ Prolog コンパイラで、
@@ -45,15 +51,35 @@ GNU Prolog は多くの定義済の制約条件と発見的手法を用いて、
 
 %build
 cd src
+
+# gprolog only acccept -O0 and don't like -fomit-frame-pointer
+
+CFLG="$(echo $RPM_OPT_FLAGS | sed -s "s/\-O2/-O1/g" \
+     		    | sed -e "s/\-fomit-frame-pointer//")"
+
+# Based on a gentoo ebuild (??)
+CFLG="$CFLG -funsigned-char"
+
 ./configure \
     --with-install-dir=$RPM_BUILD_ROOT%{_libdir}/%{name}-%{version} \
     --without-links-dir \
-    --with-examples-dir=$RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}/examples
-#    --with-doc-dir=$RPM_BUILD_ROOT/usr/doc/gprolog-%{version}
+    --with-examples-dir=$RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}/examples \
+    --with-doc-dir=dist-doc \
+    --with-c-flags="$CFLG"
+
 make
 
+%check
+cd src
+#
+export PATH=$RPM_BUILD_ROOT%{_bindir}:$PATH
+#
+make check
+
 %install
 rm -rf $RPM_BUILD_ROOT
+rm -rf dist-doc
+
 pushd src
 make install-strip
 popd
@@ -62,23 +88,32 @@ pushd $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}/bin
 for i in *; do
 	ln -s ../lib/%{name}-%{version}/bin/$i $RPM_BUILD_ROOT%{_bindir}/$i
 done
+
+#rm -rf docs_to_install
+#mkdir -p docs_to_install
+#mv $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}/doc/* docs_to_install
+#rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}/{COPYING,ChangeLog,NEWS,VERSION}
+
+rm -f dist-doc/*.{chm,dvi,ps}
+rm -f dist-doc/compil-scheme.pdf
+rm -f dist-doc/debug-box.pdf
+
+for file in ChangeLog COPYING NEWS VERSION
+do
+    rm -f $RPM_BUILD_ROOT%{_libdir}/gprolog-%{version}/$file
+done
+
 popd
-rm -rf docs_to_install
-mkdir -p docs_to_install
-mv $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}/doc/* docs_to_install
-rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}/{COPYING,ChangeLog,NEWS,VERSION}
-#cd $RPM_BUILD_DIR/gprolog-1.2.17
-#cp README COPYING ChangeLog NEWS $RPM_BUILD_ROOT//usr/doc/gprolog-1.2.17
+
+
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root)
-%doc README COPYING ChangeLog NEWS VERSION
-%doc docs_to_install/*
-#%doc doc/compil-scheme.pdf doc/debug-box.pdf
-#%doc doc/manual.*
+%doc README COPYING ChangeLog NEWS PROBLEMS VERSION
+%doc src/dist-doc/*
 %{_bindir}/*
 %{_libdir}/%{name}-%{version}/bin
 %{_libdir}/%{name}-%{version}/examples
@@ -86,6 +121,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/%{name}-%{version}/lib
 
 %changelog
+* Sun May  1 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.3.1-2
+- rebuilt with current VineSeed
+- fixed compile option
+
 * Wed Mar 11 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.3.1-1
 - updated to 1.3.1
 - applied new versioning policy