Updated to latest trunklilik-openwrt-22.03
@ -1,25 +1,91 @@ | |||
# Contributing Guidelines | |||
# Contributing Guidelines | |||
(See <http://wiki.openwrt.org/doc/devel/packages> for overall format and construction) | |||
All packages you commit or submit by pull-request should follow these simple guidelines: | |||
Please make sure that all packages you commit or request to pull: | |||
* Package a version which is still maintained by the upstream author. | |||
* Have yourself or another person listed in the (PKG_)MAINTAINER field. | |||
* Will be updated regularly to maintained and supported versions. | |||
* Have no dependencies outside the openwrt core packages or this feed. | |||
* Are tested to run (or at the very least tested to compile sucessfully) | |||
* Have no dependencies outside the OpenWrt core packages or this repository feed. | |||
* Have been tested to compile with the correct includes and dependencies. Also, test with "Compile with full language support" found under "General Build Settings" set. | |||
* Best of all -- it works as expected! | |||
Makefile contents should contain: | |||
* An up-to-date copyright notice. Use OpenWrt if no other present or supply your own. | |||
* A (PKG_)MAINTAINER definition listing either yourself or another person in the field. | |||
(E.g.: PKG_MAINTAINER:= Joe D. Hacker `<jdh@jdhs-email-provider.org`>) | |||
* A PKG_LICENSE tag declaring the main license of the package. | |||
(E.g.: PKG_LICENSE:=GPL-2.0+) Please use SPDX identifiers if possible (see list at the bottom). | |||
* An optional PKG_LICENSE_FILE including the filename of the license-file in the source-package. | |||
(E.g.: PKG_LICENSE_FILE:=COPYING) | |||
Please make sure that all commits you make to this repository: | |||
* Are signed-off (see https://dev.openwrt.org/wiki/SubmittingPatches#a10.Signyourwork) | |||
* Have a proper description prefixed with the package name | |||
Commits and pull-requests: | |||
* Have a useful description prefixed with the package name | |||
(E.g.: "foopkg: Add libzot dependency") | |||
* Include Signed-off-by in the comment | |||
(See <https://dev.openwrt.org/wiki/SubmittingPatches#a10.Signyourwork>) | |||
If you have commit access: | |||
* Do NOT use git push --force. | |||
* Do NOT commit to other maintainer's packages without their consent. | |||
* Use Pull Requests if you are unsure and to suggest changes to other maintainers. | |||
Gaining commit access: | |||
* We will gladly grant commit access to responsible contributors who have made | |||
useful pull requests and / or feedback or patches to this repository or | |||
OpenWrt in general. Please include your request for commit access in your | |||
next pull request or ticket. | |||
Release Branches: | |||
* Branches named "for-XX.YY" (e.g. for-14.07) are release branches. | |||
* These branches are built with the respective OpenWrt release and are created | |||
during the release stabilisation phase. | |||
* Please ONLY cherry-pick or commit security and bug-fixes to these branches. | |||
* Do NOT add new packages and do NOT do major upgrades of packages here. | |||
* If you are unsure if your change is suitable, please use a pull request. | |||
####Common LICENSE tags (short list) | |||
(Complete list can be found at: <http://spdx.org/licenses>) | |||
#### | |||
| Full Name | Identifier | | |||
|---|:---| | |||
|Apache License 1.0|Apache-1.0| | |||
|Apache License 1.1|Apache-1.1| | |||
|Apache License 2.0|Apache-2.0| | |||
|Artistic License 1.0|Artistic-1.0| | |||
|Artistic License 1.0 (Perl)|Artistic-1.0-Perl| | |||
|Artistic License 1.0 w/clause 8|Artistic-1.0-cl8| | |||
|Artistic License 2.0|Artistic-2.0| | |||
|BSD 2-clause "Simplified" License|BSD-2-Clause| | |||
|BSD 2-clause FreeBSD License|BSD-2-Clause-FreeBSD| | |||
|BSD 2-clause NetBSD License|BSD-2-Clause-NetBSD| | |||
|BSD 3-clause "New" or "Revised" License|BSD-3-Clause| | |||
|BSD 3-clause Clear License|BSD-3-Clause-Clear| | |||
|BSD 4-clause "Original" or "Old" License|BSD-4-Clause| | |||
|BSD Protection License|BSD-Protection| | |||
|BSD with attribution|BSD-3-Clause-Attribution| | |||
|BSD-4-Clause (University of California-Specific)|BSD-4-Clause-UC| | |||
|GNU General Public License v1.0 only|GPL-1.0| | |||
|GNU General Public License v1.0 or later|GPL-1.0+| | |||
|GNU General Public License v2.0 only|GPL-2.0| | |||
|GNU General Public License v2.0 or later|GPL-2.0+| | |||
|GNU General Public License v3.0 only|GPL-3.0| | |||
|GNU General Public License v3.0 or later|GPL-3.0+| | |||
|GNU Lesser General Public License v2.1 only|LGPL-2.1| | |||
|GNU Lesser General Public License v2.1 or later|LGPL-2.1+| | |||
|GNU Lesser General Public License v3.0 only|LGPL-3.0| | |||
|GNU Lesser General Public License v3.0 or later|LGPL-3.0+| | |||
|GNU Library General Public License v2 only|LGPL-2.0| | |||
|GNU Library General Public License v2 or later|LGPL-2.0+| | |||
|Fair License|Fair| | |||
|ISC License|ISC| | |||
|MIT License|MIT| | |||
|No Limit Public License|NLPL| | |||
|OpenSSL License|OpenSSL| | |||
|X11 License|X11| | |||
|zlib License|Zlib| |
@ -0,0 +1,115 @@ | |||
# | |||
# Copyright (C) 2008 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=gcc | |||
PKG_VERSION:=4.8.3 | |||
PKG_RELEASE:=1 | |||
PKG_SOURCE_URL:=ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-$(PKG_VERSION) \ | |||
http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-$(PKG_VERSION) \ | |||
ftp://ftp.gnu.org/gnu/gcc/releases/gcc-$(PKG_VERSION) | |||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 | |||
PKG_MD5SUM:=7c60f24fab389f77af203d2516ee110f | |||
PKG_INSTALL:=1 | |||
PKG_FIXUP:=libtool | |||
PKG_BUILD_PARALLEL:=1 | |||
include $(INCLUDE_DIR)/package.mk | |||
TARGET_LANGUAGES:="c,c++" | |||
BUGURL=https://dev.openwrt.org/ | |||
PKGVERSION=OpenWrt GCC $(PKG_VERSION) | |||
# not using sstrip here as this fucks up the .so's somehow | |||
STRIP:=$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)strip | |||
RSTRIP:= \ | |||
NM="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)nm" \ | |||
STRIP="$(STRIP)" \ | |||
STRIP_KMOD="$(STRIP) --strip-debug" \ | |||
$(SCRIPT_DIR)/rstrip.sh | |||
define Package/gcc | |||
SECTION:=devel | |||
CATEGORY:=Development | |||
TITLE:=gcc | |||
MAINTAINER:=Christian Beier <cb@shoutrlabs.com> | |||
DEPENDS:= +binutils +libstdcpp | |||
endef | |||
define Package/gcc/description | |||
build a native toolchain for compiling on target | |||
endef | |||
define Build/Prepare | |||
$(PKG_UNPACK) | |||
# we have to download additional stuff before patching | |||
(cd $(PKG_BUILD_DIR) && ./contrib/download_prerequisites) | |||
$(Build/Patch) | |||
endef | |||
define Build/Configure | |||
(cd $(PKG_BUILD_DIR); rm -f config.cache; \ | |||
SHELL="$(BASH)" \ | |||
$(TARGET_CONFIGURE_OPTS) \ | |||
$(PKG_BUILD_DIR)/configure \ | |||
$(CONFIGURE_ARGS) \ | |||
--build=$(GNU_HOST_NAME) \ | |||
--host=$(REAL_GNU_TARGET_NAME) \ | |||
--target=$(REAL_GNU_TARGET_NAME) \ | |||
--enable-languages=$(TARGET_LANGUAGES) \ | |||
--with-bugurl=$(BUGURL) \ | |||
--with-pkgversion="$(PKGVERSION)" \ | |||
--enable-shared \ | |||
--disable-__cxa_atexit \ | |||
--enable-target-optspace \ | |||
--with-gnu-ld \ | |||
--disable-nls \ | |||
--disable-libmudflap \ | |||
--disable-multilib \ | |||
--disable-libgomp \ | |||
--disable-libquadmath \ | |||
--disable-libssp \ | |||
--disable-decimal-float \ | |||
--disable-libstdcxx-pch \ | |||
--with-host-libstdcxx=-lstdc++ \ | |||
--prefix=/usr \ | |||
--libexecdir=/usr/lib \ | |||
$(SOFT_FLOAT_CONFIG_OPTION) \ | |||
$(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \ | |||
$(if $(CONFIG_mips64)$(CONFIG_mips64el),--with-arch=mips64 \ | |||
--with-abi=$(subst ",,$(CONFIG_MIPS64_ABI))) \ | |||
); | |||
endef | |||
define Build/Compile | |||
export SHELL="$(BASH)"; $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) \ | |||
DESTDIR="$(PKG_INSTALL_DIR)" $(MAKE_ARGS) all install | |||
endef | |||
define Package/gcc/install | |||
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) | |||
cp -ar $(PKG_INSTALL_DIR)/usr/include $(1)/usr | |||
cp -a $(PKG_INSTALL_DIR)/usr/bin/{$(REAL_GNU_TARGET_NAME)-{g++,gcc},cpp,gcov} $(1)/usr/bin | |||
ln -s $(REAL_GNU_TARGET_NAME)-g++ $(1)/usr/bin/c++ | |||
ln -s $(REAL_GNU_TARGET_NAME)-g++ $(1)/usr/bin/g++ | |||
ln -s $(REAL_GNU_TARGET_NAME)-g++ $(1)/usr/bin/$(REAL_GNU_TARGET_NAME)-c++ | |||
ln -s $(REAL_GNU_TARGET_NAME)-gcc $(1)/usr/bin/gcc | |||
ln -s $(REAL_GNU_TARGET_NAME)-gcc $(1)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc-$(PKG_VERSION) | |||
cp -ar $(PKG_INSTALL_DIR)/usr/lib/gcc $(1)/usr/lib | |||
$(RM) $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/*.a | |||
cp -ar $(TOOLCHAIN_DIR)/include $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) | |||
cp -a $(TOOLCHAIN_DIR)/lib/*.{o,so*} $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) | |||
cp -a $(TOOLCHAIN_DIR)/lib/*nonshared*.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) | |||
endef | |||
$(eval $(call BuildPackage,gcc)) |
@ -0,0 +1,8 @@ | |||
Native GCC that runs on target. | |||
To save disk space, this GCC only supports dynamic linking on the target box, | |||
there are no static libraries shipped. | |||
For now, this was only tested on a mips target. Others to be done... | |||
Christian Beier <cb@shoutrlabs.com> |
@ -0,0 +1,15 @@ | |||
diff --git a/gcc/real.h b/gcc/real.h | |||
index 2ff84f6..fbb4b0e 100644 | |||
--- a/gcc/real.h | |||
+++ b/gcc/real.h | |||
@@ -72,8 +72,10 @@ struct GTY(()) real_value { | |||
+ (REAL_VALUE_TYPE_SIZE%HOST_BITS_PER_WIDE_INT ? 1 : 0)) /* round up */ | |||
/* Verify the guess. */ | |||
+#ifndef __LP64__ | |||
extern char test_real_width | |||
[sizeof(REAL_VALUE_TYPE) <= REAL_WIDTH*sizeof(HOST_WIDE_INT) ? 1 : -1]; | |||
+#endif | |||
/* Calculate the format for CONST_DOUBLE. We need as many slots as | |||
are necessary to overlay a REAL_VALUE_TYPE on them. This could be |
@ -0,0 +1,38 @@ | |||
diff -Naurd mpfr-2.4.2-a/mpfr-longlong.h mpfr-2.4.2-b/mpfr-longlong.h | |||
--- -a/mpfr-2.4.2/mpfr-longlong.h 2009-11-30 02:43:08.000000000 +0000 | |||
+++ -b/mpfr-2.4.2/mpfr-longlong.h 2009-12-18 12:04:29.000000000 +0000 | |||
@@ -1011,7 +1011,15 @@ | |||
#endif /* __m88000__ */ | |||
#if defined (__mips) && W_TYPE_SIZE == 32 | |||
-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 | |||
+#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) | |||
+#define umul_ppmm(w1, w0, u, v) \ | |||
+ do { \ | |||
+ UDItype _r; \ | |||
+ _r = (UDItype) u * v; \ | |||
+ (w1) = _r >> 32; \ | |||
+ (w0) = (USItype) _r; \ | |||
+ } while (0) | |||
+#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7 | |||
#define umul_ppmm(w1, w0, u, v) \ | |||
__asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v)) | |||
#else | |||
@@ -1024,7 +1032,16 @@ | |||
#endif /* __mips */ | |||
#if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64 | |||
-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 | |||
+#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) | |||
+typedef unsigned int UTItype __attribute__ ((mode (TI))); | |||
+#define umul_ppmm(w1, w0, u, v) \ | |||
+ do { \ | |||
+ UTItype _r; \ | |||
+ _r = (UTItype) u * v; \ | |||
+ (w1) = _r >> 64; \ | |||
+ (w0) = (UDItype) _r; \ | |||
+ } while (0) | |||
+#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7 | |||
#define umul_ppmm(w1, w0, u, v) \ | |||
__asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v)) | |||
#else |
@ -0,0 +1,23 @@ | |||
--- a/gcc/Makefile.in | |||
+++ b/gcc/Makefile.in | |||
@@ -4326,18 +4326,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) | |||
doc/gccint.info: $(TEXI_GCCINT_FILES) | |||
doc/cppinternals.info: $(TEXI_CPPINT_FILES) | |||
-doc/%.info: %.texi | |||
- if [ x$(BUILD_INFO) = xinfo ]; then \ | |||
- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ | |||
- -I $(gcc_docdir)/include -o $@ $<; \ | |||
- fi | |||
+doc/%.info: | |||
# Duplicate entry to handle renaming of gccinstall.info | |||
-doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) | |||
- if [ x$(BUILD_INFO) = xinfo ]; then \ | |||
- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ | |||
- -I $(gcc_docdir)/include -o $@ $<; \ | |||
- fi | |||
+doc/gccinstall.info: | |||
doc/cpp.dvi: $(TEXI_CPP_FILES) | |||
doc/gcc.dvi: $(TEXI_GCC_FILES) |
@ -0,0 +1,33 @@ | |||
--- a/contrib/regression/objs-gcc.sh | |||
+++ b/contrib/regression/objs-gcc.sh | |||
@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H | |||
then | |||
make all-gdb all-dejagnu all-ld || exit 1 | |||
make install-gdb install-dejagnu install-ld || exit 1 | |||
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] | |||
+ then | |||
+ make all-gdb all-dejagnu all-ld || exit 1 | |||
+ make install-gdb install-dejagnu install-ld || exit 1 | |||
elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then | |||
make bootstrap || exit 1 | |||
make install || exit 1 | |||
--- a/libjava/classpath/ltconfig | |||
+++ b/libjava/classpath/ltconfig | |||
@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- | |||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts. | |||
case $host_os in | |||
-linux-gnu*) ;; | |||
+linux-gnu*|linux-uclibc*) ;; | |||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` | |||
esac | |||
@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux | |||
;; | |||
# This must be Linux ELF. | |||
-linux-gnu*) | |||
+linux*) | |||
version_type=linux | |||
need_lib_prefix=no | |||
need_version=no |
@ -0,0 +1,321 @@ | |||
--- a/gcc/config.gcc | |||
+++ b/gcc/config.gcc | |||
@@ -549,7 +549,7 @@ case ${target} in | |||
esac | |||
# Common C libraries. | |||
-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3" | |||
+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" | |||
# Common parts for widely ported systems. | |||
case ${target} in | |||
@@ -652,6 +652,9 @@ case ${target} in | |||
*-*-*uclibc*) | |||
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" | |||
;; | |||
+ *-*-*musl*) | |||
+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" | |||
+ ;; | |||
*) | |||
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" | |||
;; | |||
--- a/gcc/config/arm/linux-eabi.h | |||
+++ b/gcc/config/arm/linux-eabi.h | |||
@@ -77,6 +77,10 @@ | |||
%{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ | |||
%{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" | |||
+/* musl has no "classic" (i.e. broken) mode */ | |||
+#undef MUSL_DYNAMIC_LINKER | |||
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-arm.so.1" | |||
+ | |||
/* At this point, bpabi.h will have clobbered LINK_SPEC. We want to | |||
use the GNU/Linux version, not the generic BPABI version. */ | |||
#undef LINK_SPEC | |||
--- a/gcc/config/i386/linux.h | |||
+++ b/gcc/config/i386/linux.h | |||
@@ -21,3 +21,4 @@ along with GCC; see the file COPYING3. | |||
#define GNU_USER_LINK_EMULATION "elf_i386" | |||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | |||
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" | |||
--- a/gcc/config/i386/linux64.h | |||
+++ b/gcc/config/i386/linux64.h | |||
@@ -30,3 +30,7 @@ see the files COPYING3 and COPYING.RUNTI | |||
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" | |||
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" | |||
#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" | |||
+ | |||
+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" | |||
+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" | |||
+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" | |||
--- a/gcc/config/linux.h | |||
+++ b/gcc/config/linux.h | |||
@@ -32,10 +32,12 @@ see the files COPYING3 and COPYING.RUNTI | |||
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) | |||
#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) | |||
#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) | |||
+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) | |||
#else | |||
#define OPTION_GLIBC (linux_libc == LIBC_GLIBC) | |||
#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) | |||
#define OPTION_BIONIC (linux_libc == LIBC_BIONIC) | |||
+#define OPTION_MUSL (linux_libc == LIBC_MUSL) | |||
#endif | |||
#define GNU_USER_TARGET_OS_CPP_BUILTINS() \ | |||
@@ -53,18 +55,21 @@ see the files COPYING3 and COPYING.RUNTI | |||
uClibc or Bionic is the default C library and whether | |||
-muclibc or -mglibc or -mbionic has been passed to change the default. */ | |||
-#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ | |||
- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" | |||
+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ | |||
+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" | |||
#if DEFAULT_LIBC == LIBC_GLIBC | |||
-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ | |||
- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) | |||
+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ | |||
+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) | |||
#elif DEFAULT_LIBC == LIBC_UCLIBC | |||
-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ | |||
- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) | |||
+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ | |||
+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) | |||
#elif DEFAULT_LIBC == LIBC_BIONIC | |||
-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ | |||
- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) | |||
+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ | |||
+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) | |||
+#elif DEFAULT_LIBC == LIBC_MUSL | |||
+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ | |||
+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) | |||
#else | |||
#error "Unsupported DEFAULT_LIBC" | |||
#endif /* DEFAULT_LIBC */ | |||
@@ -84,16 +89,16 @@ see the files COPYING3 and COPYING.RUNTI | |||
#define GNU_USER_DYNAMIC_LINKER \ | |||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ | |||
- BIONIC_DYNAMIC_LINKER) | |||
+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) | |||
#define GNU_USER_DYNAMIC_LINKER32 \ | |||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ | |||
- BIONIC_DYNAMIC_LINKER32) | |||
+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) | |||
#define GNU_USER_DYNAMIC_LINKER64 \ | |||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ | |||
- BIONIC_DYNAMIC_LINKER64) | |||
+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) | |||
#define GNU_USER_DYNAMIC_LINKERX32 \ | |||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ | |||
- BIONIC_DYNAMIC_LINKERX32) | |||
+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32) | |||
/* Determine whether the entire c99 runtime | |||
is present in the runtime library. */ | |||
--- a/gcc/config/linux.opt | |||
+++ b/gcc/config/linux.opt | |||
@@ -30,3 +30,7 @@ Use GNU C library | |||
muclibc | |||
Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) | |||
Use uClibc C library | |||
+ | |||
+mmusl | |||
+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc) | |||
+Use musl C library | |||
--- a/gcc/config/mips/linux.h | |||
+++ b/gcc/config/mips/linux.h | |||
@@ -18,3 +18,5 @@ along with GCC; see the file COPYING3. | |||
<http://www.gnu.org/licenses/>. */ | |||
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" | |||
+ | |||
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips.so.1" | |||
--- a/gcc/config/rs6000/linux64.h | |||
+++ b/gcc/config/rs6000/linux64.h | |||
@@ -364,17 +364,21 @@ extern int dot_symbols; | |||
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1" | |||
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" | |||
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" | |||
+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1" | |||
+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1" | |||
#if DEFAULT_LIBC == LIBC_UCLIBC | |||
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" | |||
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" | |||
#elif DEFAULT_LIBC == LIBC_GLIBC | |||
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" | |||
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" | |||
+#elif DEFAULT_LIBC == LIBC_MUSL | |||
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" | |||
#else | |||
#error "Unsupported DEFAULT_LIBC" | |||
#endif | |||
#define GNU_USER_DYNAMIC_LINKER32 \ | |||
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) | |||
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) | |||
#define GNU_USER_DYNAMIC_LINKER64 \ | |||
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) | |||
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) | |||
#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \ | |||
--- a/gcc/config/rs6000/sysv4.h | |||
+++ b/gcc/config/rs6000/sysv4.h | |||
@@ -789,15 +789,18 @@ extern int fixuplabelno; | |||
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" | |||
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | |||
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1" | |||
#if DEFAULT_LIBC == LIBC_UCLIBC | |||
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" | |||
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" | |||
+#elif DEFAULT_LIBC == LIBC_MUSL | |||
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" | |||
#elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC | |||
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" | |||
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" | |||
#else | |||
#error "Unsupported DEFAULT_LIBC" | |||
#endif | |||
#define GNU_USER_DYNAMIC_LINKER \ | |||
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) | |||
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) | |||
#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ | |||
%{rdynamic:-export-dynamic} \ | |||
--- a/gcc/ginclude/stddef.h | |||
+++ b/gcc/ginclude/stddef.h | |||
@@ -181,6 +181,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; | |||
#ifndef _GCC_SIZE_T | |||
#ifndef _SIZET_ | |||
#ifndef __size_t | |||
+#ifndef __DEFINED_size_t /* musl */ | |||
#define __size_t__ /* BeOS */ | |||
#define __SIZE_T__ /* Cray Unicos/Mk */ | |||
#define _SIZE_T | |||
@@ -197,6 +198,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; | |||
#define ___int_size_t_h | |||
#define _GCC_SIZE_T | |||
#define _SIZET_ | |||
+#define __DEFINED_size_t /* musl */ | |||
#if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \ | |||
|| defined(__FreeBSD_kernel__) | |||
/* __size_t is a typedef on FreeBSD 5, must not trash it. */ | |||
@@ -214,6 +216,7 @@ typedef __SIZE_TYPE__ size_t; | |||
typedef long ssize_t; | |||
#endif /* __BEOS__ */ | |||
#endif /* !(defined (__GNUG__) && defined (size_t)) */ | |||
+#endif /* __DEFINED_size_t */ | |||
#endif /* __size_t */ | |||
#endif /* _SIZET_ */ | |||
#endif /* _GCC_SIZE_T */ | |||
--- a/libgomp/config/posix/time.c | |||
+++ b/libgomp/config/posix/time.c | |||
@@ -28,6 +28,8 @@ | |||
The following implementation uses the most simple POSIX routines. | |||
If present, POSIX 4 clocks should be used instead. */ | |||
+#define _POSIX_C_SOURCE 199309L /* for clocks */ | |||
+ | |||
#include "libgomp.h" | |||
#include <unistd.h> | |||
#if TIME_WITH_SYS_TIME | |||
--- a/libitm/config/arm/hwcap.cc | |||
+++ b/libitm/config/arm/hwcap.cc | |||
@@ -40,7 +40,11 @@ int GTM_hwcap HIDDEN = 0 | |||
#ifdef __linux__ | |||
#include <unistd.h> | |||
+#ifdef __GLIBC__ | |||
#include <sys/fcntl.h> | |||
+#else | |||
+#include <fcntl.h> | |||
+#endif | |||
#include <elf.h> | |||
static void __attribute__((constructor)) | |||
--- a/libitm/config/linux/x86/tls.h | |||
+++ b/libitm/config/linux/x86/tls.h | |||
@@ -25,16 +25,19 @@ | |||
#ifndef LIBITM_X86_TLS_H | |||
#define LIBITM_X86_TLS_H 1 | |||
-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) | |||
+#if defined(__GLIBC_PREREQ) | |||
+#if __GLIBC_PREREQ(2, 10) | |||
/* Use slots in the TCB head rather than __thread lookups. | |||
GLIBC has reserved words 10 through 13 for TM. */ | |||
#define HAVE_ARCH_GTM_THREAD 1 | |||
#define HAVE_ARCH_GTM_THREAD_DISP 1 | |||
#endif | |||
+#endif | |||
#include "config/generic/tls.h" | |||
-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) | |||
+#if defined(__GLIBC_PREREQ) | |||
+#if __GLIBC_PREREQ(2, 10) | |||
namespace GTM HIDDEN { | |||
#ifdef __x86_64__ | |||
@@ -101,5 +104,6 @@ static inline void set_abi_disp(struct a | |||
} // namespace GTM | |||
#endif /* >= GLIBC 2.10 */ | |||
+#endif | |||
#endif // LIBITM_X86_TLS_H | |||
--- a/libstdc++-v3/configure.host | |||
+++ b/libstdc++-v3/configure.host | |||
@@ -264,6 +264,13 @@ case "${host_os}" in | |||
os_include_dir="os/bsd/freebsd" | |||
;; | |||
gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) | |||
+ # check for musl by target | |||
+ case "${host_os}" in | |||
+ *-musl*) | |||
+ os_include_dir="os/generic" | |||
+ ;; | |||
+ *) | |||
+ | |||
if [ "$uclibc" = "yes" ]; then | |||
os_include_dir="os/uclibc" | |||
elif [ "$bionic" = "yes" ]; then | |||
@@ -272,6 +279,9 @@ case "${host_os}" in | |||
os_include_dir="os/gnu-linux" | |||
fi | |||
;; | |||
+ | |||
+ esac | |||
+ ;; | |||
hpux*) | |||
os_include_dir="os/hpux" | |||
;; | |||
--- a/gcc/config/mips/linux64.h | |||
+++ b/gcc/config/mips/linux64.h | |||
@@ -27,6 +27,9 @@ along with GCC; see the file COPYING3. | |||
#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1" | |||
#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0" | |||
#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" | |||
+#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mips.so.1" | |||
+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips.so.1" | |||
+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips.so.1" | |||
#define GNU_USER_DYNAMIC_LINKERN32 \ | |||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ | |||
- BIONIC_DYNAMIC_LINKERN32) | |||
+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32) | |||
--- a/gcc/config/sparc/linux64.h 2013-09-10 10:02:45.663973856 +0100 | |||
+++ b/gcc/config/sparc/linux64.h 2013-09-10 10:03:17.871972435 +0100 | |||
@@ -104,6 +104,9 @@ | |||
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" | |||
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" | |||
+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-sparc.so.1" | |||
+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-sparc.so.1" | |||
+ | |||
#ifdef SPARC_BI_ARCH | |||
#undef SUBTARGET_EXTRA_SPECS | |||
@ -0,0 +1,11 @@ | |||
--- a/gcc/config/arm/arm.h | |||
+++ b/gcc/config/arm/arm.h | |||
@@ -271,7 +271,7 @@ extern void (*arm_lang_output_object_att | |||
/* Thumb-1 only. */ | |||
#define TARGET_THUMB1_ONLY (TARGET_THUMB1 && !arm_arch_notm) | |||
-#define TARGET_LDRD (arm_arch5e && ARM_DOUBLEWORD_ALIGN \ | |||
+#define TARGET_LDRD (arm_arch6 && ARM_DOUBLEWORD_ALIGN \ | |||
&& !TARGET_THUMB1) | |||
/* The following two macros concern the ability to execute coprocessor |
@ -0,0 +1,25 @@ | |||
--- a/libgcc/config/arm/t-linux | |||
+++ b/libgcc/config/arm/t-linux | |||
@@ -1,6 +1,10 @@ | |||
LIB1ASMSRC = arm/lib1funcs.S | |||
LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ | |||
- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 | |||
+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ | |||
+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ | |||
+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ | |||
+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ | |||
+ _arm_fixsfsi _arm_fixunssfsi | |||
# Just for these, we omit the frame pointer since it makes such a big | |||
# difference. | |||
--- a/gcc/config/arm/linux-elf.h | |||
+++ b/gcc/config/arm/linux-elf.h | |||
@@ -55,8 +55,6 @@ | |||
%{shared:-lc} \ | |||
%{!shared:%{profile:-lc_p}%{!profile:-lc}}" | |||
-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" | |||
- | |||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | |||
#define LINUX_TARGET_LINK_SPEC "%{h*} \ |
@ -0,0 +1,36 @@ | |||
--- a/libgcc/Makefile.in | |||
+++ b/libgcc/Makefile.in | |||
@@ -865,11 +865,12 @@ $(libgcov-objects): %$(objext): $(srcdir | |||
# Static libraries. | |||
libgcc.a: $(libgcc-objects) | |||
+libgcc_pic.a: $(libgcc-s-objects) | |||
libgcov.a: $(libgcov-objects) | |||
libunwind.a: $(libunwind-objects) | |||
libgcc_eh.a: $(libgcc-eh-objects) | |||
-libgcc.a libgcov.a libunwind.a libgcc_eh.a: | |||
+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: | |||
-rm -f $@ | |||
objects="$(objects)"; \ | |||
@@ -891,7 +892,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_E | |||
endif | |||
ifeq ($(enable_shared),yes) | |||
-all: libgcc_eh.a libgcc_s$(SHLIB_EXT) | |||
+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) | |||
ifneq ($(LIBUNWIND),) | |||
all: libunwind$(SHLIB_EXT) | |||
endif | |||
@@ -1058,6 +1059,10 @@ install-shared: | |||
chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a | |||
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a | |||
+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ | |||
+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a | |||
+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a | |||
+ | |||
$(subst @multilib_dir@,$(MULTIDIR),$(subst \ | |||
@shlib_base_name@,libgcc_s,$(subst \ | |||
@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) |
@ -0,0 +1,13 @@ | |||
http://sourceware.org/ml/crossgcc/2008-05/msg00009.html | |||
--- a/gcc/config/arm/linux-eabi.h | |||
+++ b/gcc/config/arm/linux-eabi.h | |||
@@ -45,7 +45,7 @@ | |||
The ARM10TDMI core is the default for armv5t, so set | |||
SUBTARGET_CPU_DEFAULT to achieve this. */ | |||
#undef SUBTARGET_CPU_DEFAULT | |||
-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi | |||
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi | |||
/* TARGET_BIG_ENDIAN_DEFAULT is set in | |||
config.gcc for big endian configurations. */ |
@ -0,0 +1,19 @@ | |||
--- a/gcc/config/arm/linux-eabi.h | |||
+++ b/gcc/config/arm/linux-eabi.h | |||
@@ -81,10 +81,15 @@ | |||
#undef MUSL_DYNAMIC_LINKER | |||
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-arm.so.1" | |||
+/* For armv4 we pass --fix-v4bx to linker to support EABI */ | |||
+#undef TARGET_FIX_V4BX_SPEC | |||
+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ | |||
+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" | |||
+ | |||
/* At this point, bpabi.h will have clobbered LINK_SPEC. We want to | |||
use the GNU/Linux version, not the generic BPABI version. */ | |||
#undef LINK_SPEC | |||
-#define LINK_SPEC BE8_LINK_SPEC \ | |||
+#define LINK_SPEC BE8_LINK_SPEC TARGET_FIX_V4BX_SPEC \ | |||
LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ | |||
LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) | |||
@ -0,0 +1,47 @@ | |||
--- a/gcc/config/arm/linux-eabi.h | |||
+++ b/gcc/config/arm/linux-eabi.h | |||
@@ -114,10 +114,6 @@ | |||
#define ENDFILE_SPEC \ | |||
LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) | |||
-/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we | |||
- do not use -lfloat. */ | |||
-#undef LIBGCC_SPEC | |||
- | |||
/* Clear the instruction cache from `beg' to `end'. This is | |||
implemented in lib1funcs.S, so ensure an error if this definition | |||
is used. */ | |||
--- a/gcc/config/linux.h | |||
+++ b/gcc/config/linux.h | |||
@@ -51,6 +51,10 @@ see the files COPYING3 and COPYING.RUNTI | |||
builtin_assert ("system=posix"); \ | |||
} while (0) | |||
+#ifndef LIBGCC_SPEC | |||
+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" | |||
+#endif | |||
+ | |||
/* Determine which dynamic linker to use depending on whether GLIBC or | |||
uClibc or Bionic is the default C library and whether | |||
-muclibc or -mglibc or -mbionic has been passed to change the default. */ | |||
--- a/libgcc/mkmap-symver.awk | |||
+++ b/libgcc/mkmap-symver.awk | |||
@@ -132,5 +132,5 @@ function output(lib) { | |||
else if (inherit[lib]) | |||
printf("} %s;\n", inherit[lib]); | |||
else | |||
- printf ("\n local:\n\t*;\n};\n"); | |||
+ printf ("\n\t*;\n};\n"); | |||
} | |||
--- a/gcc/config/rs6000/linux.h | |||
+++ b/gcc/config/rs6000/linux.h | |||
@@ -61,6 +61,9 @@ | |||
#undef CPLUSPLUS_CPP_SPEC | |||
#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" | |||
+#undef LIBGCC_SPEC | |||
+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" | |||
+ | |||
#undef LINK_SHLIB_SPEC | |||
#define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" | |||
@ -0,0 +1,29 @@ | |||
--- a/libgcc/crtstuff.c | |||
+++ b/libgcc/crtstuff.c | |||
@@ -100,15 +100,20 @@ call_ ## FUNC (void) \ | |||
#if defined(OBJECT_FORMAT_ELF) \ | |||
&& !defined(OBJECT_FORMAT_FLAT) \ | |||
&& defined(HAVE_LD_EH_FRAME_HDR) \ | |||
- && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \ | |||
- && defined(__GLIBC__) && __GLIBC__ >= 2 | |||
+ && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) | |||
#include <link.h> | |||
/* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h. | |||
But it doesn't use PT_GNU_EH_FRAME ELF segment currently. */ | |||
-# if !defined(__UCLIBC__) \ | |||
- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ | |||
- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) | |||
-# define USE_PT_GNU_EH_FRAME | |||
+# if defined(__UCLIBC__) | |||
+# if (__UCLIBC_MAJOR__ > 0 || __UCLIBC_MINOR__ > 9 || \ | |||
+ (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ >= 33)) | |||
+# define USE_PT_GNU_EH_FRAME | |||
+# endif | |||
+# elif defined(__GLIBC__) | |||
+# if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ | |||
+ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) | |||
+# define USE_PT_GNU_EH_FRAME | |||
+# endif | |||
# endif | |||
#endif | |||
@ -0,0 +1,11 @@ | |||
--- a/gcc/config/rs6000/rs6000.c | |||
+++ b/gcc/config/rs6000/rs6000.c | |||
@@ -17653,7 +17653,7 @@ rs6000_savres_strategy (rs6000_stack_t * | |||
/* Define cutoff for using out-of-line functions to save registers. */ | |||
if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) | |||
{ | |||
- if (!optimize_size) | |||
+ if (1) | |||
{ | |||
strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; | |||
strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; |
@ -0,0 +1,11 @@ | |||
--- a/gcc/defaults.h | |||
+++ b/gcc/defaults.h | |||
@@ -380,7 +380,7 @@ see the files COPYING3 and COPYING.RUNTI | |||
/* If we have named section and we support weak symbols, then use the | |||
.jcr section for recording java classes which need to be registered | |||
at program start-up time. */ | |||
-#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK | |||
+#if 0 && defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK | |||
#ifndef JCR_SECTION_NAME | |||
#define JCR_SECTION_NAME ".jcr" | |||
#endif |
@ -0,0 +1,9 @@ | |||
--- a/libgcc/config/mips/t-mips16 | |||
+++ b/libgcc/config/mips/t-mips16 | |||
@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 | |||
# Version these symbols if building libgcc.so. | |||
SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver | |||
+ | |||
+CRTSTUFF_T_CFLAGS += -mno-mips16 | |||
+CRTSTUFF_T_CFLAGS_S += -mno-mips16 |
@ -0,0 +1,253 @@ | |||
This patch brings over a few features from MirBSD: | |||
* -fhonour-copts | |||
If this option is not given, it's warned (depending | |||
on environment variables). This is to catch errors | |||
of misbuilt packages which override CFLAGS themselves. | |||
* -Werror-maybe-reset | |||
Has the effect of -Wno-error if GCC_NO_WERROR is | |||
set and not '0', a no-operation otherwise. This is | |||
to be able to use -Werror in "make" but prevent | |||
GNU autoconf generated configure scripts from | |||
freaking out. | |||
* Make -fno-strict-aliasing and -fno-delete-null-pointer-checks | |||
the default for -O2/-Os, because they trigger gcc bugs | |||
and can delete code with security implications. | |||
This patch was authored by Thorsten Glaser <tg at mirbsd.de> | |||
with copyright assignment to the FSF in effect. | |||
--- a/gcc/c-family/c-opts.c | |||
+++ b/gcc/c-family/c-opts.c | |||
@@ -104,6 +104,9 @@ static size_t include_cursor; | |||
/* Whether any standard preincluded header has been preincluded. */ | |||
static bool done_preinclude; | |||
+/* Check if a port honours COPTS. */ | |||
+static int honour_copts = 0; | |||
+ | |||
static void handle_OPT_d (const char *); | |||
static void set_std_cxx98 (int); | |||
static void set_std_cxx11 (int); | |||
@@ -383,6 +386,9 @@ c_common_handle_option (size_t scode, co | |||
cpp_opts->warn_endif_labels = value; | |||
break; | |||
+ case OPT_Werror_maybe_reset: | |||
+ break; | |||
+ | |||
case OPT_Winvalid_pch: | |||
cpp_opts->warn_invalid_pch = value; | |||
break; | |||
@@ -491,6 +497,12 @@ c_common_handle_option (size_t scode, co | |||
flag_no_builtin = !value; | |||
break; | |||
+ case OPT_fhonour_copts: | |||
+ if (c_language == clk_c) { | |||
+ honour_copts++; | |||
+ } | |||
+ break; | |||
+ | |||
case OPT_fconstant_string_class_: | |||
constant_string_class_name = arg; | |||
break; | |||
@@ -1027,6 +1039,47 @@ c_common_init (void) | |||
return false; | |||
} | |||
+ if (c_language == clk_c) { | |||
+ char *ev = getenv ("GCC_HONOUR_COPTS"); | |||
+ int evv; | |||
+ if (ev == NULL) | |||
+ evv = -1; | |||
+ else if ((*ev == '0') || (*ev == '\0')) | |||
+ evv = 0; | |||
+ else if (*ev == '1') | |||
+ evv = 1; | |||
+ else if (*ev == '2') | |||
+ evv = 2; | |||
+ else if (*ev == 's') | |||
+ evv = -1; | |||
+ else { | |||
+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); | |||
+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ | |||
+ } | |||
+ if (evv == 1) { | |||
+ if (honour_copts == 0) { | |||
+ error ("someone does not honour COPTS at all in lenient mode"); | |||
+ return false; | |||
+ } else if (honour_copts != 1) { | |||
+ warning (0, "someone does not honour COPTS correctly, passed %d times", | |||
+ honour_copts); | |||
+ } | |||
+ } else if (evv == 2) { | |||
+ if (honour_copts == 0) { | |||
+ error ("someone does not honour COPTS at all in strict mode"); | |||
+ return false; | |||
+ } else if (honour_copts != 1) { | |||
+ error ("someone does not honour COPTS correctly, passed %d times", | |||
+ honour_copts); | |||
+ return false; | |||
+ } | |||
+ } else if (evv == 0) { | |||
+ if (honour_copts != 1) | |||
+ inform (0, "someone does not honour COPTS correctly, passed %d times", | |||
+ honour_copts); | |||
+ } | |||
+ } | |||
+ | |||
return true; | |||
} | |||
--- a/gcc/c-family/c.opt | |||
+++ b/gcc/c-family/c.opt | |||
@@ -379,6 +379,10 @@ Werror-implicit-function-declaration | |||
C ObjC RejectNegative Warning Alias(Werror=, implicit-function-declaration) | |||
This switch is deprecated; use -Werror=implicit-function-declaration instead | |||
+Werror-maybe-reset | |||
+C ObjC C++ ObjC++ | |||
+; Documented in common.opt | |||
+ | |||
Wfloat-equal | |||
C ObjC C++ ObjC++ Var(warn_float_equal) Warning | |||
Warn if testing floating point numbers for equality | |||
@@ -949,6 +953,9 @@ C++ ObjC++ Optimization Alias(fexception | |||
fhonor-std | |||
C++ ObjC++ Ignore Warn(switch %qs is no longer supported) | |||
+fhonour-copts | |||
+C ObjC C++ ObjC++ RejectNegative | |||
+ | |||
fhosted | |||
C ObjC | |||
Assume normal C execution environment | |||
--- a/gcc/common.opt | |||
+++ b/gcc/common.opt | |||
@@ -541,6 +541,10 @@ Werror= | |||
Common Joined | |||
Treat specified warning as error | |||
+Werror-maybe-reset | |||
+Common | |||
+If environment variable GCC_NO_WERROR is set, act as -Wno-error | |||
+ | |||
Wextra | |||
Common Var(extra_warnings) Warning | |||
Print extra (possibly unwanted) warnings | |||
@@ -1242,6 +1246,9 @@ fguess-branch-probability | |||
Common Report Var(flag_guess_branch_prob) Optimization | |||
Enable guessing of branch probabilities | |||
+fhonour-copts | |||
+Common RejectNegative | |||
+ | |||
; Nonzero means ignore `#ident' directives. 0 means handle them. | |||
; Generate position-independent code for executables if possible | |||
; On SVR4 targets, it also controls whether or not to emit a | |||
--- a/gcc/opts.c | |||
+++ b/gcc/opts.c | |||
@@ -468,8 +468,6 @@ static const struct default_options defa | |||
{ OPT_LEVELS_2_PLUS, OPT_fschedule_insns2, NULL, 1 }, | |||
#endif | |||
{ OPT_LEVELS_2_PLUS, OPT_fregmove, NULL, 1 }, | |||
- { OPT_LEVELS_2_PLUS, OPT_fstrict_aliasing, NULL, 1 }, | |||
- { OPT_LEVELS_2_PLUS, OPT_fstrict_overflow, NULL, 1 }, | |||
{ OPT_LEVELS_2_PLUS, OPT_freorder_blocks, NULL, 1 }, | |||
{ OPT_LEVELS_2_PLUS, OPT_freorder_functions, NULL, 1 }, | |||
{ OPT_LEVELS_2_PLUS, OPT_ftree_vrp, NULL, 1 }, | |||
@@ -488,6 +486,8 @@ static const struct default_options defa | |||
{ OPT_LEVELS_2_PLUS, OPT_fhoist_adjacent_loads, NULL, 1 }, | |||
/* -O3 optimizations. */ | |||
+ { OPT_LEVELS_3_PLUS, OPT_fstrict_aliasing, NULL, 1 }, | |||
+ { OPT_LEVELS_3_PLUS, OPT_fstrict_overflow, NULL, 1 }, | |||
{ OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 }, | |||
{ OPT_LEVELS_3_PLUS, OPT_fpredictive_commoning, NULL, 1 }, | |||
/* Inlining of functions reducing size is a good idea with -Os | |||
@@ -1423,6 +1423,17 @@ common_handle_option (struct gcc_options | |||
opts, opts_set, loc, dc); | |||
break; | |||
+ case OPT_Werror_maybe_reset: | |||
+ { | |||
+ char *ev = getenv ("GCC_NO_WERROR"); | |||
+ if ((ev != NULL) && (*ev != '0')) | |||
+ warnings_are_errors = 0; | |||
+ } | |||
+ break; | |||
+ | |||
+ case OPT_fhonour_copts: | |||
+ break; | |||
+ | |||
case OPT_Wlarger_than_: | |||
opts->x_larger_than_size = value; | |||
opts->x_warn_larger_than = value != -1; | |||
--- a/gcc/doc/cppopts.texi | |||
+++ b/gcc/doc/cppopts.texi | |||
@@ -163,6 +163,11 @@ in older programs. This warning is on b | |||
Make all warnings into hard errors. Source code which triggers warnings | |||
will be rejected. | |||
+ at item -Werror-maybe-reset | |||
+ at opindex Werror-maybe-reset | |||
+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment | |||
+variable is set to anything other than 0 or empty. | |||
+ | |||
@item -Wsystem-headers | |||
@opindex Wsystem-headers | |||
Issue warnings for code in system headers. These are normally unhelpful | |||
--- a/gcc/doc/invoke.texi | |||
+++ b/gcc/doc/invoke.texi | |||
@@ -240,7 +240,7 @@ Objective-C and Objective-C++ Dialects}. | |||
-Wconversion -Wcoverage-mismatch -Wno-cpp -Wno-deprecated @gol | |||
-Wno-deprecated-declarations -Wdisabled-optimization @gol | |||
-Wno-div-by-zero -Wdouble-promotion -Wempty-body -Wenum-compare @gol | |||
--Wno-endif-labels -Werror -Werror=* @gol | |||
+-Wno-endif-labels -Werror -Werror=* -Werror-maybe-reset @gol | |||
-Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol | |||
-Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol | |||
-Wformat-security -Wformat-y2k @gol | |||
@@ -4808,6 +4808,22 @@ This option is only supported for C and | |||
@option{-Wall} and by @option{-Wpedantic}, which can be disabled with | |||
@option{-Wno-pointer-sign}. | |||
+ at item -Werror-maybe-reset | |||
+ at opindex Werror-maybe-reset | |||
+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment | |||
+variable is set to anything other than 0 or empty. | |||
+ | |||
+ at item -fhonour-copts | |||
+ at opindex fhonour-copts | |||
+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not | |||
+given at least once, and warn if it is given more than once. | |||
+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not | |||
+given exactly once. | |||
+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option | |||
+is not given exactly once. | |||
+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. | |||
+This flag and environment variable only affect the C language. | |||
+ | |||
@item -Wstack-protector | |||
@opindex Wstack-protector | |||
@opindex Wno-stack-protector | |||
@@ -6919,7 +6935,7 @@ so, the first branch is redirected to ei | |||
second branch or a point immediately following it, depending on whether | |||
the condition is known to be true or false. | |||
-Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. | |||
+Enabled at levels @option{-O3}. | |||
@item -fsplit-wide-types | |||
@opindex fsplit-wide-types | |||
--- a/gcc/java/jvspec.c | |||
+++ b/gcc/java/jvspec.c | |||
@@ -626,6 +626,7 @@ lang_specific_pre_link (void) | |||
class name. Append dummy `.c' that can be stripped by set_input so %b | |||
is correct. */ | |||
set_input (concat (main_class_name, "main.c", NULL)); | |||
+ putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack! */ | |||
err = do_spec (jvgenmain_spec); | |||
if (err == 0) | |||
{ |
@ -0,0 +1,14 @@ | |||
--- a/gcc/gcc.c | |||
+++ b/gcc/gcc.c | |||
@@ -8003,7 +8003,10 @@ getenv_spec_function (int argc, const ch | |||
value = getenv (argv[0]); | |||
if (!value) | |||
- fatal_error ("environment variable %qs not defined", argv[0]); | |||
+ { | |||
+ warning (0, "environment variable %qs not defined", argv[0]); | |||
+ value = ""; | |||
+ } | |||
/* We have to escape every character of the environment variable so | |||
they are not interpreted as active spec characters. A |
@ -0,0 +1,335 @@ | |||
# | |||
# Copyright (C) 2009-2014 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=erlang | |||
PKG_VERSION:=17.1 | |||
PKG_RELEASE:=1 | |||
PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:= http://www.erlang.org/download/ \ | |||
http://erlang.mirror.su.se/ | |||
PKG_MD5SUM:=9c90706ce70e01651adde34a2b79bf4c | |||
PKG_LICENSE:=ErlPL-1.1 | |||
PKG_LICENSE_FILE:=EPLICENCE | |||
PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org> | |||
PKG_BUILD_DEPENDS:=erlang/host openssl | |||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/otp_src_$(PKG_VERSION) | |||
PKG_BUILD_DIR:=$(BUILD_DIR)/otp_src_$(PKG_VERSION) | |||
include $(INCLUDE_DIR)/host-build.mk | |||
include $(INCLUDE_DIR)/package.mk | |||
define Package/erlang/Default | |||
SUBMENU:=Erlang | |||
SECTION:=lang | |||
CATEGORY:=Languages | |||
TITLE:=Erlang/OTP programming language | |||
URL:=http://www.erlang.org/ | |||
endef | |||
define Package/erlang/Default/description | |||
Erlang/OTP is a general-purpose programming language and runtime | |||
environment. Erlang has built-in support for concurrency, distribution | |||
and fault tolerance. | |||
endef | |||
define Package/erlang | |||
$(call Package/erlang/Default) | |||
DEPENDS+= +libncurses +librt +zlib | |||
PROVIDES:= erlang-erts=6.1 erlang-kernel=3.0.1 erlang-sasl=2.4 erlang-stdlib=2.1 | |||
endef | |||
define Package/erlang/description | |||
$(call Package/erlang/Default/description) | |||
. | |||
This package contains the runtime implementation and a minimal set of | |||
modules (erts, kernel, sasl & stdlib). | |||
endef | |||
define Package/erlang-asn1 | |||
$(call Package/erlang/Default) | |||
TITLE:=Abstract Syntax Notation One (ASN.1) support | |||
VERSION:=3.0.1 | |||
DEPENDS+= +erlang +erlang-syntax-tools | |||
endef | |||
define Package/erlang-asn1/description | |||
$(call Package/erlang/Default/description) | |||
. | |||
This Erlang/OTP package provides Abstract Syntax Notation One (ASN.1) | |||
support. | |||
endef | |||
define Package/erlang-compiler | |||
$(call Package/erlang/Default) | |||
TITLE:=Byte code compiler | |||
VERSION:=5.0.1 | |||
DEPENDS+= +erlang +erlang-hipe | |||
endef | |||
define Package/erlang-compiler/description | |||
$(call Package/erlang/Default/description) | |||
. | |||
This Erlang/OTP package provides a byte code compiler for Erlang which | |||
produces highly compact code. | |||
endef | |||
define Package/erlang-crypto | |||
$(call Package/erlang/Default) | |||
TITLE:=Cryptography support | |||
VERSION:=3.4 | |||
DEPENDS+= +erlang +libopenssl | |||
endef | |||
define Package/erlang-crypto/description | |||
$(call Package/erlang/Default/description) | |||
. | |||
This Erlang/OTP package provides functions for computation of message | |||
digests, and encryption and decryption functions. | |||
endef | |||
define Package/erlang-hipe | |||
$(call Package/erlang/Default) | |||
TITLE:=High Performance Erlang | |||
VERSION:=3.11 | |||
DEPENDS+= +erlang | |||
endef | |||
define Package/erlang-hipe/description | |||
$(call Package/erlang/Default/description) | |||
. | |||
This Erlang/OTP package provides HiPE (High Performance Erlang) | |||
support. | |||
endef | |||
define Package/erlang-inets | |||
$(call Package/erlang/Default) | |||
TITLE:=Internet clients and servers | |||
VERSION:=5.10.2 | |||
DEPENDS+= +erlang | |||
endef | |||
define Package/erlang-inets/description | |||
$(call Package/erlang/Default/description) | |||
. | |||
This Erlang/OTP package provides a container for Internet clients and | |||
servers. Currently a FTP client, a HTTP client and server, and a tftp | |||
client and server have been incorporated in Inets. | |||
endef | |||
define Package/erlang-mnesia | |||
$(call Package/erlang/Default) | |||
TITLE:=Distributed database | |||
VERSION:=4.12.1 | |||
DEPENDS+= +erlang | |||
endef | |||
define Package/erlang-mnesia/description | |||
$(call Package/erlang/Default/description) | |||
. | |||
This Erlang/OTP package provides a distributed DataBase Management | |||
System (DBMS), appropriate for telecommunications applications and | |||
other Erlang applications which require continuous operation and | |||
exhibit soft real-time properties. | |||
endef | |||
define Package/erlang-runtime-tools | |||
$(call Package/erlang/Default) | |||
TITLE:=Low-profile debugging/tracing tools | |||
VERSION:=1.8.14 | |||
DEPENDS+= +erlang | |||
endef | |||
define Package/erlang-runtime-tools/description | |||
$(call Package/erlang/Default/description) | |||
. | |||
This Erlang/OTP package provides low footprint tracing/debugging tools | |||
suitable for inclusion in a production system. | |||
endef | |||
define Package/erlang-snmp | |||
$(call Package/erlang/Default) | |||
TITLE:=Simple Network Management Protocol (SNMP) support | |||
VERSION:=4.25.1 | |||
DEPENDS+= +erlang +erlang-asn1 | |||
endef | |||
define Package/erlang-snmp/description | |||
$(call Package/erlang/Default/description) | |||
. | |||
This Erlang/OTP package provides Simple Network Management Protocol | |||
(SNMP) support including a MIB compiler and tools for creating SNMP | |||
agents. | |||
endef | |||
define Package/erlang-ssh | |||
$(call Package/erlang/Default) | |||
TITLE:=Secure Shell (SSH) support | |||
VERSION:=3.0.3 | |||
DEPENDS+= +erlang +erlang-crypto | |||
endef | |||
define Package/erlang-ssh/description | |||
$(call Package/erlang/Default/description) | |||
. | |||
This Erlang/OTP package provides an implementation of the Secure Shell | |||
protocol, with SSH & SFTP support. | |||
endef | |||
define Package/erlang-ssl | |||
$(call Package/erlang/Default) | |||
TITLE:=Secure Sockets Layer (SSL) support | |||
VERSION:=5.3.5 | |||
DEPENDS+= +erlang +erlang-crypto | |||
endef | |||
define Package/erlang-ssl/description | |||
$(call Package/erlang/Default/description) | |||
. | |||
This Erlang/OTP package provides support for secure communication over | |||
sockets. | |||
endef | |||
define Package/erlang-syntax-tools | |||
$(call Package/erlang/Default) | |||
TITLE:=Abstract Erlang syntax trees handling support | |||
VERSION:=1.6.15 | |||
DEPENDS+= +erlang | |||
endef | |||
define Package/erlang-syntax-tools/description | |||
$(call Package/erlang/Default/description) | |||
. | |||
This Erlang/OTP package provides support for handling abstract Erlang | |||
syntax trees. | |||
endef | |||
# Host | |||
HOST_CONFIGURE_ARGS += \ | |||
--disable-hipe \ | |||
--disable-smp-support \ | |||
--without-javac | |||
define Host/Compile | |||
$(MAKE) -C $(HOST_BUILD_DIR) all | |||
endef | |||
define Host/Install | |||
$(MAKE) -C $(HOST_BUILD_DIR) install | |||
endef | |||
# Target | |||
CONFIGURE_ARGS += \ | |||
--disable-hipe \ | |||
--disable-smp-support \ | |||
--without-javac \ | |||
--enable-dynamic-ssl-lib | |||
CONFIGURE_VARS += \ | |||
SHLIB_LD="$(TARGET_CC)" \ | |||
TARGET_ARCH="$(TARGET_ARCH)" \ | |||
ac_cv_func_mmap_fixed_mapped=yes \ | |||
ac_cv_path_WX_CONFIG_PATH=no \ | |||
erl_xcomp_getaddrinfo=no \ | |||
erl_xcomp_sysroot="$(STAGING_DIR)" | |||
EXTRA_LDFLAGS+=-lz | |||
define Build/Compile | |||
$(MAKE) -C $(PKG_BUILD_DIR) \ | |||
noboot | |||
$(MAKE) -C $(PKG_BUILD_DIR) \ | |||
INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ | |||
install | |||
endef | |||
define Package/erlang/install | |||
$(INSTALL_DIR) $(1)/usr/bin | |||
for f in epmd erl erlc escript run_erl; do \ | |||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/$$$$f $(1)/usr/bin/ ; \ | |||
done | |||
$(INSTALL_DIR) $(1)/usr/lib/erlang/bin | |||
for f in erl erlc escript run_erl start start.boot start.script start_clean.boot start_erl start_sasl.boot to_erl; do \ | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/bin/$$$$f $(1)/usr/lib/erlang/bin/ ; \ | |||
done | |||
$(INSTALL_DIR) $(1)/usr/lib/erlang/lib | |||
for m in erts kernel sasl stdlib; do \ | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/lib/$$$$m-* $(1)/usr/lib/erlang/lib/ ; \ | |||
rm -rf $(1)/usr/lib/erlang/lib/$$$$m-*/examples ; \ | |||
rm -rf $(1)/usr/lib/erlang/lib/$$$$m-*/src ; \ | |||
done | |||
$(INSTALL_DIR) $(1)/usr/lib/erlang | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/erts-* $(1)/usr/lib/erlang/ | |||
rm -rf $(1)/usr/lib/erlang/erts-*/{doc,include,lib,man,src} | |||
rm -rf $(1)/usr/lib/erlang/erts-*/bin/*.src | |||
$(INSTALL_DIR) $(1)/usr/lib/erlang/releases | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/releases/* $(1)/usr/lib/erlang/releases/ | |||
$(SED) 's,%ERL_ROOT%,/usr/lib/erlang,g' \ | |||
$(1)/usr/lib/erlang/releases/RELEASES.src | |||
mv -f $(1)/usr/lib/erlang/releases/RELEASES.src \ | |||
$(1)/usr/lib/erlang/releases/RELEASES | |||
for f in bin/erl bin/start erts-*/bin/erl erts-*/bin/start; do \ | |||
$(SED) 's,^\(ROOTDIR\)=.*,\1=/usr/lib/erlang,g' \ | |||
$(1)/usr/lib/erlang/$$$$f ; \ | |||
done | |||
endef | |||
define Build/InstallDev | |||
$(INSTALL_DIR) $(1)/usr/lib | |||
$(CP) $(PKG_BUILD_DIR)/lib/erl_interface/obj/*/*.a $(1)/usr/lib | |||
$(INSTALL_DIR) $(1)/usr/include | |||
$(CP) $(PKG_BUILD_DIR)/lib/erl_interface/include/*.h $(1)/usr/include | |||
endef | |||
define BuildModule | |||
define Package/erlang-$(1)/install | |||
$(INSTALL_DIR) $$(1)/usr/lib/erlang/lib | |||
for m in $(2); do \ | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/lib/$$$$$$$$m-* $$(1)/usr/lib/erlang/lib/ ; \ | |||
rm -rf $$(1)/usr/lib/erlang/lib/$$$$$$$$m-*/{examples,priv/obj,src} ; \ | |||
done | |||
endef | |||
$$(eval $$(call BuildPackage,erlang-$(1))) | |||
endef | |||
$(eval $(call HostBuild)) | |||
$(eval $(call BuildPackage,erlang)) | |||
$(eval $(call BuildModule,asn1,asn1)) | |||
$(eval $(call BuildModule,compiler,compiler)) | |||
$(eval $(call BuildModule,crypto,crypto)) | |||
$(eval $(call BuildModule,hipe,hipe)) | |||
$(eval $(call BuildModule,inets,inets)) | |||
$(eval $(call BuildModule,mnesia,mnesia)) | |||
$(eval $(call BuildModule,runtime-tools,runtime_tools)) | |||
$(eval $(call BuildModule,snmp,snmp)) | |||
$(eval $(call BuildModule,ssh,ssh)) | |||
$(eval $(call BuildModule,ssl,ssl)) | |||
$(eval $(call BuildModule,syntax-tools,syntax_tools)) |
@ -0,0 +1,11 @@ | |||
--- a/erts/emulator/Makefile.in | |||
+++ b/erts/emulator/Makefile.in | |||
@@ -682,7 +682,7 @@ $(OBJDIR)/beam_emu.o: beam/beam_emu.c | |||
endif | |||
$(OBJDIR)/%.o: beam/%.c | |||
- $(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@ | |||
+ $(V_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@ | |||
$(OBJDIR)/%.o: $(TARGET)/%.c | |||
$(V_CC) $(CFLAGS) $(INCLUDES) -Idrivers/common -c $< -o $@ |
@ -0,0 +1,11 @@ | |||
--- a/lib/tools/Makefile | |||
+++ b/lib/tools/Makefile | |||
@@ -23,7 +23,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk | |||
# Macros | |||
# ---------------------------------------------------- | |||
-SUB_DIRECTORIES = c_src src doc/src examples priv emacs | |||
+SUB_DIRECTORIES = c_src src doc/src examples priv | |||
include vsn.mk | |||
VSN = $(TOOLS_VSN) |
@ -0,0 +1,56 @@ | |||
# | |||
# Copyright (C) 2011 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=luasoap | |||
PKG_VERSION:=2014-08-21 | |||
PKG_RELEASE=$(PKG_SOURCE_VERSION) | |||
PKG_SOURCE_PROTO:=git | |||
PKG_SOURCE_URL:=https://github.com/tomasguisasola/luasoap.git | |||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) | |||
PKG_SOURCE_VERSION:=af1e100281cee4b972df10121e37e51d53367a98 | |||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz | |||
PKG_MIRROR_MD5SUM:= | |||
PKG_MAINTAINER:=Liu Peng <pengliu@credosemi.com> | |||
PKG_LICENSE:=MIT | |||
include $(INCLUDE_DIR)/package.mk | |||
define Package/luasoap | |||
SUBMENU:=Lua | |||
SECTION:=lang | |||
CATEGORY:=Languages | |||
TITLE:=LuaSOAP | |||
URL:=https://github.com/tomasguisasola/luasoap | |||
DEPENDS:=+lua +luaexpat +luasec +luasocket | |||
endef | |||
define Package/luasoap/description | |||
LuaSOAP is a library of functions to deal with SOAP. | |||
endef | |||
define Build/Configure | |||
endef | |||
define Build/Compile | |||
endef | |||
define Package/luasoap/install | |||
$(INSTALL_DIR) $(1)/usr/lib/lua | |||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/soap.lua $(1)/usr/lib/lua/ | |||
$(INSTALL_DIR) $(1)/usr/lib/lua/soap | |||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{client,server}.lua $(1)/usr/lib/lua/soap/ | |||
$(INSTALL_DIR) $(1)/usr/lib/lua/soap/client | |||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/client/https.lua $(1)/usr/lib/lua/soap/client/ | |||
$(INSTALL_DIR) $(1)/usr/lib/lua/soap/tests | |||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/tests/test{,-http,-server}.lua $(1)/usr/lib/lua/soap/tests/ | |||
endef | |||
$(eval $(call BuildPackage,luasoap)) |
@ -0,0 +1,116 @@ | |||
# | |||
# Copyright (C) 2010-2014 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=luasql | |||
PKG_VERSION:=2.1.1 | |||
PKG_RELEASE:=1 | |||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:=http://files.luaforge.net/releases/luasql/luasql | |||
PKG_MD5SUM:=63bdd57de4b9d1be336ba112d8cb69eb | |||
PKG_LICENSE:=MIT | |||
PKG_LICENSE_FILE:=docs/us/license.html | |||
PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org> | |||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) | |||
include $(INCLUDE_DIR)/package.mk | |||
define Package/luasql/Default | |||
SUBMENU:=Lua | |||
SECTION:=lang | |||
CATEGORY:=Languages | |||
TITLE:=Lua SQL binding | |||
URL:=http://www.keplerproject.org/luasql/ | |||
DEPENDS:= +lua | |||
endef | |||
define Package/luasql/Default/description | |||
LuaSQL is a simple interface from Lua to a DBMS. | |||
endef | |||
define Package/luasql-mysql | |||
$(call Package/luasql/Default) | |||
TITLE+= for MySQL | |||
DEPENDS+= +libmysqlclient | |||
VARIANT:=mysql | |||
endef | |||
define Package/luasql-mysql/description | |||
$(call Package/luasql/Default/description) | |||
. | |||
This package contains the MySQL binding. | |||
endef | |||
define Package/luasql-pgsql | |||
$(call Package/luasql/Default) | |||
TITLE+= for PostgreSQL | |||
DEPENDS+= +libpq | |||
VARIANT:=postgres | |||
endef | |||
define Package/luasql-pgsql/description | |||
$(call Package/luasql/Default/description) | |||
. | |||
This package contains the PostgreSQL binding. | |||
endef | |||
define Package/luasql-sqlite3 | |||
$(call Package/luasql/Default) | |||
TITLE+= for SQLite 3 | |||
DEPENDS+= +libsqlite3 | |||
VARIANT:=sqlite3 | |||
endef | |||
define Package/luasql-sqlite3/description | |||
$(call Package/luasql/Default/description) | |||
. | |||
This package contains the SQLite 3 binding. | |||
endef | |||
TARGET_CFLAGS += $(FPIC) -std=gnu99 | |||
TARGET_CPPFLAGS += -DLUA_USE_LINUX | |||
ifeq ($(BUILD_VARIANT),mysql) | |||
TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/mysql | |||
TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz | |||
endif | |||
ifeq ($(BUILD_VARIANT),postgres) | |||
TARGET_LDFLAGS += -lpq | |||
endif | |||
ifeq ($(BUILD_VARIANT),sqlite3) | |||
TARGET_LDFLAGS += -lsqlite3 -lpthread | |||
endif | |||
MAKE_FLAGS += \ | |||
T="$(BUILD_VARIANT)" \ | |||
DRIVER_INCS="$(TARGET_CPPFLAGS)" \ | |||
DRIVER_LIBS="$(TARGET_LDFLAGS)" \ | |||
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ | |||
lib | |||
define Package/Install/Default | |||
$(INSTALL_DIR) $(1)/usr/lib/lua/luasql | |||
$(CP) $(PKG_BUILD_DIR)/src/*.so $(1)/usr/lib/lua/luasql/ | |||
endef | |||
Package/luasql-mysql/install = $(Package/Install/Default) | |||
Package/luasql-pgsql/install = $(Package/Install/Default) | |||
Package/luasql-sqlite3/install = $(Package/Install/Default) | |||
$(eval $(call BuildPackage,luasql-mysql)) | |||
$(eval $(call BuildPackage,luasql-pgsql)) | |||
$(eval $(call BuildPackage,luasql-sqlite3)) |
@ -0,0 +1,53 @@ | |||
# | |||
# Copyright (C) 2008-2010 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=micropython-lib | |||
PKG_VERSION:=2014-08-12 | |||
PKG_RELEASE:=1 | |||
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com> | |||
PKG_LICENSE:=MIT | |||
PKG_SOURCE_PROTO:=git | |||
PKG_SOURCE_URL:=https://github.com/micropython/micropython-lib.git | |||
PKG_SOURCE_VERSION:=7bc0c0a45894ec10eb3fd3515428a087a24ac228 | |||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION) | |||
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz | |||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) | |||
PKG_BUILD_PARALLEL:=1 | |||
include $(INCLUDE_DIR)/package.mk | |||
define Package/micropython-lib | |||
SECTION:=lang | |||
CATEGORY:=Languages | |||
TITLE:=micropython-lib | |||
URL:=https://github.com/micropython/micropython-lib | |||
DEPENDS:=+micropython | |||
endef | |||
define Package/micropython-lib/description | |||
This package contains micropython-lib, a project to develop a non-monolothic | |||
standard library for Micro Python. Note that this is a work in progress and | |||
several libraries may be missing, incomplete or buggy. | |||
endef | |||
MAKE_FLAGS:=\ | |||
-C $(PKG_BUILD_DIR) \ | |||
PREFIX=$(PKG_BUILD_DIR)/_install_tmp \ | |||
install | |||
define Package/micropython-lib/install | |||
$(INSTALL_DIR) $(1)/usr/lib/micropython | |||
$(CP) $(PKG_BUILD_DIR)/_install_tmp/* $(1)/usr/lib/micropython | |||
endef | |||
$(eval $(call BuildPackage,micropython-lib)) | |||
@ -0,0 +1,58 @@ | |||
# | |||
# Copyright (C) 2008-2010 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=micropython | |||
PKG_VERSION=1.2-$(PKG_SOURCE_VERSION) | |||
PKG_RELEASE:=1 | |||
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com> | |||
PKG_LICENSE:=MIT | |||
PKG_LICENSE_FILES:=LICENSE | |||
PKG_SOURCE_PROTO:=git | |||
PKG_SOURCE_URL:=https://github.com/micropython/micropython.git | |||
PKG_SOURCE_VERSION:=86de21b810693bccdd88d53aacb6d8acf26f09e0 | |||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION) | |||
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz | |||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) | |||
PKG_BUILD_PARALLEL:=1 | |||
include $(INCLUDE_DIR)/package.mk | |||
define Package/micropython | |||
SECTION:=lang | |||
CATEGORY:=Languages | |||
TITLE:=Micro Python | |||
URL:=http://micropython.org | |||
DEPENDS:=+libffi | |||
endef | |||
define Package/micropython/description | |||
This package contains Micro Python, a lean and fast implementation of the Python 3.4 programming language | |||
that is optimised to run on a microcontroller (and low power computers). | |||
endef | |||
# The following hacks have been tested for MIPS builds, but may need to be modified for other platforms. | |||
# (Based on: https://github.com/pfalcon/micropython/blob/2663b63241498569d9acb9c7cf9e01e831dbd816/unix/build-mips.sh) | |||
TARGET_CFLAGS_EXTRA += -DMICROPY_GCREGS_SETJMP=1 -DMICROPY_NLR_SETJMP=1 -DMICROPY_EMIT_X64=0 | |||
TARGET_STRIPFLAGS_EXTRA += --remove-section=.pdr -R .comment -R .gnu.version -R .gnu.version_r -R .gnu.attributes -R .reginfo -R .mdebug.abi32 | |||
MAKE_FLAGS += \ | |||
-C $(PKG_BUILD_DIR)/unix \ | |||
MICROPY_USE_READLINE=0 \ | |||
CFLAGS_EXTRA="$(TARGET_CFLAGS_EXTRA)" \ | |||
STRIPFLAGS_EXTRA="$(TARGET_STRIPFLAGS_EXTRA)" | |||
define Package/micropython/install | |||
$(INSTALL_DIR) $(1)/usr/bin | |||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/unix/micropython $(1)/usr/bin/micropython | |||
endef | |||
$(eval $(call BuildPackage,micropython)) |
@ -0,0 +1,41 @@ | |||
commit 3b266f17ccd5613a9c42d1e04118e94ca6467489 | |||
Author: Gisle Aas <gisle@aas.no> | |||
Date: Sun Jan 16 12:56:30 2011 +0100 | |||
Call IO::Socket::SSL's verify_hostname when available | |||
--- a/lib/LWP/Protocol/https.pm | |||
+++ b/lib/LWP/Protocol/https.pm | |||
@@ -14,6 +14,15 @@ sub socket_type | |||
sub _check_sock | |||
{ | |||
my($self, $req, $sock) = @_; | |||
+ if ($sock->can("verify_hostname")) { | |||
+ if (!$sock->verify_hostname($req->uri->host, "www")) { | |||
+ my $subject = $sock->peer_certificate("subject"); | |||
+ die "SSL-peer fails verification [subject=$subject]\n"; | |||
+ } | |||
+ else { | |||
+ $req->{ssl_sock_verified}++; | |||
+ } | |||
+ } | |||
my $check = $req->header("If-SSL-Cert-Subject"); | |||
if (defined $check) { | |||
my $cert = $sock->get_peer_certificate || | |||
@@ -36,9 +45,14 @@ sub _get_sock_info | |||
$res->header("Client-SSL-Cert-Subject" => $cert->subject_name); | |||
$res->header("Client-SSL-Cert-Issuer" => $cert->issuer_name); | |||
} | |||
- if(! eval { $sock->get_peer_verify }) { | |||
- $res->header("Client-SSL-Warning" => "Peer certificate not verified"); | |||
+ if (!$res->request->{ssl_sock_verified}) { | |||
+ if(! eval { $sock->get_peer_verify }) { | |||
+ my $msg = "Peer certificate not verified"; | |||
+ $msg .= " [$@]" if $@; | |||
+ $res->header("Client-SSL-Warning" => $msg); | |||
+ } | |||
} | |||
+ $res->header("Client-SSL-Socket-Class" => $Net::HTTPS::SSL_SOCKET_CLASS); | |||
} | |||
#----------------------------------------------------------- |
@ -0,0 +1,113 @@ | |||
commit 62dd58188d8f8987d24bd84951813a54a8bf5987 | |||
Author: Gisle Aas <gisle@aas.no> | |||
Date: Mon Jan 24 23:19:59 2011 +0100 | |||
Default to verifying hostnames when using SSL | |||
--- a/lib/LWP/Protocol/https.pm | |||
+++ b/lib/LWP/Protocol/https.pm | |||
@@ -11,18 +11,30 @@ sub socket_type | |||
return "https"; | |||
} | |||
-sub _check_sock | |||
+sub _extra_sock_opts | |||
{ | |||
- my($self, $req, $sock) = @_; | |||
- if ($sock->can("verify_hostname")) { | |||
- if (!$sock->verify_hostname($req->uri->host, "www")) { | |||
- my $subject = $sock->peer_certificate("subject"); | |||
- die "SSL-peer fails verification [subject=$subject]\n"; | |||
- } | |||
- else { | |||
- $req->{ssl_sock_verified}++; | |||
+ my $self = shift; | |||
+ my %ssl_opts = %{$self->{ua}{ssl_opts} || {}}; | |||
+ unless (exists $ssl_opts{SSL_verify_mode}) { | |||
+ $ssl_opts{SSL_verify_mode} = 1; | |||
+ } | |||
+ if (delete $ssl_opts{verify_hostname}) { | |||
+ $ssl_opts{SSL_verify_mode} ||= 1; | |||
+ $ssl_opts{SSL_verifycn_scheme} = 'www'; | |||
+ } | |||
+ if ($ssl_opts{SSL_verify_mode}) { | |||
+ unless (exists $ssl_opts{SSL_ca_file} || exists $ssl_opts{SSL_ca_path}) { | |||
+ require Mozilla::CA; | |||
+ $ssl_opts{SSL_ca_file} = Mozilla::CA::SSL_ca_file(); | |||
} | |||
} | |||
+ $self->{ssl_opts} = \%ssl_opts; | |||
+ return (%ssl_opts, $self->SUPER::_extra_sock_opts); | |||
+} | |||
+ | |||
+sub _check_sock | |||
+{ | |||
+ my($self, $req, $sock) = @_; | |||
my $check = $req->header("If-SSL-Cert-Subject"); | |||
if (defined $check) { | |||
my $cert = $sock->get_peer_certificate || | |||
@@ -45,12 +57,11 @@ sub _get_sock_info | |||
$res->header("Client-SSL-Cert-Subject" => $cert->subject_name); | |||
$res->header("Client-SSL-Cert-Issuer" => $cert->issuer_name); | |||
} | |||
- if (!$res->request->{ssl_sock_verified}) { | |||
- if(! eval { $sock->get_peer_verify }) { | |||
- my $msg = "Peer certificate not verified"; | |||
- $msg .= " [$@]" if $@; | |||
- $res->header("Client-SSL-Warning" => $msg); | |||
- } | |||
+ if (!$self->{ssl_opts}{SSL_verify_mode}) { | |||
+ $res->push_header("Client-SSL-Warning" => "Peer certificate not verified"); | |||
+ } | |||
+ elsif (!$self->{ssl_opts}{SSL_verifycn_scheme}) { | |||
+ $res->push_header("Client-SSL-Warning" => "Peer hostname match with certificate not verified"); | |||
} | |||
$res->header("Client-SSL-Socket-Class" => $Net::HTTPS::SSL_SOCKET_CLASS); | |||
} | |||
--- a/lib/LWP/UserAgent.pm | |||
+++ b/lib/LWP/UserAgent.pm | |||
@@ -41,6 +41,7 @@ sub new | |||
my $timeout = delete $cnf{timeout}; | |||
$timeout = 3*60 unless defined $timeout; | |||
my $local_address = delete $cnf{local_address}; | |||
+ my $ssl_opts = delete $cnf{ssl_opts}; | |||
my $use_eval = delete $cnf{use_eval}; | |||
$use_eval = 1 unless defined $use_eval; | |||
my $parse_head = delete $cnf{parse_head}; | |||
@@ -83,6 +84,7 @@ sub new | |||
def_headers => $def_headers, | |||
timeout => $timeout, | |||
local_address => $local_address, | |||
+ ssl_opts => { $ssl_opts ? %$ssl_opts : (verify_hostname => 1) }, | |||
use_eval => $use_eval, | |||
show_progress=> $show_progress, | |||
max_size => $max_size, | |||
@@ -582,6 +584,20 @@ sub max_size { shift->_elem('max_siz | |||
sub max_redirect { shift->_elem('max_redirect', @_); } | |||
sub show_progress{ shift->_elem('show_progress', @_); } | |||
+sub ssl_opts { | |||
+ my $self = shift; | |||
+ if (@_ == 1) { | |||
+ my $k = shift; | |||
+ return $self->{ssl_opts}{$k}; | |||
+ } | |||
+ if (@_) { | |||
+ %{$self->{ssl_opts}} = (%{$self->{ssl_opts}}, @_); | |||
+ } | |||
+ else { | |||
+ return keys %{$self->{ssl_opts}}; | |||
+ } | |||
+} | |||
+ | |||
sub parse_head { | |||
my $self = shift; | |||
if (@_) { | |||
@@ -1040,6 +1056,7 @@ The following options correspond to attr | |||
cookie_jar undef | |||
default_headers HTTP::Headers->new | |||
local_address undef | |||
+ ssl_opts { verify_hostname => 1 } | |||
max_size undef | |||
max_redirect 7 | |||
parse_head 1 |
@ -1,81 +0,0 @@ | |||
#!/bin/sh | |||
# | |||
# Generate perl module package dependencies | |||
# | |||
# Copyright (C) 2007 Peter Colberg <peter@petercolberg.org> | |||
# Licensed under the terms of the GNU General Public License. | |||
# | |||
if [ $# -lt 3 ]; then | |||
echo >&2 "Usage: $(basename $0) STAGING-DIR PERL-BUILD-DIR [FILES...] [DIRECTORIES...]" | |||
exit 1 | |||
fi | |||
STAGING_DIR="$1" | |||
PERL_BIN="$STAGING_DIR/usr/bin/perl" | |||
PERL_LIB="$STAGING_DIR/usr/lib/perl5/5.10" | |||
INC_DIR="$(dirname $0)" | |||
shift | |||
"$PERL_BIN" -I"$INC_DIR" -I"$PERL_LIB" - "$@" <<'PERL_SCRIPT' | |||
use strict; | |||
use warnings; | |||
use Module::ScanDeps; | |||
use File::Find; | |||
use Cwd; | |||
our $sitelib = "/usr/lib/perl5/5.10"; | |||
sub scandeps { | |||
my $builddir = Cwd::abs_path(shift); | |||
my @scanpaths = @_; | |||
my ($curdir, @pkgdirs, $dir, @deps, %depends, $file); | |||
our ($pkg, %bundles, $path, @files); | |||
@pkgdirs = glob($builddir . "/*/ipkg"); | |||
$curdir = getcwd(); | |||
@INC = (); | |||
for $dir (@pkgdirs) { | |||
chdir($dir) or die "$dir: $!"; | |||
for $pkg (glob("*")) { | |||
chdir($dir . "/" . $pkg . $sitelib) or next; | |||
push @INC, getcwd(); | |||
sub wanted { | |||
return unless (-f $_); | |||
s/^\.\///; | |||
$bundles{$_} = $pkg; | |||
} | |||
find({ wanted => \&wanted, no_chdir => 1 }, "."); | |||
} | |||
} | |||
chdir($curdir) or die "$curdir: $!\n"; | |||
for $path (@scanpaths) { | |||
sub scan_wanted { | |||
return unless (-f $_ and /\.(pl|pm)$/); | |||
push @files, $_; | |||
} | |||
if (-f $path) { | |||
push @files, $path; | |||
} | |||
elsif (-d $path) { | |||
find({ wanted => \&scan_wanted, no_chdir => 1 }, $path); | |||
} | |||
} | |||
@deps = keys %{scan_deps(files => \@files, recurse => 0)}; | |||
for $file (grep { not exists $bundles{$_} } @deps) { | |||
warn "could not resolve dependency: $file\n"; | |||
} | |||
%depends = map { $bundles{$_}, 1 } grep { exists $bundles{$_} } @deps; | |||
if (%depends) { | |||
print join(' ', 'perl', sort keys %depends), "\n"; | |||
} | |||
} | |||
if (@ARGV > 1) { | |||
scandeps(@ARGV); | |||
} | |||
PERL_SCRIPT |
@ -1,176 +0,0 @@ | |||
#!/bin/sh | |||
# | |||
# Generate perl base modules package definitions | |||
# | |||
# Copyright (C) 2007 Peter Colberg <peter@petercolberg.org> | |||
# Licensed under the terms of the GNU General Public License. | |||
# | |||
if [ $# -lt 1 ]; then | |||
echo >&2 "Usage: $(basename $0) STAGING-DIR [OUTFILE]" | |||
exit 1 | |||
fi | |||
STAGING_DIR="$1" | |||
PERL_BIN="$STAGING_DIR/usr/bin/perl" | |||
PERL_LIB="$STAGING_DIR/usr/lib/perl5/5.10" | |||
INC_DIR="$(dirname $0)" | |||
shift | |||
"$PERL_BIN" -I"$INC_DIR" -I"$PERL_LIB" - "$PERL_LIB" "$@" <<'PERL_SCRIPT' | |||
use strict; | |||
use warnings; | |||
use Module::ScanDeps; | |||
use File::Find; | |||
use File::Basename; | |||
our $skipfiles = 'CORE vmsish.pm auto/sdbm'; | |||
our %defmodules = ( | |||
'essential' => 'lib.pm vars.pm strict.pm warnings.pm warnings Carp Carp.pm Exporter Exporter.pm locale.pm subs.pm overload.pm constant.pm', | |||
'getoptpl' => 'getopt.pl getopts.pl', | |||
'utf8' => 'utf8_heavy.pl', | |||
'Getopt' => 'newgetopt.pl', | |||
'open' => 'open2.pl open3.pl', | |||
'Config' => 'Config_heavy.pl', | |||
'bytes' => 'bytes_heavy.pl', | |||
); | |||
our %defdepends = ( | |||
'DB_File' => 'libdb1-compat', | |||
'GDBM_File' => 'libgdbm', | |||
); | |||
our $prefix = 'perlbase-'; | |||
sub template ($) { | |||
$_ = $_[0]; | |||
return <<TEMPLATE; | |||
define Package/$$_{package} | |||
SECTION:=lang | |||
CATEGORY:=Languages | |||
URL:=http://www.cpan.org/ | |||
TITLE:=$$_{module} perl module | |||
DEPENDS:=$$_{depends} | |||
endef | |||
define Package/$$_{package}/install | |||
\$(call perlmod/Install,\$(1),$$_{files},$$_{exclude}) | |||
endef | |||
\$(eval \$(call BuildPackage,$$_{package})) | |||
TEMPLATE | |||
} | |||
sub scandeps ($) { | |||
my $sitedir = shift; | |||
my @result; | |||
my ($mod, $file, @deps, $dep, %depends, $parent, $pkg); | |||
our (%files, %modules); | |||
my (%packages, %excludes); | |||
for $mod (keys %defmodules) { | |||
($pkg = $prefix . $mod) =~ tr/A-Z_/a-z-/; | |||
$modules{$pkg} = $mod; | |||
for $file (split / /, $defmodules{$mod}) { | |||
$files{$file} = $pkg; | |||
} | |||
} | |||
for $file ('pod', 'Pod', split(/ /, $skipfiles)) { | |||
$files{$file} = undef; | |||
} | |||
sub wanted { | |||
s/^\.\///; | |||
return if (/^(\.|auto)$/ or exists $files{$_}); | |||
if (/\.pod$/) { | |||
$files{$_} = undef; | |||
} | |||
elsif (exists $files{dirname($_)}) { | |||
$files{$_} = $files{dirname($_)}; | |||
} | |||
elsif (m!^(?:auto/)?([^./]+)(?:\.(?:pl|pm)|/|$)!) { | |||
(my $pkg = $prefix . $1) =~ tr/A-Z_/a-z-/; | |||
$modules{$pkg} = $1; | |||
$files{$_} = $pkg; | |||
} | |||
else { | |||
$files{$_} = undef; | |||
} | |||
} | |||
chdir($sitedir); | |||
find({ wanted => \&wanted, no_chdir => 1}, '.'); | |||
for $pkg (keys %modules) { | |||
$packages{$pkg} = []; | |||
$excludes{$pkg} = []; | |||
$depends{$pkg} = {}; | |||
} | |||
for $file (keys %files) { | |||
$mod = $files{$file}; | |||
$parent = $files{dirname($file)}; | |||
if (defined ($mod)) { | |||
if (defined ($parent) and not ($parent eq $mod)) { | |||
push @{$packages{$mod}}, $file; | |||
push @{$excludes{$parent}}, $file; | |||
} | |||
elsif (not defined ($parent)) { | |||
push @{$packages{$mod}}, $file; | |||
} | |||
} | |||
elsif (defined ($parent)) { | |||
push @{$excludes{$parent}}, $file; | |||
} | |||
} | |||
for $mod (keys %defdepends) { | |||
($pkg = $prefix . $mod) =~ tr/A-Z_/a-z-/; | |||
for $dep (split / /, $defdepends{$mod}) { | |||
${$depends{$pkg}}{$dep} = 1; | |||
} | |||
} | |||
@INC = ('.'); | |||
for $file (grep { -f $_ and defined $files{$_} } keys %files) { | |||
@deps = keys %{scan_deps(files => [ $file ], recurse => 0)}; | |||
$pkg = $files{$file}; | |||
for $dep (grep { not defined $files{$_} } @deps) { | |||
warn "$file: could not resolve dependency: $dep\n"; | |||
} | |||
for $dep (grep { defined $files{$_} } @deps) { | |||
next if ($files{$dep} eq $pkg); | |||
${$depends{$pkg}}{$files{$dep}} = 1; | |||
} | |||
} | |||
for $pkg (sort keys %packages) { | |||
push @result, template({ | |||
package => $pkg, | |||
module => $modules{$pkg}, | |||
depends => join(' ', 'perl', sort keys %{$depends{$pkg}}), | |||
files => join(' ', sort @{$packages{$pkg}}), | |||
exclude => join(' ', sort @{$excludes{$pkg}}), | |||
}); | |||
} | |||
return join('', @result); | |||
} | |||
if (@ARGV > 1) { | |||
open FILE, ">$ARGV[1]" or die "$ARGV[1]: $!\n"; | |||
print FILE scandeps($ARGV[0]); | |||
close FILE; | |||
} | |||
else { | |||
print scandeps($ARGV[0] or '.'); | |||
} | |||
PERL_SCRIPT |
@ -1,11 +0,0 @@ | |||
#!/bin/sh | |||
# | |||
# Attempt to strip comments and pod docs from perl modules | |||
# | |||
[ "$#" -gt 0 ] || set . | |||
echo "---> Stripping modules in: $@" >&2 | |||
find "$@" -name \*.pm -or -name \*.pl -or -name \*.pod | while read fn; do | |||
echo " $fn" >&2 | |||
sed -i -e '/^=\(head\|pod\|item\|over\|back\)/,/^=cut/d; /^=\(head\|pod\|item\|over\|back\)/,$d; /^#$/d; /^#[^!"'"'"']/d' "$fn" | |||
done |
@ -0,0 +1,6 @@ | |||
--- /dev/null | |||
+++ b/relink/Makefile.PL | |||
@@ -0,0 +1,3 @@ | |||
+use ExtUtils::MakeMaker; | |||
+ | |||
+WriteMakefile(NAME => "relink"); |
@ -0,0 +1,487 @@ | |||
# | |||
# Copyright (C) 2006-2014 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
# | |||
# To Do: | |||
# - split up encodings | |||
# - allow selection of either native or pure version of a library where supported | |||
# +-> some native libraries are probably only supported if ruby-dl is enabled | |||
# anything else? | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=ruby | |||
PKG_VERSION:=2.1.2 | |||
PKG_RELEASE:=1 | |||
PKG_LIBVER:=2.1 | |||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 | |||
PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_LIBVER)/ | |||
PKG_MD5SUM:=ed9b8565bdeccb401d628ec8d54a0774 | |||
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com> | |||
PKG_LICENSE:=BSD-2-Clause | |||
PKG_LICENSE_FILE:=COPYING | |||
PKG_BUILD_DEPENDS:=ruby/host | |||
PKG_INSTALL:=1 | |||
PKG_BUILD_PARALLEL:=1 | |||
PKG_FIXUP:=autoreconf | |||
include $(INCLUDE_DIR)/host-build.mk | |||
include $(INCLUDE_DIR)/package.mk | |||
include $(INCLUDE_DIR)/nls.mk | |||
define Package/ruby/Default | |||
SUBMENU:=Ruby | |||
SECTION:=lang | |||
CATEGORY:=Languages | |||
TITLE:=Ruby scripting language | |||
URL:=http://www.ruby-lang.org/ | |||
endef | |||
define Package/ruby/Default/description | |||
Ruby is the interpreted scripting language for quick and easy | |||
object-oriented programming. It has many features to process text files | |||
and to do system management tasks (as in perl). It is simple, | |||
straight-forward, and extensible. | |||
endef | |||
define Package/ruby | |||
$(call Package/ruby/Default) | |||
TITLE+= (interpreter) | |||
DEPENDS:=+libruby | |||
endef | |||
define Package/ruby/description | |||
$(call Package/ruby/Default/description) | |||
endef | |||
define Package/libruby | |||
$(call Package/ruby/Default) | |||
SUBMENU:= | |||
SECTION:=libs | |||
CATEGORY:=Libraries | |||
TITLE+= (shared library) | |||
DEPENDS+= +libpthread +librt +libgmp | |||
endef | |||
# Ongoing work to break up ruby's standard library into coherent pieces | |||
# with minimal dependencies between them | |||
define Package/ruby-core | |||
$(call Package/ruby/Default) | |||
TITLE:=Ruby standard libraries | |||
DEPENDS:=ruby +libdb47 +libffi | |||
endef | |||
define Package/ruby-cgi | |||
$(call Package/ruby/Default) | |||
TITLE:=Ruby CGI support toolkit | |||
DEPENDS:=ruby | |||
endef | |||
define Package/ruby-dl | |||
$(call Package/ruby/Default) | |||
TITLE+= (dynamic linker support) (adds 5MB+) | |||
DEPENDS:=ruby | |||
endef | |||
define Package/ruby-enc | |||
$(call Package/ruby/Default) | |||
TITLE+= (character re-coding library) (adds 2MB+) | |||
DEPENDS:=ruby | |||
endef | |||
define Package/ruby-erb | |||
$(call Package/ruby/Default) | |||
TITLE+= (embedded interpreter) | |||
DEPENDS:=ruby | |||
endef | |||
define Package/ruby-gdbm | |||
$(call Package/ruby/Default) | |||
TITLE:=Ruby support for gdbm | |||
DEPENDS:=ruby +libgdbm | |||
endef | |||
define Package/ruby-gems | |||
$(call Package/ruby/Default) | |||
TITLE:=Ruby gems packet management | |||
DEPENDS:=ruby +ruby-yaml +ruby-zlib +ruby-openssl +ruby-webrick +ruby-erb | |||
endef | |||
define Package/ruby-irb | |||
$(call Package/ruby/Default) | |||
TITLE+= (interactive shell) | |||
DEPENDS:=ruby +ruby-core | |||
endef | |||
define Package/ruby-json | |||
$(call Package/ruby/Default) | |||
TITLE:=Ruby support for JSON | |||
DEPENDS:=ruby | |||
endef | |||
define Package/ruby-ncurses | |||
$(call Package/ruby/Default) | |||
TITLE:=Ruby support for ncurses | |||
DEPENDS:=ruby +libncurses +libncursesw | |||
endef | |||
define Package/ruby-nkf | |||
$(call Package/ruby/Default) | |||
TITLE:=Ruby Network Kanji Filter | |||
DEPENDS:=ruby | |||
endef | |||
define Package/ruby-openssl | |||
$(call Package/ruby/Default) | |||
TITLE:=Ruby support for openssl | |||
DEPENDS:=ruby +libopenssl | |||
endef | |||
define Package/ruby-rdoc | |||
$(call Package/ruby/Default) | |||
TITLE+= (documentation generator) | |||
DEPENDS:=ruby | |||
endef | |||
define Package/ruby-rake | |||
$(call Package/ruby/Default) | |||
TITLE+=Ruby Rake (make replacement) | |||
DEPENDS:=ruby | |||
endef | |||
define Package/ruby-readline | |||
$(call Package/ruby/Default) | |||
TITLE:=Ruby support for readline | |||
DEPENDS:=ruby +libncurses +libreadline | |||
endef | |||
define Package/ruby-rexml | |||
$(call Package/ruby/Default) | |||
TITLE:=Ruby XML toolkit | |||
DEPENDS:=ruby | |||
endef | |||
define Package/ruby-rss | |||
$(call Package/ruby/Default) | |||
TITLE:=Ruby RSS toolkit | |||
DEPENDS:=ruby | |||
endef | |||
define Package/ruby-unit | |||
$(call Package/ruby/Default) | |||
TITLE:=Ruby unit testing toolkit | |||
DEPENDS:=ruby | |||
endef | |||
define Package/ruby-webrick | |||
$(call Package/ruby/Default) | |||
TITLE:=Ruby Web server toolkit | |||
DEPENDS:=ruby | |||
endef | |||
define Package/ruby-xmlrpc | |||
$(call Package/ruby/Default) | |||
TITLE:=Ruby XML-RPC toolkit | |||
DEPENDS:=ruby | |||
endef | |||
define Package/ruby-yaml | |||
$(call Package/ruby/Default) | |||
TITLE:=Ruby YAML toolkit | |||
DEPENDS:=ruby | |||
endef | |||
define Package/ruby-zlib | |||
$(call Package/ruby/Default) | |||
TITLE:=Ruby support for zlib | |||
DEPENDS:=ruby +zlib | |||
endef | |||
HOST_CONFIGURE_ARGS += \ | |||
--disable-install-doc \ | |||
--disable-install-rdoc \ | |||
--disable-install-capi \ | |||
--with-static-linked-ext \ | |||
CONFIGURE_ARGS += \ | |||
--enable-shared \ | |||
--enable-static \ | |||
--disable-rpath \ | |||
--enable-ipv6 \ | |||
--with-ruby-version=minor \ | |||
--with-iconv-dir=$(ICONV_PREFIX) \ | |||
TARGET_LDFLAGS += -L$(PKG_BUILD_DIR) | |||
MAKE_FLAGS += \ | |||
DESTDIR="$(PKG_INSTALL_DIR)" \ | |||
SHELL="/bin/bash" | |||
define Package/ruby/install | |||
$(INSTALL_DIR) $(1)/usr/bin | |||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/bin/ | |||
endef | |||
define Package/libruby/install | |||
$(INSTALL_DIR) $(1)/usr/lib | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/ | |||
endef | |||
define Package/ruby-core/install | |||
$(INSTALL_DIR) $(1)/usr/lib | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby $(1)/usr/lib/ | |||
rm -rf \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/*/curses.so \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/kconv.rb \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/digest \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/digest.rb \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/*/digest \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/*/digest.so \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/openssl \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/openssl.rb \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/*/openssl.so \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/drb/ssl.rb \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/net/https.rb \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/webrick/ssl.rb \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/*/dl.so \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/*/enc \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/*/readline.so \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/irb/completion.rb \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/irb/ext/save-history.rb \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/*/zlib.so \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/erb.rb \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/json.rb \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/json \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/*/json \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/irb.rb \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/irb \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/rdoc \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/rake.rb \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/rake \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/rubygems \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/cgi \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/rexml \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/rss \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/rss.rb \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/test \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/webrick \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/webrick.rb \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc \ | |||
\ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/yaml \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/yaml.rb \ | |||
$(1)/usr/lib/ruby/$(PKG_LIBVER)/*/syck.so \ | |||
find $(1) -name '*.h' | xargs rm -f | |||
endef | |||
define Package/ruby-cgi/install | |||
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi $(1)/usr/lib/ruby/$(PKG_LIBVER)/ | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ | |||
endef | |||
define Package/ruby-dl/install | |||
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ | |||
usr/lib/ruby/$(PKG_LIBVER)/*/dl.so \ | |||
) | ( cd $(1); $(TAR) -xf - ) | |||
endef | |||
define Package/ruby-enc/install | |||
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ | |||
usr/lib/ruby/$(PKG_LIBVER)/*/enc \ | |||
) | ( cd $(1); $(TAR) -xf - ) | |||
endef | |||
define Package/ruby-erb/install | |||
$(INSTALL_DIR) $(1)/usr/bin | |||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/erb $(1)/usr/bin/ | |||
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)/ | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/erb.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ | |||
endef | |||
define Package/ruby-gdbm/install | |||
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ | |||
usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so \ | |||
) | ( cd $(1); $(TAR) -xf - ) | |||
endef | |||
define Package/ruby-gems/install | |||
$(INSTALL_DIR) $(1)/usr/bin | |||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/gem $(1)/usr/bin/ | |||
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems $(1)/usr/lib/ruby/$(PKG_LIBVER)/ | |||
endef | |||
define Package/ruby-irb/install | |||
$(INSTALL_DIR) $(1)/usr/bin | |||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/irb $(1)/usr/bin/ | |||
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/irb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/irb.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ | |||
endef | |||
define Package/ruby-json/install | |||
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ | |||
usr/lib/ruby/$(PKG_LIBVER)/json.rb \ | |||
usr/lib/ruby/$(PKG_LIBVER)/json \ | |||
usr/lib/ruby/$(PKG_LIBVER)/*/json \ | |||
) | ( cd $(1); $(TAR) -xf - ) | |||
endef | |||
define Package/ruby-ncurses/install | |||
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ | |||
usr/lib/ruby/$(PKG_LIBVER)/*/curses.so \ | |||
) | ( cd $(1); $(TAR) -xf - ) | |||
endef | |||
define Package/ruby-nkf/install | |||
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ | |||
usr/lib/ruby/$(PKG_LIBVER)/kconv.rb \ | |||
usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so \ | |||
) | ( cd $(1); $(TAR) -xf - ) | |||
endef | |||
define Package/ruby-openssl/install | |||
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ | |||
usr/lib/ruby/$(PKG_LIBVER)/digest \ | |||
usr/lib/ruby/$(PKG_LIBVER)/digest.rb \ | |||
usr/lib/ruby/$(PKG_LIBVER)/*/digest.so \ | |||
usr/lib/ruby/$(PKG_LIBVER)/*/digest/*.so \ | |||
usr/lib/ruby/$(PKG_LIBVER)/openssl \ | |||
usr/lib/ruby/$(PKG_LIBVER)/openssl.rb \ | |||
usr/lib/ruby/$(PKG_LIBVER)/*/openssl.so \ | |||
usr/lib/ruby/$(PKG_LIBVER)/drb/ssl.rb \ | |||
usr/lib/ruby/$(PKG_LIBVER)/net/https.rb \ | |||
) | ( cd $(1); $(TAR) -xf - ) | |||
endef | |||
define Package/ruby-rdoc/install | |||
$(INSTALL_DIR) $(1)/usr/bin | |||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdoc $(1)/usr/bin/ | |||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ri $(1)/usr/bin/ | |||
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc $(1)/usr/lib/ruby/$(PKG_LIBVER)/ | |||
endef | |||
define Package/ruby-rake/install | |||
$(INSTALL_DIR) $(1)/usr/bin | |||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rake $(1)/usr/bin/ | |||
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake $(1)/usr/lib/ruby/$(PKG_LIBVER)/ | |||
endef | |||
define Package/ruby-readline/install | |||
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ | |||
usr/lib/ruby/$(PKG_LIBVER)/*/readline.so \ | |||
) | ( cd $(1); $(TAR) -xf - ) | |||
endef | |||
define Package/ruby-rexml/install | |||
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rexml $(1)/usr/lib/ruby/$(PKG_LIBVER)/ | |||
endef | |||
define Package/ruby-rss/install | |||
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rss $(1)/usr/lib/ruby/$(PKG_LIBVER)/ | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rss.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ | |||
endef | |||
define Package/ruby-unit/install | |||
$(INSTALL_DIR) $(1)/usr/bin | |||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/testrb $(1)/usr/bin/ | |||
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/test $(1)/usr/lib/ruby/$(PKG_LIBVER)/ | |||
endef | |||
define Package/ruby-webrick/install | |||
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/webrick $(1)/usr/lib/ruby/$(PKG_LIBVER)/ | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/webrick.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ | |||
endef | |||
define Package/ruby-xmlrpc/install | |||
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc $(1)/usr/lib/ruby/$(PKG_LIBVER)/ | |||
endef | |||
define Package/ruby-yaml/install | |||
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ | |||
usr/lib/ruby/$(PKG_LIBVER)/yaml \ | |||
usr/lib/ruby/$(PKG_LIBVER)/yaml.rb \ | |||
usr/lib/ruby/$(PKG_LIBVER)/*/syck.so \ | |||
) | ( cd $(1); $(TAR) -xf - ) | |||
endef | |||
define Package/ruby-zlib/install | |||
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ | |||
usr/lib/ruby/$(PKG_LIBVER)/*/zlib.so \ | |||
) | ( cd $(1); $(TAR) -xf - ) | |||
endef | |||
define Build/InstallDev | |||
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ | |||
. \ | |||
) | ( cd $(1); $(TAR) -xf - ) | |||
endef | |||
$(eval $(call BuildPackage,ruby)) | |||
$(eval $(call BuildPackage,libruby)) | |||
$(eval $(call BuildPackage,ruby-core)) | |||
$(eval $(call BuildPackage,ruby-cgi)) | |||
$(eval $(call BuildPackage,ruby-dl)) | |||
$(eval $(call BuildPackage,ruby-enc)) | |||
$(eval $(call BuildPackage,ruby-erb)) | |||
$(eval $(call BuildPackage,ruby-gdbm)) | |||
$(eval $(call BuildPackage,ruby-gems)) | |||
$(eval $(call BuildPackage,ruby-json)) | |||
$(eval $(call BuildPackage,ruby-irb)) | |||
$(eval $(call BuildPackage,ruby-ncurses)) | |||
$(eval $(call BuildPackage,ruby-nkf)) | |||
$(eval $(call BuildPackage,ruby-openssl)) | |||
$(eval $(call BuildPackage,ruby-rake)) | |||
$(eval $(call BuildPackage,ruby-rdoc)) | |||
$(eval $(call BuildPackage,ruby-readline)) | |||
$(eval $(call BuildPackage,ruby-rexml)) | |||
$(eval $(call BuildPackage,ruby-rss)) | |||
$(eval $(call BuildPackage,ruby-unit)) | |||
$(eval $(call BuildPackage,ruby-webrick)) | |||
$(eval $(call BuildPackage,ruby-xmlrpc)) | |||
$(eval $(call BuildPackage,ruby-yaml)) | |||
$(eval $(call BuildPackage,ruby-zlib)) | |||
$(eval $(call HostBuild)) |
@ -0,0 +1,112 @@ | |||
# | |||
# Copyright (C) 2006-2008 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=cyrus-sasl | |||
PKG_VERSION:=2.1.26 | |||
PKG_RELEASE:=2 | |||
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> | |||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:=ftp://ftp.cyrusimap.org/cyrus-sasl/ | |||
PKG_MD5SUM:=a7f4e5e559a0e37b3ffc438c9456e425 | |||
PKG_LICENSE:=BSD-4c BSD | |||
PKG_LICENSE_FILES:=COPYING cmulocal/COPYING saslauthd/COPYING | |||
PKG_FIXUP:=autoreconf | |||
PKG_MACRO_PATHS:=cmulocal config ../cmulocal ../config | |||
PKG_AUTOMAKE_PATHS:=. saslauthd sasldb | |||
PKG_REMOVE_FILES:=aclocal.m4 saslauthd/aclocal.m4 config/libtool.m4 | |||
include $(INCLUDE_DIR)/package.mk | |||
define Package/libsasl2 | |||
SECTION:=libs | |||
CATEGORY:=Libraries | |||
TITLE:=A general purpose authentication library | |||
URL:=http://asg.web.cmu.edu/sasl/ | |||
DEPENDS:=libopenssl | |||
endef | |||
TARGET_CFLAGS += $(FPIC) | |||
CONFIGURE_ARGS += \ | |||
--enable-shared \ | |||
--enable-static \ | |||
--disable-sample \ | |||
--enable-staticdlopen \ | |||
--disable-java \ | |||
--disable-alwaystrue \ | |||
--disable-checkapop \ | |||
--enable-cram \ | |||
--enable-digest \ | |||
--without-auth-sasldb \ | |||
--disable-otp \ | |||
--disable-srp \ | |||
--disable-srp-setpass \ | |||
--disable-krb4 \ | |||
--disable-gssapi \ | |||
--disable-gss_mutexes \ | |||
--enable-plain \ | |||
--enable-anon \ | |||
--disable-login \ | |||
--disable-ntlm \ | |||
--disable-sql \ | |||
--disable-ldapdb \ | |||
--without-dblib \ | |||
--without-gdbm \ | |||
--with-devrandom="/dev/urandom" \ | |||
--without-pam \ | |||
--without-saslauthd \ | |||
--without-authdaemond \ | |||
--without-pwcheck \ | |||
--with-ipctype=unix \ | |||
--with-openssl="$(STAGING_DIR)/usr" \ | |||
--without-des \ | |||
--without-opie \ | |||
--without-ldap \ | |||
--without-mysql \ | |||
--without-pgsql \ | |||
--without-sqlite \ | |||
--without-rc4 \ | |||
--without-dmalloc \ | |||
--without-sfio \ | |||
--disable-sample | |||
define Build/Compile | |||
$(MAKE) -C $(PKG_BUILD_DIR)/include \ | |||
CC="$(HOSTCC)" \ | |||
LINK="$(HOSTCC) -o makemd5 -lc" \ | |||
CFLAGS="" \ | |||
CPPFLAGS="" \ | |||
makemd5 | |||
$(MAKE) -C $(PKG_BUILD_DIR) \ | |||
DESTDIR="$(PKG_INSTALL_DIR)" \ | |||
all install | |||
endef | |||
define Build/InstallDev | |||
$(INSTALL_DIR) $(1)/usr/include/ | |||
$(CP) $(PKG_INSTALL_DIR)/usr/include/sasl $(1)/usr/include/ | |||
$(INSTALL_DIR) $(1)/usr/lib/ | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.{a,so*} $(1)/usr/lib/ | |||
ln -sf libsasl2.a $(1)/usr/lib/libsasl.a | |||
ln -sf libsasl2.so $(1)/usr/lib/libsasl.so | |||
$(INSTALL_DIR) $(1)/usr/lib/sasl2 | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.{a,so*} $(1)/usr/lib/sasl2/ | |||
endef | |||
define Package/libsasl2/install | |||
$(INSTALL_DIR) $(1)/usr/lib/ | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.so.* $(1)/usr/lib/ | |||
$(INSTALL_DIR) $(1)/usr/lib/sasl2 | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.so.* $(1)/usr/lib/sasl2/ | |||
endef | |||
$(eval $(call BuildPackage,libsasl2)) |
@ -0,0 +1,118 @@ | |||
--- a/dbinc/repmgr.h | |||
+++ b/dbinc/repmgr.h | |||
@@ -374,6 +374,7 @@ typedef struct { | |||
#define SITE_FROM_EID(eid) (&db_rep->sites[eid]) | |||
#define EID_FROM_SITE(s) ((int)((s) - (&db_rep->sites[0]))) | |||
#define IS_VALID_EID(e) ((e) >= 0) | |||
+#define IS_KNOWN_REMOTE_SITE(e) ((e) >= 0 && ((u_int)(e)) < db_rep->site_cnt) | |||
#define SELF_EID INT_MAX | |||
#define IS_PEER_POLICY(p) ((p) == DB_REPMGR_ACKS_ALL_PEERS || \ | |||
--- a/rep/rep_elect.c | |||
+++ b/rep/rep_elect.c | |||
@@ -33,7 +33,7 @@ static int __rep_elect_init | |||
static int __rep_fire_elected __P((ENV *, REP *, u_int32_t)); | |||
static void __rep_elect_master __P((ENV *, REP *)); | |||
static int __rep_tally __P((ENV *, REP *, int, u_int32_t *, u_int32_t, roff_t)); | |||
-static int __rep_wait __P((ENV *, db_timeout_t *, int *, int, u_int32_t)); | |||
+static int __rep_wait __P((ENV *, db_timeout_t *, int, u_int32_t)); | |||
/* | |||
* __rep_elect -- | |||
@@ -55,7 +55,7 @@ __rep_elect(dbenv, given_nsites, nvotes, | |||
ENV *env; | |||
LOG *lp; | |||
REP *rep; | |||
- int done, eid, elected, full_elect, locked, in_progress, need_req; | |||
+ int done, elected, full_elect, locked, in_progress, need_req; | |||
int ret, send_vote, t_ret; | |||
u_int32_t ack, ctlflags, egen, nsites, orig_tally, priority, realpri; | |||
u_int32_t tiebreaker; | |||
@@ -181,8 +181,7 @@ __rep_elect(dbenv, given_nsites, nvotes, | |||
REP_SYSTEM_UNLOCK(env); | |||
(void)__rep_send_message(env, DB_EID_BROADCAST, | |||
REP_MASTER_REQ, NULL, NULL, 0, 0); | |||
- ret = __rep_wait(env, &to, &eid, | |||
- 0, REP_F_EPHASE0); | |||
+ ret = __rep_wait(env, &to, 0, REP_F_EPHASE0); | |||
REP_SYSTEM_LOCK(env); | |||
F_CLR(rep, REP_F_EPHASE0); | |||
switch (ret) { | |||
@@ -286,11 +285,11 @@ restart: | |||
REP_SYSTEM_LOCK(env); | |||
goto vote; | |||
} | |||
- ret = __rep_wait(env, &to, &eid, full_elect, REP_F_EPHASE1); | |||
+ ret = __rep_wait(env, &to, full_elect, REP_F_EPHASE1); | |||
switch (ret) { | |||
case 0: | |||
/* Check if election complete or phase complete. */ | |||
- if (eid != DB_EID_INVALID && !IN_ELECTION(rep)) { | |||
+ if (!IN_ELECTION(rep)) { | |||
RPRINT(env, DB_VERB_REP_ELECT, | |||
(env, "Ended election phase 1")); | |||
goto edone; | |||
@@ -398,15 +397,12 @@ phase2: | |||
REP_SYSTEM_LOCK(env); | |||
goto i_won; | |||
} | |||
- ret = __rep_wait(env, &to, &eid, full_elect, REP_F_EPHASE2); | |||
+ ret = __rep_wait(env, &to, full_elect, REP_F_EPHASE2); | |||
RPRINT(env, DB_VERB_REP_ELECT, | |||
(env, "Ended election phase 2 %d", ret)); | |||
switch (ret) { | |||
case 0: | |||
- if (eid != DB_EID_INVALID) | |||
- goto edone; | |||
- ret = DB_REP_UNAVAIL; | |||
- break; | |||
+ goto edone; | |||
case DB_REP_EGENCHG: | |||
if (to > timeout) | |||
to = timeout; | |||
@@ -1050,13 +1046,6 @@ __rep_elect_master(env, rep) | |||
ENV *env; | |||
REP *rep; | |||
{ | |||
- /* | |||
- * We often come through here twice, sometimes even more. We mustn't | |||
- * let the redundant calls affect stats counting. But rep_elect relies | |||
- * on this first part for setting eidp. | |||
- */ | |||
- rep->master_id = rep->eid; | |||
- | |||
if (F_ISSET(rep, REP_F_MASTERELECT | REP_F_MASTER)) { | |||
/* We've been through here already; avoid double counting. */ | |||
return; | |||
@@ -1093,10 +1082,10 @@ __rep_fire_elected(env, rep, egen) | |||
(timeout > 5000000) ? 500000 : ((timeout >= 10) ? timeout / 10 : 1); | |||
static int | |||
-__rep_wait(env, timeoutp, eidp, full_elect, flags) | |||
+__rep_wait(env, timeoutp, full_elect, flags) | |||
ENV *env; | |||
db_timeout_t *timeoutp; | |||
- int *eidp, full_elect; | |||
+ int full_elect; | |||
u_int32_t flags; | |||
{ | |||
DB_REP *db_rep; | |||
@@ -1174,7 +1163,6 @@ __rep_wait(env, timeoutp, eidp, full_ele | |||
F_CLR(rep, REP_F_EGENUPDATE); | |||
ret = DB_REP_EGENCHG; | |||
} else if (phase_over) { | |||
- *eidp = rep->master_id; | |||
done = 1; | |||
ret = 0; | |||
} | |||
--- a/repmgr/repmgr_net.c | |||
+++ b/repmgr/repmgr_net.c | |||
@@ -100,6 +100,8 @@ __repmgr_send(dbenv, control, rec, lsnp, | |||
control, rec, &nsites_sent, &npeers_sent)) != 0) | |||
goto out; | |||
} else { | |||
+ DB_ASSERT(env, IS_KNOWN_REMOTE_SITE(eid)); | |||
+ | |||
/* | |||
* If this is a request that can be sent anywhere, then see if | |||
* we can send it to our peer (to save load on the master), but |
@ -0,0 +1,46 @@ | |||
# | |||
# Copyright (C) 2014 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=dtndht | |||
PKG_VERSION:=0.2.3 | |||
PKG_RELEASE:=1 | |||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases | |||
PKG_MD5SUM:=37c33910ac7e760aad4db81724aeb4fb | |||
PKG_MAINTAINER:=Johannes Morgenroth <morgenroth@ibr.cs.tu-bs.de> | |||
PKG_LICENSE:=Apache-2.0 | |||
PKG_INSTALL:=1 | |||
PKG_FIXUP:=libtool | |||
include $(INCLUDE_DIR)/package.mk | |||
define Package/dtndht | |||
SECTION:=libs | |||
CATEGORY:=Libraries | |||
DEPENDS:=+libopenssl | |||
TITLE:=Library for DHT lookups for DTNs | |||
endef | |||
define Package/dtndht/description | |||
A library with DHT functions for DTN name lookups. | |||
endef | |||
define Build/InstallDev | |||
$(INSTALL_DIR) $(1) | |||
$(CP) $(PKG_INSTALL_DIR)/* $(1)/ | |||
endef | |||
define Package/dtndht/install | |||
$(INSTALL_DIR) $(1)/usr/lib | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/ | |||
endef | |||
$(eval $(call BuildPackage,dtndht)) |
@ -0,0 +1,78 @@ | |||
# | |||
# Copyright (C) 2006-2014 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=freetype | |||
PKG_VERSION:=2.5.3 | |||
PKG_RELEASE:=1 | |||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 | |||
PKG_SOURCE_URL:=@SF/freetype | |||
PKG_MD5SUM:=d6b60f06bfc046e43ab2a6cbfd171d65 | |||
PKG_LICENSE:=FTL GPL-2.0 MIT ZLIB | |||
PKG_LICENSE_FILES:=docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT src/bdf/README src/pcf/README src/gzip/zlib.h | |||
PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org> | |||
PKG_FIXUP:=autoreconf | |||
PKG_LIBTOOL_PATHS:=builds/unix | |||
include $(INCLUDE_DIR)/host-build.mk | |||
include $(INCLUDE_DIR)/package.mk | |||
define Package/libfreetype | |||
SECTION:=libs | |||
CATEGORY:=Libraries | |||
TITLE:=A free, high-quality and portable font engine | |||
URL:=http://www.freetype.org/ | |||
DEPENDS:=+zlib +libbz2 | |||
endef | |||
define Package/libfreetype/description | |||
The FreeType project is a team of volunteers who develop free, | |||
portable and high-quality software solutions for digital typography. | |||
They specifically target embedded systems and focus on bringing small, | |||
efficient and ubiquitous products. | |||
endef | |||
TARGET_CFLAGS += $(FPIC) | |||
CONFIGURE_ARGS += \ | |||
--enable-shared \ | |||
--enable-static \ | |||
--with-bzip2=yes \ | |||
--with-zlib=yes \ | |||
--with-png=no \ | |||
define Build/Compile | |||
$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install | |||
endef | |||
define Build/InstallDev | |||
$(INSTALL_DIR) $(2)/bin | |||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/freetype-config $(2)/bin/ | |||
$(INSTALL_DIR) $(1)/usr/include | |||
$(CP) $(PKG_INSTALL_DIR)/usr/include/freetype2 $(1)/usr/include/ | |||
$(INSTALL_DIR) $(1)/usr/lib | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.{a,so*} $(1)/usr/lib/ | |||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/freetype2.pc $(1)/usr/lib/pkgconfig/ | |||
$(SED) \ | |||
's,^\(prefix\|exec_prefix\)=.*,\1="$(STAGING_DIR)/usr",g' \ | |||
$(2)/bin/freetype-config | |||
endef | |||
define Package/libfreetype/install | |||
$(INSTALL_DIR) $(1)/usr/lib | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.so.* $(1)/usr/lib/ | |||
endef | |||
$(eval $(call HostBuild)) | |||
$(eval $(call BuildPackage,libfreetype)) |
@ -0,0 +1,49 @@ | |||
# | |||
# Copyright (C) 2014 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=ibrcommon | |||
PKG_VERSION:=0.12.1 | |||
PKG_RELEASE:=1 | |||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases | |||
PKG_MD5SUM:=45681f48138bbbbd17384d25dc91454a | |||
PKG_MAINTAINER:=Johannes Morgenroth <morgenroth@ibr.cs.tu-bs.de> | |||
PKG_LICENSE:=Apache-2.0 | |||
PKG_INSTALL:=1 | |||
PKG_FIXUP:=libtool | |||
include $(INCLUDE_DIR)/package.mk | |||
define Package/ibrcommon | |||
SECTION:=libs | |||
CATEGORY:=Libraries | |||
DEPENDS:=+libstdcpp +libpthread +librt +libnl +libopenssl | |||
TITLE:=IBR Common C++ Library | |||
endef | |||
CONFIGURE_ARGS += \ | |||
--with-openssl | |||
define Package/ibrcommon/description | |||
A library with common functions for C++. | |||
endef | |||
define Build/InstallDev | |||
$(INSTALL_DIR) $(1) | |||
$(CP) $(PKG_INSTALL_DIR)/* $(1)/ | |||
endef | |||
define Package/ibrcommon/install | |||
$(INSTALL_DIR) $(1)/usr/lib | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/ | |||
endef | |||
$(eval $(call BuildPackage,ibrcommon)) |
@ -0,0 +1,50 @@ | |||
# | |||
# Copyright (C) 2014 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=ibrdtn | |||
PKG_VERSION:=0.12.1 | |||
PKG_RELEASE:=1 | |||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases | |||
PKG_MD5SUM:=96428dd4af541ea0c52db80776976a65 | |||
PKG_MAINTAINER:=Johannes Morgenroth <morgenroth@ibr.cs.tu-bs.de> | |||
PKG_LICENSE:=Apache-2.0 | |||
PKG_INSTALL:=1 | |||
PKG_FIXUP:=libtool autoreconf | |||
include $(INCLUDE_DIR)/package.mk | |||
define Package/ibrdtn | |||
SECTION:=libs | |||
CATEGORY:=Libraries | |||
DEPENDS:=+ibrcommon +zlib | |||
TITLE:=IBR-DTN Library | |||
endef | |||
define Package/ibrdtn/description | |||
Base library for IBR-DTN daemon and tools. | |||
endef | |||
CONFIGURE_ARGS += \ | |||
--with-compression \ | |||
--without-glib | |||
define Build/InstallDev | |||
$(INSTALL_DIR) $(1) | |||
$(CP) $(PKG_INSTALL_DIR)/* $(1)/ | |||
endef | |||
define Package/ibrdtn/install | |||
$(INSTALL_DIR) $(1)/usr/lib | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/ | |||
endef | |||
$(eval $(call BuildPackage,ibrdtn)) |
@ -0,0 +1,33 @@ | |||
--- a/configure.ac | |||
+++ b/configure.ac | |||
@@ -159,12 +159,21 @@ AS_IF([test "x$enable_android" = "xyes"], [ | |||
dnl ----------------------------------------------- | |||
dnl check for glib support | |||
dnl ----------------------------------------------- | |||
- PKG_CHECK_MODULES([GLIB], [glib-2.0], [ | |||
- AC_SUBST(GLIB_CFLAGS) | |||
- AC_SUBST(GLIB_LIBS) | |||
- AC_DEFINE(HAVE_GLIB, [1], ["glib library is available"]) | |||
- REQUIRES_LIBS="$REQUIRES_LIBS glib-2.0" | |||
- ], [ | |||
+ AC_ARG_WITH([glib], [AS_HELP_STRING([--without-glib], [Disable linking to glib-2.0 library])], [with_glib=no], [with_glib=yes]) | |||
+ AS_IF([test "x$with_glib" != xno], | |||
+ [ | |||
+ PKG_CHECK_MODULES([GLIB], [glib-2.0], [ | |||
+ AC_SUBST(GLIB_CFLAGS) | |||
+ AC_SUBST(GLIB_LIBS) | |||
+ AC_DEFINE(HAVE_GLIB, [1], ["glib library is available"]) | |||
+ REQUIRES_LIBS="$REQUIRES_LIBS glib-2.0" | |||
+ ], [ | |||
+ with_glib=no | |||
+ ]) | |||
+ ], []) | |||
+ | |||
+ AS_IF([test "x$with_glib" = xno], | |||
+ [ | |||
AS_IF([test "x$has_endian_h" = "xyes"],[ | |||
AC_MSG_NOTICE([use endian.h for endianess conversion]) | |||
],[ | |||
-- | |||
1.9.1 | |||
@ -0,0 +1,58 @@ | |||
# | |||
# Copyright (C) 2014 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=libarchive | |||
PKG_VERSION:=3.1.2 | |||
PKG_RELEASE:=1 | |||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:=http://www.libarchive.org/downloads | |||
PKG_MD5SUM:=efad5a503f66329bb9d2f4308b5de98a | |||
PKG_MAINTAINER:=Johannes Morgenroth <morgenroth@ibr.cs.tu-bs.de> | |||
PKG_LICENSE:=BSD-2-Clause | |||
PKG_INSTALL:=1 | |||
PKG_FIXUP:=autoreconf | |||
include $(INCLUDE_DIR)/package.mk | |||
define Package/libarchive | |||
SECTION:=libs | |||
CATEGORY:=Libraries | |||
DEPENDS:=+libopenssl +zlib | |||
TITLE:=Multi-format archive and compression library | |||
URL:=http://www.libarchive.org/ | |||
endef | |||
CONFIGURE_ARGS += \ | |||
--disable-bsdcpio \ | |||
--disable-bsdtar \ | |||
--disable-acl \ | |||
--disable-xattr \ | |||
--without-bz2lib \ | |||
--without-lzma \ | |||
--without-lzmadec \ | |||
--without-lzo2 \ | |||
--without-nettle \ | |||
--without-expat \ | |||
--without-xml2 | |||
define Build/InstallDev | |||
$(INSTALL_DIR) $(1)/usr/include | |||
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ | |||
$(INSTALL_DIR) $(1)/usr/lib | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ | |||
endef | |||
define Package/libarchive/install | |||
$(INSTALL_DIR) $(1)/usr/lib | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/ | |||
endef | |||
$(eval $(call BuildPackage,libarchive)) |
@ -0,0 +1,105 @@ | |||
# | |||
# Copyright (C) 2009-2014 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=libdbi-drivers | |||
PKG_VERSION:=0.9.0 | |||
PKG_RELEASE:=1 | |||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:=@SF/libdbi-drivers | |||
PKG_MD5SUM:=9f47b960e225eede2cdeaabf7d22f59f | |||
PKG_LICENSE:=LGPL-2.1 | |||
PKG_LICENSE_FILE:=COPYING | |||
PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org> | |||
PKG_FIXUP:=autoreconf | |||
PKG_INSTALL:=1 | |||
include $(INCLUDE_DIR)/package.mk | |||
define Package/libdbi-drivers/default | |||
SECTION:=libs | |||
CATEGORY:=Libraries | |||
URL:=http://libdbi-drivers.sourceforge.net/ | |||
endef | |||
define Package/libdbi-drivers | |||
$(call Package/libdbi-drivers/default) | |||
DEPENDS:=libdbi +libdbd-mysql +libdbd-pgsql +libdbd-sqlite3 | |||
TITLE:=Database drivers for libdbi | |||
endef | |||
define Package/libdbd-mysql | |||
$(call Package/libdbi-drivers/default) | |||
DEPENDS:=libdbi +libmysqlclient | |||
TITLE:=MySQL database server driver for libdbi | |||
endef | |||
define Package/libdbd-pgsql | |||
$(call Package/libdbi-drivers/default) | |||
DEPENDS:=libdbi +libpq | |||
TITLE:=PostgreSQL database server driver for libdbi | |||
endef | |||
define Package/libdbd-sqlite3 | |||
$(call Package/libdbi-drivers/default) | |||
DEPENDS:=libdbi +libsqlite3 | |||
TITLE:=SQLite3 database driver for libdbi | |||
endef | |||
CONFIGURE_ARGS += \ | |||
--enable-shared \ | |||
--disable-static \ | |||
--disable-rpath \ | |||
--disable-docs \ | |||
--with-dbi-incdir=$(STAGING_DIR)/usr/include \ | |||
--with-dbi-libdir=$(STAGING_DIR)/usr/lib | |||
ifneq ($(CONFIG_PACKAGE_libdbd-mysql),) | |||
CONFIGURE_ARGS += \ | |||
--with-mysql \ | |||
--with-mysql-incdir=$(STAGING_DIR)/usr/include/mysql \ | |||
--with-mysql-libdir=$(STAGING_DIR)/usr/lib/mysql | |||
TARGET_LDFLAGS += \ | |||
-L$(STAGING_DIR)/usr/lib/mysql/ | |||
else | |||
CONFIGURE_ARGS += --without-mysql | |||
endif | |||
ifneq ($(SDK)$(CONFIG_PACKAGE_libdbd-pgsql),) | |||
CONFIGURE_ARGS += \ | |||
--with-pgsql \ | |||
--with-pgsql-incdir=$(STAGING_DIR)/usr/include \ | |||
--with-pgsql-libdir=$(STAGING_DIR)/usr/lib | |||
else | |||
CONFIGURE_ARGS += --without-pgsql | |||
endif | |||
ifneq ($(SDK)$(CONFIG_PACKAGE_libdbd-sqlite3),) | |||
CONFIGURE_ARGS += \ | |||
--with-sqlite3 \ | |||
--with-sqlite3-incdir=$(STAGING_DIR)/usr/include \ | |||
--with-sqlite3-libdir=$(STAGING_DIR)/usr/lib | |||
else | |||
CONFIGURE_ARGS += --without-sqlite3 | |||
endif | |||
define BuildPlugin | |||
define Package/libdbd-$(1)/install | |||
$(INSTALL_DIR) $$(1)/usr/lib/dbd | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/dbd/libdbd$(1).so $$(1)/usr/lib/dbd/ | |||
endef | |||
$$(eval $$(call BuildPackage,libdbd-$(1))) | |||
endef | |||
#$(eval $(call BuildPackage,libdbi-drivers)) | |||
$(eval $(call BuildPlugin,mysql)) | |||
$(eval $(call BuildPlugin,pgsql)) | |||
$(eval $(call BuildPlugin,sqlite3)) |
@ -0,0 +1,11 @@ | |||
--- a/acinclude.m4 | |||
+++ b/acinclude.m4 | |||
@@ -310,7 +310,7 @@ if test "$ac_sqlite3" = "yes"; then | |||
AC_SEARCH_LIBS_VAR([sqlite3_exec], sqlite3, , , , SQLITE3_LIBS) | |||
SQLITE3_LDFLAGS="" | |||
else | |||
- SQLITE3_LIBS=-lsqlite | |||
+ SQLITE3_LIBS=-lsqlite3 | |||
SQLITE3_LDFLAGS=-L$ac_sqlite3_libdir | |||
fi | |||
@ -0,0 +1,57 @@ | |||
# | |||
# Copyright (C) 2009-2014 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=libdbi | |||
PKG_VERSION:=0.9.0 | |||
PKG_RELEASE:=4 | |||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:=@SF/libdbi | |||
PKG_MD5SUM:=05e2ceeac4bc85fbe40de8b4b22d9ab3 | |||
PKG_LICENSE:=LGPL-2.1 | |||
PKG_LICENSE_FILE:=COPYING | |||
PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org> | |||
PKG_FIXUP:=autoreconf | |||
PKG_INSTALL:=1 | |||
include $(INCLUDE_DIR)/package.mk | |||
define Package/libdbi | |||
SECTION:=libs | |||
CATEGORY:=Libraries | |||
TITLE:=Database Independent Abstraction Layer library | |||
URL:=http://libdbi.sourceforge.net/ | |||
endef | |||
define Package/libdbi/description | |||
This package provides a database-independent abstraction layer library in C. | |||
endef | |||
CONFIGURE_ARGS += \ | |||
--enable-shared \ | |||
--enable-static \ | |||
--disable-docs | |||
define Build/InstallDev | |||
$(INSTALL_DIR) $(1)/usr/include | |||
$(CP) $(PKG_INSTALL_DIR)/usr/include/dbi $(1)/usr/include/ | |||
$(INSTALL_DIR) $(1)/usr/lib | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdbi.{a,so*} $(1)/usr/lib/ | |||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/dbi.pc $(1)/usr/lib/pkgconfig/ | |||
endef | |||
define Package/libdbi/install | |||
$(INSTALL_DIR) $(1)/usr/lib | |||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdbi.so.* $(1)/usr/lib/ | |||
endef | |||
$(eval $(call BuildPackage,libdbi)) |
@ -0,0 +1,73 @@ | |||
# | |||
# Copyright (C) 2009-2012 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
# This Makefile is a skeleton | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=libdmapsharing | |||
PKG_VERSION:=2.9.28 | |||
PKG_RELEASE:=1 | |||
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> | |||
PKG_LICENSE=LGPLv2.1 | |||
PKG_LICENSE_FILE=COPYING | |||
PKG_BUILD_DIR:=$(BUILD_DIR)/libdmapsharing-$(PKG_VERSION) | |||
PKG_SOURCE:=libdmapsharing-$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:=http://www.flyn.org/projects/libdmapsharing/ | |||
PKG_MD5SUM:=a530bee446040f6e6664a38212f16f60 | |||
PKG_FIXUP:=autoreconf | |||
PKG_INSTALL:=1 | |||
include $(INCLUDE_DIR)/package.mk | |||
include $(INCLUDE_DIR)/nls.mk | |||
TARGET_LDFLAGS+= \ | |||
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib | |||
define Package/libdmapsharing | |||
SECTION:=libs | |||
CATEGORY:=Libraries | |||
DEPENDS:=+libsoup +mdnsresponder +gstreamer1 +gst1-plugins-base +libgst1app | |||
TITLE:=libdmapsharing | |||
URL:=http://www.flyn.org/projects/libdmapsharing/ | |||
endef | |||
define Package/libdmapsharing/decription | |||
Libdmapsharing is a DMAP library implementation in C | |||
endef | |||
CONFIGURE_ARGS += \ | |||
--disable-introspection \ | |||
--disable-gtk-doc | |||
define Build/InstallDev | |||
$(INSTALL_DIR) $(1)/usr/include/ | |||
$(CP) \ | |||
$(PKG_INSTALL_DIR)/usr/include/libdmapsharing-3.0/ \ | |||
$(1)/usr/include/ | |||
$(INSTALL_DIR) $(1)/usr/lib/ | |||
$(CP) \ | |||
$(PKG_INSTALL_DIR)/usr/lib/*.so* \ | |||
$(1)/usr/lib/ | |||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ | |||
$(INSTALL_DATA) \ | |||
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \ | |||
$(1)/usr/lib/pkgconfig/ | |||
endef | |||
define Package/libdmapsharing/install | |||
$(INSTALL_DIR) $(1)/usr/lib/ | |||
$(CP) \ | |||
$(PKG_INSTALL_DIR)/usr/lib/*.so* \ | |||
$(1)/usr/lib/ | |||
endef | |||
$(eval $(call BuildPackage,libdmapsharing)) |
@ -0,0 +1,24 @@ | |||
Index: libdmapsharing-2.9.15/configure.ac | |||
=================================================================== | |||
--- libdmapsharing-2.9.15.orig/configure.ac 2012-08-14 21:02:31.861158482 +0200 | |||
+++ libdmapsharing-2.9.15/configure.ac 2012-08-14 21:03:42.448658906 +0200 | |||
@@ -112,18 +112,7 @@ | |||
AC_SUBST(GOBJECT_CFLAGS) | |||
AC_SUBST(GOBJECT_LIBS) | |||
-dnl Check for gdk-pixbuf, needed for DACP Now Playing Artwork | |||
-PKG_CHECK_MODULES(GDKPIXBUF, gdk-pixbuf-2.0, | |||
- HAVE_GDKPIXBUF=yes, | |||
- HAVE_GDKPIXBUF=no) | |||
- | |||
-if test x"$HAVE_GDKPIXBUF" = "xyes"; then | |||
- AC_DEFINE(HAVE_GDKPIXBUF, 1, [Define if gdk-pixbuf support is enabled]) | |||
-else | |||
- AC_WARN(Gdk-pixbuf library not present, Now Playing artwork might be affected.) | |||
-fi | |||
- | |||
-AM_CONDITIONAL(USE_GDKPIXBUF, test x"$HAVE_GDKPIXBUF" = "xyes") | |||
+HAVE_GDKPIXBUF=no | |||
AC_SUBST(GDKPIXBUF_CFLAGS) | |||
AC_SUBST(GDKPIXBUF_LIBS) |
@ -1,11 +0,0 @@ | |||
--- a/makefile.cfg | |||
+++ b/makefile.cfg | |||
@@ -168,7 +168,7 @@ libjpeg.a: @A2K_DEPS@ $(LIBOBJECTS) | |||
# with libtool: | |||
libjpeg.la: @A2K_DEPS@ $(LIBOBJECTS) | |||
- $(LIBTOOL) --mode=link $(CC) -o libjpeg.la $(LIBOBJECTS) \ | |||
+ $(LIBTOOL) --mode=link "$(CC)" -o libjpeg.la $(LIBOBJECTS) \ | |||
-rpath $(libdir) -version-info $(JPEG_LIB_VERSION) | |||
# sample programs: |