[packages/lemon] - new - added glpk patch to fix glpk detection with glpk 4.49+ (actual code already uses new API)

qboosh qboosh at pld-linux.org
Mon Dec 30 22:35:59 CET 2013


commit b2972915996220364118ecc189f4955b592a47ff
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Dec 30 22:36:16 2013 +0100

    - new
    - added glpk patch to fix glpk detection with glpk 4.49+ (actual code already uses new API)

 lemon-glpk.patch |  15 ++++++
 lemon.spec       | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 151 insertions(+)
---
diff --git a/lemon.spec b/lemon.spec
new file mode 100644
index 0000000..95522c3
--- /dev/null
+++ b/lemon.spec
@@ -0,0 +1,136 @@
+# TODO: coin, cplex, soplex support
+#
+# Conditional build:
+%bcond_without	static_libs	# don't build static libraries
+%bcond_without	glpk		# GLPK support
+#
+Summary:	Library of Efficient Models and Optimization in Networks
+Summary(pl.UTF-8):	Biblioteka wydajnych modeli i optymalizacji w sieciach
+Name:		lemon
+Version:	1.2.4
+Release:	1
+License:	Boost v1.0
+Group:		Libraries
+Source0:	http://lemon.cs.elte.hu/pub/sources/%{name}-%{version}.tar.gz
+# Source0-md5:	fd89e8bf5035b02e2622a48ac7fe0641
+Patch0:		%{name}-glpk.patch
+URL:		http://lemon.cs.elte.hu/
+BuildRequires:	autoconf >= 2.59
+BuildRequires:	automake
+BuildRequires:	doxygen
+BuildRequires:	ghostscript
+%{?with_glpk:BuildRequires:	glpk-devel >= 4.33}
+BuildRequires:	libstdc++-devel
+BuildRequires:	libtool >= 2:1.5
+BuildRequires:	python
+%{?with_glpk:Requires:	glpk >= 4.33}
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+LEMON stands for Library for Efficient Modeling and Optimization in
+Networks. It is a C++ template library providing efficient
+implementations of common data structures and algorithms with focus on
+combinatorial optimization tasks connected mainly with graphs and
+networks.
+
+%description -l pl.UTF-8
+LEMON to skrót od Library for Efficient Modeling and Optimization in
+Networks (biblioteka do wydajnego modelowania i optymalizacji w
+sieciach). Jest to biblioteka szablonów C++ udostępniająca wydajne
+implementacje popularnych struktur danych i algorytmów przeznaczonych
+do zadań optymalizacji kombinatorycznej, związanych głównie z grafami
+i sieciami.
+
+%package devel
+Summary:	Header files for LEMON library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki LEMON
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+%{?with_glpk:Requires:	glpk-devel >= 4.33}
+Requires:	libstdc++-devel
+
+%description devel
+Header files for LEMON library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki LEMON.
+
+%package static
+Summary:	Static LEMON library
+Summary(pl.UTF-8):	Statyczna biblioteka LEMON
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static LEMON library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka LEMON.
+
+%package apidocs
+Summary:	LEMON API documentation
+Summary(pl.UTF-8):	Dokumentacja API biblioteki LEMON
+Group:		Documentation
+
+%description apidocs
+API documentation for LEMON library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki LEMON.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+	--enable-shared \
+	%{!?with_static_libs:--disable-static} \
+	%{!?with_glpk:--without-glpk}
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS LICENSE NEWS README
+%attr(755,root,root) %{_bindir}/dimacs-solver
+%attr(755,root,root) %{_bindir}/dimacs-to-lgf
+%attr(755,root,root) %{_bindir}/lemon-0.x-to-1.x.sh
+%attr(755,root,root) %{_bindir}/lgf-gen
+%attr(755,root,root) %{_libdir}/libemon.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libemon.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libemon.so
+%{_includedir}/lemon
+%{_pkgconfigdir}/lemon.pc
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libemon.a
+%endif
+
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/html/*
diff --git a/lemon-glpk.patch b/lemon-glpk.patch
new file mode 100644
index 0000000..3b1b695
--- /dev/null
+++ b/lemon-glpk.patch
@@ -0,0 +1,15 @@
+--- lemon-1.2.4/m4/lx_check_glpk.m4.orig	2013-08-10 12:25:53.000000000 +0200
++++ lemon-1.2.4/m4/lx_check_glpk.m4	2013-12-30 22:18:33.502163306 +0100
+@@ -49,9 +49,9 @@
+ 
+       int main(int argc, char** argv)
+       {
+-        LPX *lp;
+-        lp = lpx_create_prob();
+-        lpx_delete_prob(lp);
++        glp_prob *lp;
++        lp = glp_create_prob();
++        glp_delete_prob(lp);
+         return 0;
+       }'
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lemon.git/commitdiff/b2972915996220364118ecc189f4955b592a47ff



More information about the pld-cvs-commit mailing list