From 939c4e60ce1a9fde759d845daba975b4e27e0049 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] lablGL (NOT working) --- .hgignore | 1 + ocaml-lablgl/README | 1 + ocaml-lablgl/lablgl-tk8.5.patch | 12 ++++ ocaml-lablgl/mingw32-ocaml-lablgl.spec | 100 +++++++++++++++++++++++++++++++++ show-build-order.pl | 1 + 5 files changed, 115 insertions(+) create mode 100644 ocaml-lablgl/README create mode 100644 ocaml-lablgl/lablgl-tk8.5.patch create mode 100644 ocaml-lablgl/mingw32-ocaml-lablgl.spec diff --git a/.hgignore b/.hgignore index 02c7963..50e157f 100644 --- a/.hgignore +++ b/.hgignore @@ -98,6 +98,7 @@ ocaml-extlib/*.cmi ocaml-extlib/*.cmx ocaml-extlib/*.o ocaml-findlib/findlib-1.2.2.tar.gz +ocaml-lablgl/lablgl-1.03.tar.gz ocaml-xml-light/xml-light-2.2.cvs20070817.tar.gz openssl/openssl-0.9.8g-usa.tar.bz2 pango/pango-1.21.6.tar.bz2 diff --git a/ocaml-lablgl/README b/ocaml-lablgl/README new file mode 100644 index 0000000..3d84d1d --- /dev/null +++ b/ocaml-lablgl/README @@ -0,0 +1 @@ +This needs camlp4. diff --git a/ocaml-lablgl/lablgl-tk8.5.patch b/ocaml-lablgl/lablgl-tk8.5.patch new file mode 100644 index 0000000..90dee4e --- /dev/null +++ b/ocaml-lablgl/lablgl-tk8.5.patch @@ -0,0 +1,12 @@ +diff -ur lablgl-1.03/Togl/src/Togl/togl.c lablgl-1.03.new/Togl/src/Togl/togl.c +--- lablgl-1.03/Togl/src/Togl/togl.c 2006-03-23 00:39:27.000000000 +0000 ++++ lablgl-1.03.new/Togl/src/Togl/togl.c 2008-02-12 18:56:01.000000000 +0000 +@@ -153,6 +153,8 @@ + # include "tkInt8.3.h" + #elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==4 + # include "tkInt8.4.h" ++#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==5 ++# include "tkInt8.4.h" + #else + Sorry, you will have to edit togl.c to include the right tkInt.h file + #endif diff --git a/ocaml-lablgl/mingw32-ocaml-lablgl.spec b/ocaml-lablgl/mingw32-ocaml-lablgl.spec new file mode 100644 index 0000000..6908ee5 --- /dev/null +++ b/ocaml-lablgl/mingw32-ocaml-lablgl.spec @@ -0,0 +1,100 @@ +%define __strip %{_mingw32_strip} +%define __objdump %{_mingw32_objdump} +%define _use_internal_dependency_generator 0 +%define __find_requires %{_mingw32_findrequires} +%define __find_provides %{_mingw32_findprovides} + +Name: mingw32-example +Version: 1.03 +Release: 1%{?dist} +Summary: MinGW Windows port of LablGL is an OpenGL interface + +License: BSD +Group: Development/Libraries + +URL: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgl.html +Source0: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgl-%{version}.tar.gz + +# Patches from native Fedora package: +Patch0: lablgl-tk8.5.patch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +BuildRequires: mingw32-filesystem >= 35 +BuildRequires: mingw32-gcc +BuildRequires: mingw32-binutils + +BuildRequires: mingw32-ocaml + +# XXX This requires camlp4 which we don't yet have under MinGW. +BuildRequires: mingw32-ocaml-camlp4 + +# labltk is used by the native package, but is essentially optional. +#BuildRequires: mingw32-ocaml-labtk + + +%description +LablGL is is an Objective Caml interface to OpenGL. Support is +included for use inside LablTk, and LablGTK also includes specific +support for LablGL. It can be used either with proprietary OpenGL +implementations (SGI, Digital Unix, Solaris...), with XFree86 GLX +extension, or with open-source Mesa. + + +%prep +%setup -q -n lablgl-%{version} + +%patch0 -p1 + +cat > Makefile.config <<__EOF__ +CAMLC = %{_mingw32_target}-ocamlc +CAMLOPT = %{_mingw32_target}-ocamlopt +BINDIR = %{_bindir} +#XINCLUDES = -I%{_prefix}/X11R6/include +#XLIBS = -lXext -lXmu -lX11 +#TKINCLUDES = -I%{_includedir} +GLINCLUDES = -DHAS_GLEXT_H -DGL_GLEXT_PROTOTYPES -DGLU_VERSION_1_3 +GLLIBS = -lglu32 -lopengl32 +GLUTLIBS = -lglut32 +RANLIB = i686-pc-mingw32-ranlib +TOOLCHAIN = msvc +XB = .bat +XE = .exe +XS = .dll +MKLIB = ar rcs +MKDLL = i686-pc-mingw32-gcc -shared -o +LIBDIR = %{_libdir}/%{_mingw32_target}-ocaml +DLLDIR = %{_libdir}/%{_mingw32_target}-ocaml/stublibs +INSTALLDIR = %{_libdir}/%{_mingw32_target}-ocaml/lablGL +#TOGLDIR=Togl +#COPTS = $RPM_OPT_FLAGS +__EOF__ + + +%build +make all opt + + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT install + +# Remove static libraries but DON'T remove *.dll.a files. +rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libfoo.a + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root) +%{_mingw32_bindir}/foo.dll +%{_mingw32_libdir}/foo.dll.a +# etc. + + +%changelog +* Thu Nov 13 2008 Your Name - 1.2.3-1 +- Initial RPM release. diff --git a/show-build-order.pl b/show-build-order.pl index b55e10a..90fde64 100755 --- a/show-build-order.pl +++ b/show-build-order.pl @@ -62,6 +62,7 @@ sub main { delete $br{"mingw32-pidgin"}; delete $br{"mingw32-nspr"}; delete $br{"mingw32-nss"}; + delete $br{"mingw32-ocaml-labgl"}; # There is a dependency loop (gcc -> runtime/w32api -> gcc) # which has to be manually resolved below. Break that loop. -- 1.8.3.1