Unified · Split
| @@ -1512,7 +1512,7 @@ USE_OSGPLUGIN(<plugin2>) · 1511 unmodified lines | |||
| 1512 | <td id="librsvg-package">librsvg</td> | 1512 | <td id="librsvg-package">librsvg</td> |
| 1513 | <td id="librsvg-version">2.36.4</td> | 1513 | <td id="librsvg-version">2.36.4</td> |
| 1514 | <td id="librsvg-website"><a href="http://librsvg.sourceforge.net/">librsvg</a></td> | 1514 | <td id="librsvg-website"><a href="http://librsvg.sourceforge.net/">librsvg</a></td> |
| 1515 | </tr> | 1515 | </tr> |
| 1516 | <tr> | 1516 | <tr> |
| 1517 | <td id="librtmp-package">librtmp</td> | 1517 | <td id="librtmp-package">librtmp</td> |
| 1518 | <td id="librtmp-version">2.4</td> | 1518 | <td id="librtmp-version">2.4</td> |
| @@ -9,16 +9,16 @@ using namespace arma; · 8 unmodified lines | |||
| 9 | 9 | ||
| 10 | int main() | 10 | int main() |
| 11 | { | 11 | { |
| 12 | mat A = randu<mat>(50,50); | 12 | mat A = randu<mat>(50,50); |
| 13 | mat B = trans(A)*A; // generate a symmetric matrix | 13 | mat B = trans(A)*A; // generate a symmetric matrix |
| 14 | 14 | ||
| 15 | vec eigval; | 15 | vec eigval; |
| 16 | mat eigvec; | 16 | mat eigvec; |
| 17 | 17 | ||
| 18 | // use standard algorithm by default | 18 | // use standard algorithm by default |
| 19 | eig_sym(eigval, eigvec, B); | 19 | eig_sym(eigval, eigvec, B); |
| 20 | 20 | ||
| 21 | // use divide & conquer algorithm | 21 | // use divide & conquer algorithm |
| 22 | eig_sym(eigval, eigvec, B, "dc"); | 22 | eig_sym(eigval, eigvec, B, "dc"); |
| 23 | return 0; | 23 | return 0; |
| 24 | } | 24 | } |
| @@ -4,7 +4,7 @@ · 3 unmodified lines | |||
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | #include <json/json.h> | 6 | #include <json/json.h> |
| 7 | #include <stdio.h> | 7 | #include <stdio.h> |
| 8 | 8 | ||
| 9 | int main(int argc, char *argv[]) | 9 | int main(int argc, char *argv[]) |
| 10 | { | 10 | { |
| @@ -24,7 +24,7 @@ define $(PKG)_BUILD · 23 unmodified lines | |||
| 24 | --disable-shared | 24 | --disable-shared |
| 25 | CFLAGS=-Wno-error | 25 | CFLAGS=-Wno-error |
| 26 | $(MAKE) -C '$(1)' -j '$(JOBS)' install | 26 | $(MAKE) -C '$(1)' -j '$(JOBS)' install |
| 27 | 27 | ||
| 28 | '$(TARGET)-gcc' \ | 28 | '$(TARGET)-gcc' \ |
| 29 | -W -Wall -Werror -ansi -pedantic \ | 29 | -W -Wall -Werror -ansi -pedantic \ |
| 30 | '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-json-c.exe' \ | 30 | '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-json-c.exe' \ |
| @@ -2,127 +2,127 @@ · 1 unmodified line | |||
| 2 | # See doc/index.html for further information. | 2 | # See doc/index.html for further information. |
| 3 | 3 | ||
| 4 | # zlib | 4 | # zlib |
| 5 | PKG := ocaml-core | 5 | PKG := ocaml-core |
| 6 | $(PKG)_IGNORE := | 6 | $(PKG)_IGNORE := |
| 7 | $(PKG)_CHECKSUM := $(ocaml-native_CHECKSUM) | 7 | $(PKG)_CHECKSUM := $(ocaml-native_CHECKSUM) |
| 8 | $(PKG)_SUBDIR := $(ocaml-native_SUBDIR) | 8 | $(PKG)_SUBDIR := $(ocaml-native_SUBDIR) |
| 9 | $(PKG)_FILE := $(ocaml-native_FILE) | 9 | $(PKG)_FILE := $(ocaml-native_FILE) |
| 10 | $(PKG)_URL := $(ocaml-native_URL) | 10 | $(PKG)_URL := $(ocaml-native_URL) |
| 11 | $(PKG)_DEPS := gcc bfd ocaml-flexdll ocaml-native | 11 | $(PKG)_DEPS := gcc bfd ocaml-flexdll ocaml-native |
| 12 | 12 | ||
| 13 | define $(PKG)_UPDATE | 13 | define $(PKG)_UPDATE |
| 14 | $(call ocaml-native_UPDATE) | 14 | $(call ocaml-native_UPDATE) |
| 15 | endef | 15 | endef |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | OTHER_LIBS := win32unix str num dynlink bigarray systhreads win32graph | 18 | OTHER_LIBS := win32unix str num dynlink bigarray systhreads win32graph |
| 19 | 19 | ||
| 20 | define $(PKG)_BUILD | 20 | define $(PKG)_BUILD |
| 21 | # Build native ocamlrun and ocamlc which contain the | 21 | # Build native ocamlrun and ocamlc which contain the |
| 22 | # filename-win32-dirsep patch. | 22 | # filename-win32-dirsep patch. |
| 23 | # | 23 | # |
| 24 | # Note that we must build a 32 bit compiler, even on 64 bit build | 24 | # Note that we must build a 32 bit compiler, even on 64 bit build |
| 25 | # architectures, because this compiler will try to do strength | 25 | # architectures, because this compiler will try to do strength |
| 26 | # reduction optimizations using its internal int type, and that must | 26 | # reduction optimizations using its internal int type, and that must |
| 27 | # match Windows' int type. (That's what -cc and -host are for). | 27 | # match Windows' int type. (That's what -cc and -host are for). |
| 28 | cd '$(1)' && ./configure \ | 28 | cd '$(1)' && ./configure \ |
| 29 | -prefix '$(PREFIX)/$(TARGET)' \ | 29 | -prefix '$(PREFIX)/$(TARGET)' \ |
| 30 | -bindir '$(PREFIX)/$(TARGET)/bin' \ | 30 | -bindir '$(PREFIX)/$(TARGET)/bin' \ |
| 31 | -libdir '$(PREFIX)/$(TARGET)/lib/ocaml' \ | 31 | -libdir '$(PREFIX)/$(TARGET)/lib/ocaml' \ |
| 32 | -no-tk \ | 32 | -no-tk \ |
| 33 | -cc "gcc -m32" \ | 33 | -cc "gcc -m32" \ |
| 34 | -no-shared-libs \ | 34 | -no-shared-libs \ |
| 35 | -host '$(TARGET)' \ | 35 | -host '$(TARGET)' \ |
| 36 | -x11lib /usr/lib \ | 36 | -x11lib /usr/lib \ |
| 37 | -verbose | 37 | -verbose |
| 38 | $(MAKE) -C '$(1)' core | 38 | $(MAKE) -C '$(1)' core |
| 39 | # Now move the working ocamlrun, ocamlc into the boot/ directory, | 39 | # Now move the working ocamlrun, ocamlc into the boot/ directory, |
| 40 | # overwriting the binary versions which ship with the compiler with | 40 | # overwriting the binary versions which ship with the compiler with |
| 41 | # ones that contain the filename-win32-dirsep patch. | 41 | # ones that contain the filename-win32-dirsep patch. |
| 42 | $(MAKE) -C '$(1)' coreboot | 42 | $(MAKE) -C '$(1)' coreboot |
| 43 | # second time, otherwise Segfault in some cases (depending on the runing system?) | 43 | # second time, otherwise Segfault in some cases (depending on the runing system?) |
| 44 | $(MAKE) -C '$(1)' coreboot | 44 | $(MAKE) -C '$(1)' coreboot |
| 45 | $(MAKE) -C '$(1)' all | 45 | $(MAKE) -C '$(1)' all |
| 46 | # install ocamldoc and camlp4 (non cross versions) | 46 | # install ocamldoc and camlp4 (non cross versions) |
| 47 | $(MAKE) -C '$(1)/ocamldoc' install | 47 | $(MAKE) -C '$(1)/ocamldoc' install |
| 48 | cd '$(1)' && BINDIR=$(PREFIX)/$(TARGET)/bin \ | 48 | cd '$(1)' && BINDIR=$(PREFIX)/$(TARGET)/bin \ |
| 49 | LIBDIR=$(PREFIX)/$(TARGET)/lib/ocaml \ | 49 | LIBDIR=$(PREFIX)/$(TARGET)/lib/ocaml \ |
| 50 | PREFIX=$(PREFIX)/$(TARGET) \ | 50 | PREFIX=$(PREFIX)/$(TARGET) \ |
| 51 | ./build/partial-install.sh | 51 | ./build/partial-install.sh |
| 52 | 52 | ||
| 53 | ####### patch mingw include | 53 | ####### patch mingw include |
| 54 | # Now patch utils/clflags.ml to hardcode mingw-specific include. | 54 | # Now patch utils/clflags.ml to hardcode mingw-specific include. |
| 55 | $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" \ | 55 | $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" \ |
| 56 | $(1)/hardcode_mingw_include.patch | 56 | $(1)/hardcode_mingw_include.patch |
| 57 | cd '$(1)' && patch -p2 < hardcode_mingw_include.patch | 57 | cd '$(1)' && patch -p2 < hardcode_mingw_include.patch |
| 58 | 58 | ||
| 59 | ####### prepare cross build | 59 | ####### prepare cross build |
| 60 | # Replace the compiler configuration (config/{s.h,m.h,Makefile}) | 60 | # Replace the compiler configuration (config/{s.h,m.h,Makefile}) |
| 61 | # with ones as they would be on a 32 bit Windows system. | 61 | # with ones as they would be on a 32 bit Windows system. |
| 62 | cp -f '$(1)/config/m-nt.h' '$(1)/config/m.h' | 62 | cp -f '$(1)/config/m-nt.h' '$(1)/config/m.h' |
| 63 | cp -f $(1)/config/s-nt.h $(1)/config/s.h | 63 | cp -f $(1)/config/s-nt.h $(1)/config/s.h |
| 64 | # config/Makefile is a custom one which we supply. | 64 | # config/Makefile is a custom one which we supply. |
| 65 | rm -f $(1)/config/Makefile | 65 | rm -f $(1)/config/Makefile |
| 66 | $(SED) \ | 66 | $(SED) \ |
| 67 | -e "s,@prefix@,$(PREFIX)/$(TARGET),g" \ | 67 | -e "s,@prefix@,$(PREFIX)/$(TARGET),g" \ |
| 68 | -e "s,@toolpref@,$(TARGET),g" \ | 68 | -e "s,@toolpref@,$(TARGET),g" \ |
| 69 | -e "s,@otherlibraries@,$(OTHER_LIBS),g" \ | 69 | -e "s,@otherlibraries@,$(OTHER_LIBS),g" \ |
| 70 | < $(1)/Makefile-mingw.in > $(1)/config/Makefile | 70 | < $(1)/Makefile-mingw.in > $(1)/config/Makefile |
| 71 | $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/Makefile.shared | 71 | $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/Makefile.shared |
| 72 | # We're going to build in otherlibs/win32unix and otherlibs/win32graph | 72 | # We're going to build in otherlibs/win32unix and otherlibs/win32graph |
| 73 | # directories, but since they would normally only be built under | 73 | # directories, but since they would normally only be built under |
| 74 | # Windows, they only have the Makefile.nt files. Just symlink | 74 | # Windows, they only have the Makefile.nt files. Just symlink |
| 75 | # Makefile -> Makefile.nt for these cases. | 75 | # Makefile -> Makefile.nt for these cases. |
| 76 | $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/win32unix/Makefile.nt | 76 | $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/win32unix/Makefile.nt |
| 77 | $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/win32graph/Makefile.nt | 77 | $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/win32graph/Makefile.nt |
| 78 | $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/systhreads/Makefile.nt | 78 | $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/systhreads/Makefile.nt |
| 79 | for d in $(1)/otherlibs/win32unix \ | 79 | for d in $(1)/otherlibs/win32unix \ |
| 80 | $(1)/otherlibs/win32graph \ | 80 | $(1)/otherlibs/win32graph \ |
| 81 | $(1)/otherlibs/bigarray \ | 81 | $(1)/otherlibs/bigarray \ |
| 82 | $(1)/otherlibs/systhreads; do \ | 82 | $(1)/otherlibs/systhreads; do \ |
| 83 | ln -sf Makefile.nt $$d/Makefile; \ | 83 | ln -sf Makefile.nt $$d/Makefile; \ |
| 84 | done | 84 | done |
| 85 | # Now clean the temporary files from the previous build. This | 85 | # Now clean the temporary files from the previous build. This |
| 86 | # will also cause asmcomp/arch.ml (etc) to be linked to the 32 bit | 86 | # will also cause asmcomp/arch.ml (etc) to be linked to the 32 bit |
| 87 | # i386 versions, essentially causing ocamlopt to use the Win/i386 code | 87 | # i386 versions, essentially causing ocamlopt to use the Win/i386 code |
| 88 | # generator. | 88 | # generator. |
| 89 | $(MAKE) -C '$(1)' partialclean | 89 | $(MAKE) -C '$(1)' partialclean |
| 90 | # We need to remove any .o object for make sure they are | 90 | # We need to remove any .o object for make sure they are |
| 91 | # recompiled later.. | 91 | # recompiled later.. |
| 92 | cd $(1) && rm byterun/*.o | 92 | cd $(1) && rm byterun/*.o |
| 93 | 93 | ||
| 94 | ####### build mingw ocaml | 94 | ####### build mingw ocaml |
| 95 | # Just rebuild some small bits that we need for the following | 95 | # Just rebuild some small bits that we need for the following |
| 96 | # 'make opt' to work. Note that 'make all' fails here. | 96 | # 'make opt' to work. Note that 'make all' fails here. |
| 97 | $(MAKE) -C '$(1)/byterun' libcamlrun.a | 97 | $(MAKE) -C '$(1)/byterun' libcamlrun.a |
| 98 | $(MAKE) -C '$(1)' ocaml ocamlc | 98 | $(MAKE) -C '$(1)' ocaml ocamlc |
| 99 | $(MAKE) -C '$(1)/stdlib' | 99 | $(MAKE) -C '$(1)/stdlib' |
| 100 | $(MAKE) -C '$(1)/tools' ocamlmklib | 100 | $(MAKE) -C '$(1)/tools' ocamlmklib |
| 101 | # Build ocamlopt | 101 | # Build ocamlopt |
| 102 | $(MAKE) -C '$(1)' opt | 102 | $(MAKE) -C '$(1)' opt |
| 103 | # Now build otherlibs for ocamlopt | 103 | # Now build otherlibs for ocamlopt |
| 104 | cd '$(1)' && \ | 104 | cd '$(1)' && \ |
| 105 | for i in $(OTHER_LIBS); do \ | 105 | for i in $(OTHER_LIBS); do \ |
| 106 | $(MAKE) -C otherlibs/$$i clean; \ | 106 | $(MAKE) -C otherlibs/$$i clean; \ |
| 107 | $(MAKE) -C otherlibs/$$i all; \ | 107 | $(MAKE) -C otherlibs/$$i all; \ |
| 108 | $(MAKE) -C otherlibs/$$i allopt; \ | 108 | $(MAKE) -C otherlibs/$$i allopt; \ |
| 109 | done | 109 | done |
| 110 | 110 | ||
| 111 | ####### installation | 111 | ####### installation |
| 112 | $(MAKE) -C '$(1)' install | 112 | $(MAKE) -C '$(1)' install |
| 113 | $(MAKE) -C '$(1)' installopt | 113 | $(MAKE) -C '$(1)' installopt |
| 114 | # Rename all the binaries to target-binary | 114 | # Rename all the binaries to target-binary |
| 115 | for f in ocamlc ocamlcp ocamlrun ocamldep ocamlmklib ocamlmktop ocamlopt ocamlprof camlp4prof camlp4boot camlp4 camlp4oof camlp4of camlp4o camlp4rf camlp4r camlp4orf ocamldoc ; do \ | 115 | for f in ocamlc ocamlcp ocamlrun ocamldep ocamlmklib ocamlmktop ocamlopt ocamlprof camlp4prof camlp4boot camlp4 camlp4oof camlp4of camlp4o camlp4rf camlp4r camlp4orf ocamldoc ; do \ |
| 116 | cp -f $(PREFIX)/$(TARGET)/bin/$$f $(PREFIX)/bin/$(TARGET)-$$f; \ | 116 | cp -f $(PREFIX)/$(TARGET)/bin/$$f $(PREFIX)/bin/$(TARGET)-$$f; \ |
| 117 | done | 117 | done |
| 118 | 118 | ||
| 119 | # test ocamlopt | 119 | # test ocamlopt |
| 120 | cp '$(2).ml' '$(1)/test.ml' | 120 | cp '$(2).ml' '$(1)/test.ml' |
| 121 | cd '$(1)' && '$(TARGET)-ocamlopt' test.ml | 121 | cd '$(1)' && '$(TARGET)-ocamlopt' test.ml |
| 122 | # test ocamlbuild | 122 | # test ocamlbuild |
| 123 | mkdir '$(1)/tmp' && cp '$(2).ml' '$(1)/tmp/test.ml' | 123 | mkdir '$(1)/tmp' && cp '$(2).ml' '$(1)/tmp/test.ml' |
| 124 | cd '$(1)/tmp' && $(TARGET)-ocamlbuild test.native | 124 | cd '$(1)/tmp' && $(TARGET)-ocamlbuild test.native |
| 125 | # test | 125 | # test |
| 126 | cp '$(2).ml' '$(1)/test.ml' | 126 | cp '$(2).ml' '$(1)/test.ml' |
| 127 | cd '$(1)' && '$(TARGET)-ocamlopt' test.ml | 127 | cd '$(1)' && '$(TARGET)-ocamlopt' test.ml |
| 128 | endef | 128 | endef |
| @@ -1,44 +1,44 @@ | |||
| 1 | /***************************************************************** | 1 | /***************************************************************** |
| 2 | FlexDLL | 2 | FlexDLL |
| 3 | Alain Frisch | 3 | Alain Frisch |
| 4 | 4 | ||
| 5 | Copyright 2007 Institut National de Recherche en Informatique et | 5 | Copyright 2007 Institut National de Recherche en Informatique et |
| 6 | en Automatique. | 6 | en Automatique. |
| 7 | 7 | ||
| 8 | ******************************************************************/ | 8 | ******************************************************************/ |
| 9 | 9 | ||
| 10 | /* An example (main program) */ | 10 | /* An example (main program) */ |
| 11 | 11 | ||
| 12 | #include <stdlib.h> | 12 | #include <stdlib.h> |
| 13 | #include <stdio.h> | 13 | #include <stdio.h> |
| 14 | #include "flexdll.h" | 14 | #include "flexdll.h" |
| 15 | 15 | ||
| 16 | typedef void torun(); | 16 | typedef void torun(); |
| 17 | 17 | ||
| 18 | void api(char *msg){ printf("API: %s\n", msg); } | 18 | void api(char *msg){ printf("API: %s\n", msg); } |
| 19 | 19 | ||
| 20 | int main(int argc, char **argv) | 20 | int main(int argc, char **argv) |
| 21 | { | 21 | { |
| 22 | void *sym; | 22 | void *sym; |
| 23 | void *handle; | 23 | void *handle; |
| 24 | int i; | 24 | int i; |
| 25 | torun *torun; | 25 | torun *torun; |
| 26 | 26 | ||
| 27 | printf("INIT\n"); fflush(stdout); | 27 | printf("INIT\n"); fflush(stdout); |
| 28 | flexdll_dump_exports(NULL); | 28 | flexdll_dump_exports(NULL); |
| 29 | printf("OK\n"); fflush(stdout); | 29 | printf("OK\n"); fflush(stdout); |
| 30 | for (i = 1; i < argc; i++) { | 30 | for (i = 1; i < argc; i++) { |
| 31 | printf("** Loading %s\n", argv[i]); | 31 | printf("** Loading %s\n", argv[i]); |
| 32 | handle = flexdll_dlopen(argv[i], FLEXDLL_RTLD_GLOBAL); | 32 | handle = flexdll_dlopen(argv[i], FLEXDLL_RTLD_GLOBAL); |
| 33 | if (NULL == handle) { printf("error: %s\n", flexdll_dlerror()); exit(2); } | 33 | if (NULL == handle) { printf("error: %s\n", flexdll_dlerror()); exit(2); } |
| 34 | printf("** handle = %p\n", handle); | 34 | printf("** handle = %p\n", handle); |
| 35 | flexdll_dump_exports(handle); | 35 | flexdll_dump_exports(handle); |
| 36 | flexdll_dump_relocations(handle); | 36 | flexdll_dump_relocations(handle); |
| 37 | 37 | ||
| 38 | if (NULL == handle) { printf("error: %s\n", flexdll_dlerror()); exit(2); } | 38 | if (NULL == handle) { printf("error: %s\n", flexdll_dlerror()); exit(2); } |
| 39 | 39 | ||
| 40 | torun = flexdll_dlsym(handle, "torun"); | 40 | torun = flexdll_dlsym(handle, "torun"); |
| 41 | if (torun) torun(); | 41 | if (torun) torun(); |
| 42 | } | 42 | } |
| 43 | exit(0); | 43 | exit(0); |
| 44 | } | 44 | } |
| @@ -2,42 +2,42 @@ · 1 unmodified line | |||
| 2 | # See doc/index.html for further information. | 2 | # See doc/index.html for further information. |
| 3 | 3 | ||
| 4 | # zlib | 4 | # zlib |
| 5 | PKG := ocaml-flexdll | 5 | PKG := ocaml-flexdll |
| 6 | $(PKG)_IGNORE := | 6 | $(PKG)_IGNORE := |
| 7 | $(PKG)_CHECKSUM := 585f066f890c7dca95be7541b4647128335f7df9 | 7 | $(PKG)_CHECKSUM := 585f066f890c7dca95be7541b4647128335f7df9 |
| 8 | $(PKG)_SUBDIR := flexdll | 8 | $(PKG)_SUBDIR := flexdll |
| 9 | $(PKG)_FILE := flexdll-$($(PKG)_VERSION).tar.gz | 9 | $(PKG)_FILE := flexdll-$($(PKG)_VERSION).tar.gz |
| 10 | $(PKG)_URL := http://alain.frisch.fr/flexdll/$($(PKG)_FILE) | 10 | $(PKG)_URL := http://alain.frisch.fr/flexdll/$($(PKG)_FILE) |
| 11 | $(PKG)_DEPS := gcc ocaml-native | 11 | $(PKG)_DEPS := gcc ocaml-native |
| 12 | 12 | ||
| 13 | define $(PKG)_UPDATE | 13 | define $(PKG)_UPDATE |
| 14 | wget -q -O- 'http://alain.frisch.fr/flexdll/' | \ | 14 | wget -q -O- 'http://alain.frisch.fr/flexdll/' | \ |
| 15 | $(SED) -n 's,.*flexdll-\([0-9][^>]*\)\.tar.gz.*,\1,ip' | \ | 15 | $(SED) -n 's,.*flexdll-\([0-9][^>]*\)\.tar.gz.*,\1,ip' | \ |
| 16 | head -1 | 16 | head -1 |
| 17 | endef | 17 | endef |
| 18 | 18 | ||
| 19 | define $(PKG)_BUILD | 19 | define $(PKG)_BUILD |
| 20 | $(MAKE) -C '$(1)' -j '$(JOBS)' \ | 20 | $(MAKE) -C '$(1)' -j '$(JOBS)' \ |
| 21 | CHAINS=mingw \ | 21 | CHAINS=mingw \ |
| 22 | MINGW_PREFIX=$(TARGET) \ | 22 | MINGW_PREFIX=$(TARGET) \ |
| 23 | OCAMLOPT=$(PREFIX)/$(TARGET)/bin/ocaml-native/ocamlopt \ | 23 | OCAMLOPT=$(PREFIX)/$(TARGET)/bin/ocaml-native/ocamlopt \ |
| 24 | all | 24 | all |
| 25 | mkdir -p '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll' | 25 | mkdir -p '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll' |
| 26 | cd '$(1)' && mv flexlink.exe flexlink | 26 | cd '$(1)' && mv flexlink.exe flexlink |
| 27 | cd '$(1)' && strip --remove-section=.comment --remove-section=.note flexlink | 27 | cd '$(1)' && strip --remove-section=.comment --remove-section=.note flexlink |
| 28 | cd '$(1)' && $(INSTALL) -m 0755 flexdll.h '$(PREFIX)/$(TARGET)/include' | 28 | cd '$(1)' && $(INSTALL) -m 0755 flexdll.h '$(PREFIX)/$(TARGET)/include' |
| 29 | cd '$(1)' && $(INSTALL) -m 0755 flexlink flexdll_mingw.o \ | 29 | cd '$(1)' && $(INSTALL) -m 0755 flexlink flexdll_mingw.o \ |
| 30 | flexdll_initer_mingw.o \ | 30 | flexdll_initer_mingw.o \ |
| 31 | '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll' | 31 | '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll' |
| 32 | # create flexdll scripts | 32 | # create flexdll scripts |
| 33 | cd '$(PREFIX)/bin' && ln -sf '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll/flexlink' | 33 | cd '$(PREFIX)/bin' && ln -sf '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll/flexlink' |
| 34 | (echo '#!/bin/sh'; \ | 34 | (echo '#!/bin/sh'; \ |
| 35 | echo 'exec flexlink -I $(PREFIX)/$(TARGET)/lib -chain mingw -nocygpath "$$@"') \ | 35 | echo 'exec flexlink -I $(PREFIX)/$(TARGET)/lib -chain mingw -nocygpath "$$@"') \ |
| 36 | > '$(PREFIX)/bin/$(TARGET)-flexlink' | 36 | > '$(PREFIX)/bin/$(TARGET)-flexlink' |
| 37 | chmod 0755 '$(PREFIX)/bin/$(TARGET)-flexlink' | 37 | chmod 0755 '$(PREFIX)/bin/$(TARGET)-flexlink' |
| 38 | 38 | ||
| 39 | echo "testing flexlink..." | 39 | echo "testing flexlink..." |
| 40 | $(MAKE) -C '$(1)/test' -j '$(JOBS)' dump.exe plug1.dll plug2.dll CC=$(TARGET)-gcc O=o FLEXLINK=$(TARGET)-flexlink | 40 | $(MAKE) -C '$(1)/test' -j '$(JOBS)' dump.exe plug1.dll plug2.dll CC=$(TARGET)-gcc O=o FLEXLINK=$(TARGET)-flexlink |
| 41 | #works if wine is installed : | 41 | #works if wine is installed : |
| 42 | #cd '$(1)/test' && ./dump.exe plug1.dll plug2.dll | 42 | #cd '$(1)/test' && ./dump.exe plug1.dll plug2.dll |
| 43 | endef | 43 | endef |
| @@ -2,39 +2,39 @@ · 1 unmodified line | |||
| 2 | # See doc/index.html for further information. | 2 | # See doc/index.html for further information. |
| 3 | 3 | ||
| 4 | # zlib | 4 | # zlib |
| 5 | PKG := ocaml-native | 5 | PKG := ocaml-native |
| 6 | $(PKG)_IGNORE := | 6 | $(PKG)_IGNORE := |
| 7 | $(PKG)_CHECKSUM := 9653e76dd14f0fbb750d7b438415890ab9fe2f4e | 7 | $(PKG)_CHECKSUM := 9653e76dd14f0fbb750d7b438415890ab9fe2f4e |
| 8 | $(PKG)_SUBDIR := ocaml-$($(PKG)_VERSION) | 8 | $(PKG)_SUBDIR := ocaml-$($(PKG)_VERSION) |
| 9 | $(PKG)_FILE := ocaml-$($(PKG)_VERSION).tar.gz | 9 | $(PKG)_FILE := ocaml-$($(PKG)_VERSION).tar.gz |
| 10 | $(PKG)_URL := http://caml.inria.fr/pub/distrib/ocaml-4.00/$($(PKG)_FILE) | 10 | $(PKG)_URL := http://caml.inria.fr/pub/distrib/ocaml-4.00/$($(PKG)_FILE) |
| 11 | $(PKG)_DEPS := gcc | 11 | $(PKG)_DEPS := gcc |
| 12 | 12 | ||
| 13 | define $(PKG)_UPDATE | 13 | define $(PKG)_UPDATE |
| 14 | wget -q -O- 'http://caml.inria.fr/pub/distrib/ocaml-3.12' | \ | 14 | wget -q -O- 'http://caml.inria.fr/pub/distrib/ocaml-3.12' | \ |
| 15 | $(SED) -n 's,.*ocaml-\([0-9][^>]*\)\.tar.*,\1,ip' | \ | 15 | $(SED) -n 's,.*ocaml-\([0-9][^>]*\)\.tar.*,\1,ip' | \ |
| 16 | tail -1 | 16 | tail -1 |
| 17 | endef | 17 | endef |
| 18 | 18 | ||
| 19 | define $(PKG)_BUILD | 19 | define $(PKG)_BUILD |
| 20 | # patched ocaml source to get ocamlbuild use $(TARGET)-ocamlc, $(TARGET)-ocamlfind, ... | 20 | # patched ocaml source to get ocamlbuild use $(TARGET)-ocamlc, $(TARGET)-ocamlfind, ... |
| 21 | cd '$(1)' && ./configure \ | 21 | cd '$(1)' && ./configure \ |
| 22 | -prefix '$(PREFIX)/$(TARGET)' \ | 22 | -prefix '$(PREFIX)/$(TARGET)' \ |
| 23 | -bindir '$(PREFIX)/$(TARGET)/bin/ocaml-native' \ | 23 | -bindir '$(PREFIX)/$(TARGET)/bin/ocaml-native' \ |
| 24 | -libdir '$(PREFIX)/$(TARGET)/lib/ocaml-native' \ | 24 | -libdir '$(PREFIX)/$(TARGET)/lib/ocaml-native' \ |
| 25 | -no-tk \ | 25 | -no-tk \ |
| 26 | -no-shared-libs \ | 26 | -no-shared-libs \ |
| 27 | -verbose | 27 | -verbose |
| 28 | $(MAKE) -C '$(1)' -j 1 world opt | 28 | $(MAKE) -C '$(1)' -j 1 world opt |
| 29 | $(SED) -i "s,@target@,$(TARGET),g" $(1)/ocamlbuild/options.ml | 29 | $(SED) -i "s,@target@,$(TARGET),g" $(1)/ocamlbuild/options.ml |
| 30 | $(SED) -i "s,@target@,$(TARGET),g" $(1)/ocamlbuild/findlib.ml | 30 | $(SED) -i "s,@target@,$(TARGET),g" $(1)/ocamlbuild/findlib.ml |
| 31 | $(MAKE) -C '$(1)' -j '$(JOBS)' ocamlbuild.native | 31 | $(MAKE) -C '$(1)' -j '$(JOBS)' ocamlbuild.native |
| 32 | cp -f '$(1)/_build/ocamlbuild/ocamlbuild.native' $(PREFIX)/bin/$(TARGET)-ocamlbuild | 32 | cp -f '$(1)/_build/ocamlbuild/ocamlbuild.native' $(PREFIX)/bin/$(TARGET)-ocamlbuild |
| 33 | $(MAKE) -C '$(1)' install | 33 | $(MAKE) -C '$(1)' install |
| 34 | # the following script requires ocamlbuild with option -ocamlfind to work | 34 | # the following script requires ocamlbuild with option -ocamlfind to work |
| 35 | #(echo '#!/bin/sh'; \ | 35 | #(echo '#!/bin/sh'; \ |
| 36 | # echo 'exec $(PREFIX)/bin/ocamlbuild -use-ocamlfind -ocamlfind $(TARGET)-ocamlfind "$$@"') \ | 36 | # echo 'exec $(PREFIX)/bin/ocamlbuild -use-ocamlfind -ocamlfind $(TARGET)-ocamlfind "$$@"') \ |
| 37 | # > '$(PREFIX)/bin/$(TARGET)-ocamlbuild' | 37 | # > '$(PREFIX)/bin/$(TARGET)-ocamlbuild' |
| 38 | #chmod 0755 '$(PREFIX)/bin/$(TARGET)-ocamlbuild' | 38 | #chmod 0755 '$(PREFIX)/bin/$(TARGET)-ocamlbuild' |
| 39 | # test will be done once cross ocamlopt is built | 39 | # test will be done once cross ocamlopt is built |
| 40 | endef | 40 | endef |