From d17588da1a9505694271bc5e2db83cea46ef7a56 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Thu, 18 Oct 2018 16:56:47 +0800 Subject: [PATCH] first commit --- .github/issue_template | 17 + .github/pull_request_template | 5 + .keys/626471F1.asc | 64 + .keys/D52BBB6B.asc | 30 + .travis.yml | 16 + .travis_do.sh | 241 + CONTRIBUTING.md | 115 + LICENSE | 884 +- README.md | 28 +- admin/debootstrap/Makefile | 56 + admin/debootstrap/files/pkgdetails.c | 347 + admin/htop/Makefile | 54 + admin/ipmitool/Makefile | 53 + admin/monit/Makefile | 95 + admin/monit/files/monit.init | 15 + .../patches/001-fix-default-piddir.patch | 18 + admin/muninlite/Makefile | 54 + admin/muninlite/files/etc/xinetd.d/munin | 10 + admin/muninlite/patches/001-fix_disks.patch | 10 + admin/muninlite/patches/002-hostname.patch | 11 + .../patches/100-fix-no-ethtool.patch | 21 + .../patches/110-fix-uptime-days.patch | 12 + admin/muninlite/patches/200-add-tap-dev.patch | 20 + .../patches/210-add-bridge-devs.patch | 24 + .../patches/220-modify-ifname-parser.patch | 22 + .../230-fix-available-interface-parsing.patch | 20 + admin/netdata/Makefile | 71 + admin/netdata/files/netdata.conf | 121 + admin/netdata/files/netdata.init | 21 + ...-disable_external_plugins_by_default.patch | 22 + admin/openwisp-config/Makefile | 113 + admin/sudo/Makefile | 98 + admin/sudo/files/sudo.init | 11 + .../patches/010-cross-compile-fixes.patch | 16 + admin/sudo/patches/020-no-owner-change.patch | 12 + .../patches/030-musl-fix-missing-header.patch | 12 + admin/syslog-ng/Makefile | 77 + admin/syslog-ng/files/syslog-ng.conf | 41 + admin/syslog-ng/files/syslog-ng.init | 31 + .../patches/100-use-1.0.2k-threadids.patch | 35 + admin/zabbix/Makefile | 235 + admin/zabbix/files/mac80211 | 29 + admin/zabbix/files/network | 9 + admin/zabbix/files/wifi | 25 + admin/zabbix/files/zabbix_agentd.init | 23 + admin/zabbix/files/zabbix_helper_mac80211.c | 77 + .../patches/002-fix-res_send-on-uclibc.patch | 35 + admin/zabbix/patches/002-uclibc_loadavg.patch | 48 + .../003-change-user-and-foreground.patch | 17 + .../patches/010-change-agentd-config.patch | 65 + admin/zabbix/patches/100-musl-compat.patch | 23 + .../patches/110-reproducible-builds.patch | 13 + devel/autoconf/Makefile | 70 + devel/automake/Makefile | 65 + devel/diffutils/Makefile | 62 + devel/gcc/Makefile | 176 + devel/gcc/README | 10 + .../001-revert_register_mode_search.patch | 65 + devel/gcc/patches/002-case_insensitive.patch | 14 + ...t-choke-when-building-32bit-on-64bit.patch | 14 + .../gcc/patches/003-mpfr-longlong-mips.patch | 38 + devel/gcc/patches/010-documentation.patch | 23 + devel/gcc/patches/020-no-plt-backport.patch | 28 + .../patches/040-fix-mips-ICE-PR-68400.patch | 23 + devel/gcc/patches/100-uclibc-conf.patch | 33 + devel/gcc/patches/200-musl_config.patch | 309 + devel/gcc/patches/201-musl_arm.patch | 43 + devel/gcc/patches/202-musl_mips.patch | 35 + devel/gcc/patches/203-musl_powerpc.patch | 209 + devel/gcc/patches/204-musl_sh.patch | 39 + devel/gcc/patches/205-musl_x86.patch | 41 + devel/gcc/patches/206-musl_aarch64.patch | 31 + devel/gcc/patches/207-musl_fixincludes.patch | 30 + devel/gcc/patches/209-musl_libstdc++.patch | 72 + devel/gcc/patches/230-musl_libssp.patch | 13 + devel/gcc/patches/240-musl-libitm-fixes.patch | 61 + devel/gcc/patches/250-add-musl.patch | 120 + .../gcc/patches/260-musl-add-unwind-fix.patch | 34 + .../270-musl-add-powerpc-softfloat-fix.patch | 24 + .../300-mips_Os_cpu_rtx_cost_model.patch | 14 + .../patches/800-arm_v5te_no_ldrd_strd.patch | 11 + .../patches/810-arm-softfloat-libgcc.patch | 25 + devel/gcc/patches/820-libgcc_pic.patch | 36 + .../gcc/patches/830-arm_unbreak_armv4t.patch | 13 + .../840-armv4_pass_fix-v4bx_to_ld.patch | 19 + devel/gcc/patches/850-use_shared_libgcc.patch | 47 + devel/gcc/patches/851-libgcc_no_compat.patch | 12 + devel/gcc/patches/870-ppc_no_crtsavres.patch | 11 + devel/gcc/patches/880-no_java_section.patch | 11 + devel/gcc/patches/900-bad-mips16-crt.patch | 9 + devel/gcc/patches/910-mbsd_multi.patch | 222 + .../patches/920-specs_nonfatal_getenv.patch | 15 + .../patches/930-fix-mips-noexecstack.patch | 111 + devel/gcc/patches/930-osdefines.patch | 13 + .../patches/940-no-clobber-stamp-bits.patch | 11 + .../950-cpp_file_path_translation.patch | 182 + devel/gcc/patches/960-go_libm.patch | 11 + devel/gcc/patches/970-warn_bug.patch | 11 + devel/libtool-bin/Makefile | 52 + devel/lpc21isp/Makefile | 42 + .../patches/100-fix-reproducible-builds.patch | 13 + devel/lttng-modules/Makefile | 45 + .../patches/001-mm_page_alloc_extfrag.patch | 10 + devel/lttng-tools/Makefile | 60 + .../lttng-tools/patches/100-musl-compat.patch | 23 + .../lttng-tools/patches/200-use-extern.patch | 423 + devel/m4/Makefile | 41 + devel/make/Makefile | 46 + devel/patch/Makefile | 52 + devel/patch/patches/010-CVE-2018-6951.patch | 29 + .../patch/patches/020-CVE-2018-1000156.patch | 209 + devel/patch/patches/030-CVE-2018-6952.patch | 30 + devel/pkg-config/Makefile | 49 + fonts/dejavu-fonts-ttf/Makefile | 84 + ipv6/tayga/Makefile | 49 + ipv6/tayga/files/tayga-proto.sh | 96 + ipv6/tayga/files/tayga.hotplug | 37 + ipv6/tayga/files/tayga.sh | 152 + .../patches/001-configure_unset_CFLAGS.patch | 11 + .../002-bigendian_wrong_checksum.patch | 53 + kernel/exfat-nofuse/Makefile | 50 + kernel/mtd-rw/Makefile | 50 + lang/dkjson/Makefile | 50 + lang/erlang/Makefile | 339 + .../patches/101-emulator_includes.patch | 11 + lang/erlang/patches/102-musl_compat.patch | 11 + lang/erlang/patches/103-disable_emacs.patch | 11 + lang/golang/golang-compiler.mk | 186 + lang/golang/golang-package.mk | 305 + lang/golang/golang-values.mk | 72 + lang/golang/golang-version.mk | 14 + lang/golang/golang/Makefile | 272 + lang/golang/golang/files/go-gcc-helper | 23 + lang/jamvm/Makefile | 67 + ...-Use-fenv.h-instead-of-fpu_control.h.patch | 86 + lang/json4lua/Makefile | 53 + lang/ldbus/Makefile | 61 + lang/lpeg/Makefile | 49 + lang/lua-bencode/Makefile | 49 + lang/lua-cjson/Makefile | 56 + lang/lua-copas/Makefile | 63 + lang/lua-copas/patches/makefile.patch | 15 + lang/lua-coxpcall/Makefile | 60 + lang/lua-coxpcall/patches/config.patch | 4 + lang/lua-lsqlite3/Makefile | 58 + lang/lua-lzlib/Makefile | 49 + .../patches/001-allow_optim_flags.patch | 12 + lang/lua-md5/Makefile | 76 + lang/lua-md5/patches/config.patch | 19 + lang/lua-md5/patches/makefile.patch | 10 + lang/lua-mobdebug/Makefile | 57 + lang/lua-mosquitto/Makefile | 43 + lang/lua-openssl/Makefile | 43 + .../patches/0001-Revise-Makefile.patch | 135 + .../patches/0010-Fix-Linkage.patch | 36 + .../0020-support-OPENSSL_NO_SSL3_METHOD.patch | 41 + .../0030-support-OPENSSL_NO_COMP.patch | 20 + lang/lua-penlight/Makefile | 49 + lang/lua-rings/Makefile | 55 + lang/lua-rings/patches/config.patch | 28 + lang/lua-rings/patches/makefile.patch | 11 + lang/lua-rs232/Makefile | 63 + .../patches/100-remove-build-timestamps.patch | 22 + lang/lua-sha2/Makefile | 53 + lang/lua-sha2/patches/001-makefile.patch | 14 + lang/lua-wsapi/Makefile | 96 + lang/lua-xavante/Makefile | 59 + lang/luabitop/Makefile | 53 + lang/luaexpat/Makefile | 56 + lang/luaexpat/files/compat-5.1r5/compat-5.1.c | 97 + lang/luaexpat/files/compat-5.1r5/compat-5.1.h | 13 + .../files/compat-5.1r5/compat-5.1.lua | 267 + lang/luafilesystem/Makefile | 67 + lang/luai2c/Makefile | 46 + lang/luajit/Makefile | 92 + lang/luajit/patches/010-lua-path.patch | 13 + lang/lualanes/Makefile | 58 + lang/lualanes/patches/100-musl-compat.patch | 13 + lang/luaposix/Makefile | 65 + lang/luaposix/patches/100-eglibc-compat.patch | 30 + .../luaposix/patches/101-disable-curses.patch | 32 + .../102-disable-compat-deprecated.diff | 20 + lang/luarocks/Makefile | 81 + .../patches/01_dont_modify_bin_shebang.diff | 13 + ...onfigure_uname_siteconfig_adjustment.patch | 37 + lang/luasec/Makefile | 61 + lang/luasoap/Makefile | 56 + lang/luasocket/Makefile | 64 + .../patches/0001-Add-interface-support.patch | 237 + .../patches/0301-Fix-mpc85xx-build.patch | 25 + lang/luasql/Makefile | 119 + lang/luv/Config.in | 11 + lang/luv/Makefile | 61 + lang/lzmq/Makefile | 48 + lang/node-arduino-firmata/Makefile | 68 + .../arduino-firmata/lib/arduino-firmata.js | 306 + .../patches/000-new-serialport.patch | 10 + lang/node-cylon/Makefile | 100 + lang/node-cylon/patches/0001-serialport.patch | 13 + lang/node-hid/Makefile | 65 + lang/node-mozilla-iot-gateway/Makefile | 71 + .../files/mozilla-iot-gateway.init | 12 + lang/node-serialport/Makefile | 65 + lang/node/Makefile | 128 + lang/node/patches/001-hardfloat.patch | 10 + lang/node/patches/002-addr_info.patch | 10 + lang/node/patches/003-path.patch | 12 + .../004-node_crypto_include_cmath.patch | 25 + lang/perl-authen-sasl-xs/Makefile | 50 + .../100-remove-devel-checklib-checks.patch | 49 + lang/perl-authen-sasl/Makefile | 49 + lang/perl-cgi/Makefile | 52 + lang/perl-compress-bzip2/Makefile | 48 + lang/perl-dbi/Makefile | 65 + lang/perl-device-serialport/Makefile | 53 + lang/perl-device-usb/Makefile | 73 + lang/perl-device-usb/README.patches | 8 + .../patches/100-fix_buildsystem.patch | 20 + .../110-just_assume_libusb_is_there.diff | 30 + .../patches/120-use_libusb_0_1.patch | 13 + .../130-provide-proper-library-paths.patch | 13 + .../140-avoid-libusb-name-conflicts.patch | 219 + lang/perl-encode-locale/Makefile | 48 + lang/perl-file-listing/Makefile | 48 + lang/perl-file-sharedir-install/Makefile | 64 + lang/perl-html-form/Makefile | 48 + lang/perl-html-parser/Makefile | 48 + lang/perl-html-tagset/Makefile | 48 + lang/perl-html-tree/Makefile | 48 + lang/perl-http-cookies/Makefile | 48 + lang/perl-http-daemon/Makefile | 48 + lang/perl-http-date/Makefile | 48 + lang/perl-http-message/Makefile | 48 + lang/perl-http-negotiate/Makefile | 48 + lang/perl-http-server-simple/Makefile | 48 + lang/perl-inline-c/Makefile | 65 + .../100-inline_c-no_compile_hack.patch | 11 + ...ne_c-make_system_typemap_overridable.patch | 46 + lang/perl-inline/Makefile | 65 + lang/perl-io-html/Makefile | 48 + lang/perl-lockfile-simple/Makefile | 48 + lang/perl-lwp-mediatypes/Makefile | 48 + lang/perl-net-http/Makefile | 48 + lang/perl-net-telnet/Makefile | 48 + lang/perl-parse-recdescent/Makefile | 64 + lang/perl-sub-uplevel/Makefile | 48 + lang/perl-test-harness/Makefile | 48 + lang/perl-test-warn/Makefile | 48 + lang/perl-text-csv_xs/Makefile | 48 + lang/perl-uri/Makefile | 48 + lang/perl-www-curl/Makefile | 49 + ...rl-www-curl_disable_curl-config_hack.patch | 74 + .../patches/101-skip-preprocessor-symbol.path | 34 + .../patches/200-fix_default_lflags.patch | 11 + lang/perl-www-mechanize/Makefile | 48 + lang/perl-www-robotrules/Makefile | 48 + lang/perl-www/Makefile | 48 + lang/perl-xml-parser/Makefile | 86 + .../patches/010-xml-parser-expat-use-ppport.h | 7476 +++++++ ...xml-parser-expat-lib-inc-path-anchor.patch | 12 + lang/perl/Config.in | 31 + lang/perl/Makefile | 186 + lang/perl/README.patches | 9 + lang/perl/files/README.config | 59 + lang/perl/files/aarch64.config | 20 + lang/perl/files/architecture.config | 121 + lang/perl/files/arm.config | 20 + lang/perl/files/armeb.config | 20 + lang/perl/files/base.config | 1058 + lang/perl/files/i486.config | 31 + lang/perl/files/libc.config | 47 + lang/perl/files/mips.config | 20 + lang/perl/files/mips64.config | 21 + lang/perl/files/mipsel.config | 20 + lang/perl/files/misc.config | 11 + lang/perl/files/perl-run_tests.sh | 81 + lang/perl/files/perlconfig.pl | 313 + lang/perl/files/powerpc.config | 20 + lang/perl/files/signal.config | 18 + lang/perl/files/threads.config | 197 + lang/perl/files/version.config | 38 + lang/perl/files/x86_64.config | 31 + lang/perl/patches/010-musl-compat.patch | 11 + .../patches/020-storables-stacksize.patch | 73 + ...x-cross-compile-endianness-detection.patch | 22 + .../patches/110-always_use_miniperl.patch | 27 + .../patches/120-remove-build-timestamp.patch | 21 + lang/perl/patches/300-add-relink-hack.patch | 6 + lang/perl/patches/320-copy-pod-hack.patch | 42 + .../710-threads_join-skip_ps_on_busybox.patch | 81 + lang/perl/patches/900-use-rm-force.patch | 285 + .../patches/910-miniperl-needs-inc-dot.patch | 39 + lang/perl/patches/920-fix-no-locale.patch | 399 + lang/perl/perlbase.mk | 1559 ++ lang/perl/perlmod.mk | 173 + lang/perl/perlver.mk | 10 + lang/php7-pecl-dio/Makefile | 34 + lang/php7-pecl-http/Makefile | 57 + .../100_php_http_etag_bigendian_check.patch | 11 + .../patches/200-string_or_null_register.patch | 57 + lang/php7-pecl-http/patches/300-fix-73.patch | 55 + lang/php7-pecl-libevent/Makefile | 39 + .../patches/010-libevent2.patch | 16 + lang/php7-pecl-propro/Makefile | 43 + lang/php7-pecl-raphf/Makefile | 43 + lang/php7/Makefile | 635 + lang/php7/files/php.ini | 152 + lang/php7/files/php7-fastcgi.config | 3 + lang/php7/files/php7-fastcgi.init | 29 + lang/php7/files/php7-fpm-www.conf | 392 + lang/php7/files/php7-fpm.conf | 121 + lang/php7/files/php7-fpm.config | 2 + lang/php7/files/php7-fpm.init | 28 + ...-use-of-the-system-timezone-database.patch | 653 + .../patches/0016-dont-gitclean-in-build.patch | 19 + .../patches/0032-Use-system-timezone.patch | 43 + ...ove-build-timestamps-from-generated-.patch | 102 + ...ation-icon-to-not-expose-the-reader-.patch | 25 + .../0050-remove-build-timestamps.patch | 28 + ...fix_membar_producer_link_error_gcc3x.patch | 11 + ...xt-opcache-fix-detection-of-shm-mmap.patch | 159 + lang/php7/patches/1002-gd-iconv.patch | 14 + .../1003-Fix-dl-cross-compiling-issue.patch | 59 + .../patches/1004-disable-phar-command.patch | 32 + lang/php7/patches/1006-multiline-syslog.patch | 178 + .../patches/1010-pcrelib-NativeMIPS.patch | 17 + ...12-php_iconv_string-null-out-pointer.patch | 69 + lang/php7/pecl.mk | 47 + lang/python/Flask/Makefile | 43 + lang/python/Jinja2/Makefile | 42 + lang/python/MarkupSafe/Makefile | 40 + lang/python/Werkzeug/Makefile | 42 + lang/python/chardet/Makefile | 52 + lang/python/click/Makefile | 40 + lang/python/django-appconf/Makefile | 47 + lang/python/django-compressor/Makefile | 48 + lang/python/django-constance/Makefile | 47 + lang/python/django-jsonfield/Makefile | 47 + lang/python/django-picklefield/Makefile | 47 + lang/python/django-postoffice/Makefile | 48 + lang/python/django-restframework/Makefile | 48 + lang/python/django-statici18n/Makefile | 47 + lang/python/django/Makefile | 65 + lang/python/et_xmlfile/Makefile | 47 + lang/python/flup/Makefile | 47 + lang/python/gunicorn/Makefile | 52 + lang/python/itsdangerous/Makefile | 40 + lang/python/jdcal/Makefile | 47 + lang/python/micropython-lib/Makefile | 55 + lang/python/micropython/Makefile | 58 + .../patches/000-Makefile-no-errors | 13 + lang/python/micropython/patches/001-all-unix | 12 + lang/python/openpyxl/Makefile | 47 + lang/python/pillow/Makefile | 53 + .../python/pillow/patches/010-fix-paths.patch | 182 + lang/python/pyodbc/Makefile | 67 + ...-assume-SQL_C_WCHAR-is-native-endian.patch | 59 + lang/python/python-asn1crypto/Makefile | 65 + lang/python/python-attrs/Makefile | 69 + lang/python/python-automat/Makefile | 99 + .../001-do-not-use-setuptools-scm-m2r.patch | 30 + .../patches/002-omit-visualize.patch | 18 + .../patches/003-omit-tests.patch | 19 + lang/python/python-cffi/Makefile | 73 + lang/python/python-constantly/Makefile | 69 + lang/python/python-crcmod/Makefile | 50 + lang/python/python-crypto/Makefile | 82 + .../patches/001-no-host-paths.patch | 11 + .../patches/002-fix-endianness-detect.patch | 13 + .../patches/003-omit-tests.patch | 19 + lang/python/python-cryptography/Makefile | 82 + .../001-disable-setup-requirements.patch | 10 + .../002-remove-undefined-dtls-methods.patch | 12 + lang/python/python-curl/Makefile | 45 + lang/python/python-dateutil/Makefile | 47 + lang/python/python-dns/Makefile | 44 + lang/python/python-dpkt/Makefile | 48 + lang/python/python-egenix-mx-base/Makefile | 55 + lang/python/python-enum34/Makefile | 55 + .../python-enum34/patches/001-omit-docs.patch | 19 + lang/python/python-evdev/Makefile | 83 + lang/python/python-gmpy2/Makefile | 79 + lang/python/python-gnupg/Makefile | 83 + lang/python/python-host.mk | 96 + lang/python/python-hyperlink/Makefile | 73 + .../patches/001-omit-tests.patch | 13 + lang/python/python-idna/Makefile | 70 + lang/python/python-incremental/Makefile | 67 + .../patches/001-omit-tests.patch | 11 + lang/python/python-ipaddress/Makefile | 48 + lang/python/python-ldap/Makefile | 57 + .../python-ldap/patches/010-setup_cfg.patch | 16 + lang/python/python-lxml/Makefile | 94 + lang/python/python-mysql/Makefile | 48 + .../python-mysql/patches/010-threadsafe.patch | 11 + lang/python/python-package-install.sh | 91 + lang/python/python-package.mk | 139 + lang/python/python-packages/Makefile | 130 + lang/python/python-packages/README.md | 72 + lang/python/python-parsley/Makefile | 75 + .../patches/001-py3-read-utf8.patch | 19 + .../patches/002-omit-tests.patch | 11 + lang/python/python-pcapy/Makefile | 46 + lang/python/python-pip-conf/Makefile | 36 + lang/python/python-pip-conf/files/pip.conf | 3 + lang/python/python-ply/Makefile | 69 + lang/python/python-psycopg2/Makefile | 55 + lang/python/python-pyasn1-modules/Makefile | 72 + lang/python/python-pyasn1/Makefile | 70 + lang/python/python-pycparser/Makefile | 72 + .../patches/001-use-external-ply.patch | 41 + lang/python/python-pyopenssl/Makefile | 73 + lang/python/python-pyptlib/Makefile | 50 + lang/python/python-pyserial/Makefile | 50 + lang/python/python-service-identity/Makefile | 78 + lang/python/python-six/Makefile | 82 + lang/python/python-txsocksx/Makefile | 60 + .../patches/001-omit-tests.patch | 9 + .../patches/002-do-not-use-vcversioner.patch | 27 + lang/python/python-urllib3/Makefile | 48 + lang/python/python-version.mk | 19 + lang/python/python-yaml/Makefile | 66 + lang/python/python-zope-interface/Makefile | 70 + .../patches/001-omit-tests.patch | 21 + lang/python/python/Config-python-light.in | 7 + lang/python/python/Makefile | 315 + lang/python/python/files/config.site | 12 + .../python/files/python-package-codecs.mk | 23 + .../python/files/python-package-compiler.mk | 16 + .../python/files/python-package-ctypes.mk | 18 + lang/python/python/files/python-package-db.mk | 18 + .../python/files/python-package-decimal.mk | 16 + .../python/python/files/python-package-dev.mk | 27 + .../python/files/python-package-distutils.mk | 16 + .../python/files/python-package-email.mk | 16 + .../python/files/python-package-gdbm.mk | 16 + .../python/files/python-package-lib2to3.mk | 18 + .../python/files/python-package-logging.mk | 16 + .../files/python-package-multiprocessing.mk | 17 + .../python/files/python-package-ncurses.mk | 18 + .../python/files/python-package-openssl.mk | 17 + .../python/python/files/python-package-pip.mk | 28 + .../python/files/python-package-pydoc.mk | 18 + .../python/files/python-package-setuptools.mk | 30 + .../python/files/python-package-sqlite3.mk | 17 + .../python/files/python-package-unittest.mk | 16 + .../python/python/files/python-package-xml.mk | 20 + .../python/patches/001-enable-zlib.patch | 20 + ...dd-include-dirs-when-cross-compiling.patch | 12 + .../003-do-not-compile-tests-at-build.patch | 18 + .../004-do-not-write-bytes-codes.patch | 11 + .../patches/005-fix-bluetooth-support.patch | 57 + ...06-remove-multi-arch-and-local-paths.patch | 16 + .../007-distutils-do-not-adjust-path.patch | 10 + .../008-distutils-use-python-sysroot.patch | 50 + ...t-use-dblib_dir-when-cross-compiling.patch | 32 + ...add-rt-lib-dirs-when-cross-compiling.patch | 13 + ...12-add-support-source-date-epoch-pyc.patch | 10 + ...uildinfo-date-time-source-date-epoch.patch | 28 + lang/python/python3-bottle/Makefile | 52 + lang/python/python3-host.mk | 96 + lang/python/python3-package.mk | 138 + lang/python/python3-version.mk | 23 + lang/python/python3/Config-python3-light.in | 7 + lang/python/python3/Makefile | 312 + lang/python/python3/files/config.site | 12 + .../python3/files/python3-package-asyncio.mk | 16 + .../python3/files/python3-package-cgi.mk | 27 + .../python3/files/python3-package-codecs.mk | 22 + .../python3/files/python3-package-ctypes.mk | 18 + .../python3/files/python3-package-dbm.mk | 17 + .../python3/files/python3-package-decimal.mk | 17 + .../python3/files/python3-package-dev.mk | 27 + .../files/python3-package-distutils.mk | 16 + .../python3/files/python3-package-email.mk | 16 + .../python3/files/python3-package-gdbm.mk | 16 + .../python3/files/python3-package-lib2to3.mk | 18 + .../python3/files/python3-package-logging.mk | 16 + .../python3/files/python3-package-lzma.mk | 17 + .../files/python3-package-multiprocessing.mk | 17 + .../python3/files/python3-package-ncurses.mk | 18 + .../python3/files/python3-package-openssl.mk | 17 + .../python3/files/python3-package-pip.mk | 29 + .../python3/files/python3-package-pydoc.mk | 18 + .../files/python3-package-setuptools.mk | 32 + .../python3/files/python3-package-sqlite3.mk | 17 + .../python3/files/python3-package-unittest.mk | 16 + .../python3/files/python3-package-xml.mk | 19 + .../python3/patches/001-enable-zlib.patch | 20 + .../003-do-not-run-distutils-tests.patch | 18 + .../004-do-not-write-bytes-codes.patch | 11 + ...06-remove-multi-arch-and-local-paths.patch | 19 + .../007-distutils-do-not-adjust-path.patch | 10 + ...add-rt-lib-dirs-when-cross-compiling.patch | 13 + ...12-add-support-source-date-epoch-pyc.patch | 13 + ...uildinfo-date-time-source-date-epoch.patch | 28 + .../014-remove-platform-so-suffix.patch | 22 + .../patches/015-abort-on-failed-modules.patch | 10 + .../patches/016-adjust-config-paths.patch | 62 + lang/python/pytz/Makefile | 47 + lang/python/rcssmin/Makefile | 57 + lang/python/simplejson/Makefile | 47 + lang/python/twisted/Makefile | 64 + .../twisted/patches/001-omit-tkconch.patch | 18 + .../twisted/patches/002-omit-tests.patch | 31 + lang/ruby/Makefile | 806 + lang/ruby/files/ruby | 5 + lang/ruby/ruby_find_pkgsdeps | 268 + lang/ruby/ruby_missingfiles | 41 + lang/tcl/Makefile | 73 + .../100-disable_tzdata_and_msgs_install.patch | 22 + lang/tcl/patches/200-fix_mips_build.patch | 20 + lang/uuid/Makefile | 52 + lang/vala/Makefile | 93 + libs/alsa-lib/Makefile | 92 + libs/alsa-lib/patches/100-link_fix.patch | 22 + libs/apr-util/Makefile | 82 + .../patches/001-automake-compat.patch | 21 + libs/apr/Makefile | 79 + libs/apr/patches/001-autoconf-compat.patch | 26 + libs/apr/patches/101-fix_apr_time_now.patch | 13 + .../patches/201-upgrade-and-fix-1.5.1.patch | 51 + libs/avahi/Makefile | 408 + libs/avahi/files/avahi-daemon.conf | 28 + libs/avahi/files/avahi-daemon.init | 23 + libs/avahi/files/netifd-autoip.sh | 20 + libs/avahi/files/service-http | 10 + libs/avahi/files/service-ssh | 9 + .../010-step_back_autotools-no-gettext.patch | 80 + .../011-fix-poll-h-warnings-on-musl.patch | 65 + libs/avro/Makefile | 56 + libs/boost/Makefile | 508 + libs/c-ares/Makefile | 54 + libs/check/Makefile | 61 + libs/classpath/Makefile | 90 + .../patches/010-double-memleak.patch | 91 + libs/confuse/Makefile | 80 + libs/cyrus-sasl/Makefile | 114 + libs/db47/Makefile | 100 + libs/db47/patches/010-patch.4.7.25.1.patch | 55 + libs/db47/patches/020-patch.4.7.25.2.patch | 42 + libs/db47/patches/030-patch.4.7.25.3.patch | 211 + libs/db47/patches/040-patch.4.7.25.4.patch | 118 + .../patches/100-repmgr-format-security.patch | 11 + libs/dmx_usb_module/Makefile | 56 + .../patches/001-dmx_usb_Makefile.patch | 13 + .../patches/002-fix-build-4.14.patch | 11 + libs/dtc/Makefile | 95 + libs/dtndht/Makefile | 46 + libs/dtndht/patches/001-musl_header.patch | 30 + libs/elektra/Makefile | 452 + libs/eventlog/Makefile | 44 + libs/expat/Makefile | 67 + libs/faad2/Makefile | 89 + libs/fcgi/Makefile | 82 + .../fcgi/patches/100-fcgio-int-type-fix.patch | 38 + libs/fcgi/patches/110-no_examples.patch | 24 + libs/fcgi/patches/120-stdio.patch | 12 + libs/fftw3/Makefile | 121 + libs/fftw3/patches/001-makefile.patch | 20 + libs/file/Makefile | 100 + libs/flac/Makefile | 75 + .../patches/001-no-docs-and-examples.patch | 25 + libs/flac/patches/002-no-utility.patch | 13 + libs/flac/patches/005-gcc_debug_options.patch | 16 + libs/flac/patches/010-automake-compat.patch | 11 + libs/freetype/Makefile | 81 + libs/gdbm/Makefile | 69 + libs/getdns/Config.in | 16 + libs/getdns/Makefile | 75 + ...lude-linux-sysctl.h-in-getentropy_li.patch | 25 + libs/giflib/Makefile | 62 + libs/giflib/patches/100-no-docs.patch | 10 + libs/glib2/Makefile | 111 + libs/glib2/patches/001-automake-compat.patch | 11 + .../patches/002-fix-gthreadedresolver.patch | 20 + libs/glpk/Makefile | 66 + libs/gnutls/Config.in | 56 + libs/gnutls/Makefile | 248 + libs/gperf/Makefile | 47 + .../gperf/patches/100-include_own_first.patch | 26 + libs/hidapi/Makefile | 78 + .../patches/010-add-iconv-linkage.patch | 22 + libs/hiredis/Makefile | 56 + libs/hiredis/patches/001-lvalue_fix.patch | 13 + libs/ibrcommon/Makefile | 49 + .../patches/001-fix-build-with-musl.patch | 23 + libs/ibrdtn/Makefile | 50 + libs/icu/Makefile | 109 + .../000-dont-cpy-files-from-topdirs.patch | 12 + .../002-Disable-LDFLAGSICUDT-for-Linux.patch | 28 + libs/intltool/Makefile | 40 + .../100-optional-perl-xml-parser.patch | 22 + libs/jansson/Makefile | 52 + libs/ldns/Makefile | 84 + .../patches/001-perl5-defined-array.patch | 11 + libs/libaio/Makefile | 63 + libs/libaio/patches/001_arches.patch | 566 + libs/libaio/patches/002_arches_sh.patch | 139 + libs/libaio/patches/003_arches_sparc64.patch | 117 + libs/libaio/patches/004_arches_x32.patch | 65 + libs/libaio/patches/005_arches_mips.patch | 63 + .../patches/006_arches_mips_fix_padding.patch | 37 + libs/libantlr3c/Makefile | 55 + libs/libao/Makefile | 67 + libs/libarchive/Makefile | 97 + libs/libartnet/Makefile | 60 + libs/libartnet/patches/001-bswap_16.patch | 12 + libs/libaudiofile/Makefile | 71 + ...-gcc6-fix-left-shift-negative-number.patch | 18 + .../020-remove-tests-examples-docs.patch | 25 + .../patches/030-CVE-2015-7747.patch | 19 + ...ays-check-the-number-of-coefficients.patch | 34 + ...ues-to-fix-index-overflow-in-IMA.cpp.patch | 37 + ...multiplication-overflow-in-sfconvert.patch | 70 + ...ail-when-error-occurs-in-parseFormat.patch | 35 + ...lication-overflow-in-MSADPCM-decodeS.patch | 120 + ...x-signature-of-multiplyCheckOverflow.patch | 40 + ...k-for-division-by-zero-in-BlockCodec.patch | 21 + libs/libavl/Makefile | 55 + .../patches/010-update_GNUmakefile.patch | 45 + libs/libcanfestival/Makefile | 73 + .../patches/001-sigval-ref-fix.patch | 11 + .../patches/002-makefile-gcc-linker.patch | 33 + .../patches/003-makefile-skip-examples.patch | 20 + .../patches/004-override-cflags.patch | 44 + libs/libcap/Makefile | 87 + libs/libcap/patches/100-portability.patch | 19 + .../200-change-hardcoded-shell-to-sh.patch | 34 + libs/libcoap/Makefile | 101 + libs/libdaemon/Makefile | 72 + .../patches/001-daemon_set_verbosity.patch | 30 + libs/libdaq/Makefile | 74 + libs/libdaq/patches/001-compile.patch | 18 + libs/libdaq/patches/100-musl-compat.patch | 42 + libs/libdbi-drivers/Makefile | 105 + .../patches/001_libsqlite3_fix.patch | 11 + ...move-date-to-fix-reproducible-builds.patch | 140 + libs/libdbi/Makefile | 57 + libs/libdmapsharing/Makefile | 73 + .../patches/001-disable_pixbuf.patch | 22 + .../patches/002-disable_tests.patch | 8 + libs/libdnet/Makefile | 89 + libs/libdnet/patches/001-compile.patch | 20 + libs/libdnet/patches/002-config.patch | 23 + libs/libdouble-conversion/Makefile | 68 + libs/libdrm/Makefile | 69 + .../000-remove-dep-on-pthread-stubs.patch | 101 + libs/libedit/Makefile | 57 + libs/libesmtp/Makefile | 56 + libs/libestr/Makefile | 53 + libs/libev/Makefile | 59 + libs/libevdev/Makefile | 54 + ...010-no-clock-monotonic-raw-in-uclibc.patch | 14 + libs/libevhtp/Makefile | 52 + .../patches/010-strcmp-endianness-fix.patch | 49 + libs/libexif/Makefile | 64 + libs/libexif/patches/100-no_doc.patch | 12 + libs/libextractor/Makefile | 138 + libs/libfastjson/Makefile | 56 + libs/libffi/Makefile | 92 + .../patches/002-fix-toolexeclibdir-path.patch | 31 + .../patches/100-fix_mips_softfloat.patch | 176 + libs/libfmt/Makefile | 63 + libs/libftdi/Makefile | 64 + .../patches/100-fix-x86_64-build.patch | 11 + .../101-fix-cmake-version-packagekit.patch | 29 + .../102-fix-cmake-include-examples.patch | 11 + libs/libftdi1/Makefile | 93 + .../patches/100-fix-x86_64-build.patch | 11 + libs/libgcrypt/Makefile | 70 + .../libgcrypt/patches/001-no_docs_tests.patch | 28 + ...figure-option-enable-build-timestamp.patch | 43 + libs/libgd/Makefile | 110 + libs/libgd/patches/101-gdlib-config.patch | 20 + libs/libgd/patches/102-gdlib-pc-in.patch | 9 + libs/libgd/patches/200-uclibc-ceill.patch | 24 + libs/libgee/Makefile | 73 + .../libgee-0.18.0-no-introspection.patch | 102 + libs/libglog/Makefile | 52 + libs/libgpg-error/Makefile | 81 + libs/libgpg-error/patches/001-gcc5.patch | 54 + libs/libgphoto2/Makefile | 884 + .../patches/001-automake-compat.patch | 23 + ...2-no-docs-examples-test-translations.patch | 95 + libs/libgpiod/Makefile | 79 + libs/libhttp-parser/Makefile | 65 + libs/libical/Makefile | 62 + libs/libid3tag/Makefile | 65 + libs/libidn/Makefile | 91 + .../patches/010-fix-idn-error-usage.patch | 119 + libs/libidn2/Makefile | 93 + libs/libiio/Makefile | 152 + libs/libiio/files/iiod.init | 12 + libs/libimobiledevice/Makefile | 97 + libs/libinput/Makefile | 60 + libs/libinput/patches/001-no-locale.patch | 38 + libs/libinput/patches/002-static_assert.patch | 14 + libs/libjpeg/Makefile | 91 + libs/liblo/Makefile | 70 + libs/liblo/patches/001-fix-musl-include.patch | 11 + libs/liblz4/Makefile | 60 + libs/libmad/Makefile | 78 + .../001-mips_removal_h_constraint.patch | 70 + libs/libmcrypt/Makefile | 65 + libs/libmicrohttpd/Makefile | 94 + libs/libmms/Makefile | 57 + .../010-remove_glib_from_pkgconfig.patch | 10 + libs/libmodbus/Makefile | 56 + libs/libmpdclient/Makefile | 68 + libs/libmpeg2/Makefile | 60 + .../libmpeg2/patches/101-ppc_no_altivec.patch | 66 + .../patches/102-arm_data_preload_check.patch | 19 + libs/libmraa/Makefile | 52 + libs/libmraa/patches/0001-base.patch | 118 + .../patches/0002-add-mips-support.patch | 483 + libs/libmraa/patches/0003-uart.patch | 26 + libs/libmraa/patches/0004-fixes.patch | 666 + libs/libnatpmp/Makefile | 87 + .../patches/001-install_declspec.patch | 11 + libs/libndpi/Makefile | 75 + libs/libnet-1.2.x/Makefile | 71 + .../patches/100-musl-compat.patch | 16 + libs/libnetconf2/Makefile | 77 + libs/libnetfilter-acct/Makefile | 70 + libs/libnopoll/Makefile | 61 + .../patches/001-param_h_rename.patch | 66 + libs/libogg/Makefile | 59 + libs/liboil/Makefile | 70 + libs/liboping/Makefile | 84 + libs/liboping/patches/01-no-werror.patch | 11 + libs/libowfat/Makefile | 75 + libs/libowfat/patches/001-fixbuild.patch | 19 + libs/libp11/Makefile | 61 + libs/libp11/patches/001-fix-install.patch | 54 + libs/libpam/Makefile | 73 + libs/libpam/files/pam.conf | 15 + libs/libpam/files/pam.d/common-account | 20 + libs/libpam/files/pam.d/common-auth | 21 + libs/libpam/files/pam.d/common-password | 28 + libs/libpam/files/pam.d/common-session | 25 + .../files/pam.d/common-session-noninteractive | 25 + libs/libpam/files/pam.d/other | 16 + ...uild-always-use-lib-instead-of-lib64.patch | 36 + ..._rhosts-if-neither-ruserok-nor-ruser.patch | 77 + ..._lastlog-when-logwtmp-is-not-availab.patch | 60 + ...when-crypt-is-not-part-of-crypt_libs.patch | 28 + .../patches/0005-build-fix-doc-build.patch | 133 + ...pilation-in-case-rpc-rpc.h-is-missin.patch | 29 + ...innetgr-is-available-at-compile-time.patch | 106 + libs/libplist/Makefile | 108 + libs/libpng/Makefile | 71 + libs/libpng/patches/100-config_fix.patch | 10 + libs/libpng/patches/101-old-libtool.patch | 13 + libs/libradcli/Config.in | 10 + libs/libradcli/Makefile | 75 + libs/libredblack/Makefile | 61 + libs/libsamplerate/Makefile | 55 + libs/libsearpc/Makefile | 65 + libs/libseccomp/Makefile | 74 + ...100-dont-use-linux-prctl.h-with-musl.patch | 14 + libs/libshout/Makefile | 118 + .../patches/100-add_with-openssl_option.patch | 27 + libs/libshout/patches/120-vorbis-c.patch | 11 + .../patches/140-no_example_doc_win32.patch | 19 + libs/libsigc++/Makefile | 63 + .../patches/001-no_doc_tests_examples.patch | 22 + libs/libsndfile/Makefile | 65 + libs/libsoc/Makefile | 71 + libs/libsodium/Makefile | 73 + libs/libsoup/Makefile | 78 + libs/libsoxr/Makefile | 60 + ...10-Remove_automatic_avutil_inclusion.patch | 11 + libs/libssh/Makefile | 82 + libs/libssh/patches/001-compile.patch | 35 + libs/libssh/patches/002-disable-libssp.patch | 22 + libs/libssh2/Config.in | 15 + libs/libssh2/Makefile | 69 + .../libssh2/patches/01-fix-acinclude-m4.patch | 28 + libs/libstrophe/Config.in | 14 + libs/libstrophe/Makefile | 69 + libs/libtalloc/Makefile | 114 + libs/libtasn1/Makefile | 60 + libs/libtheora/Makefile | 68 + .../libtheora/patches/001-no_docs_tests.patch | 33 + libs/libtheora/patches/002-no_sdl_check.patch | 14 + libs/libtins/Makefile | 52 + libs/libtirpc/Makefile | 59 + ...parts-of-TIRPC-requiring-NIS-support.patch | 48 + ...t-and-musl-does-not-install-rpcent.h.patch | 35 + ...Disable-DES-authentification-support.patch | 142 + .../patches/04-musl-rpc-fix-types.h.patch | 11 + libs/libtorrent/Makefile | 70 + .../patches/100-fix_cross_compile.patch | 41 + libs/libudev-fbsd/Makefile | 51 + .../libudev-fbsd/patches/001-fix-unused.patch | 42 + .../patches/002-replace-nitems.patch | 11 + .../003-add-pkg-config-description.patch | 20 + libs/libudev-fbsd/patches/005-extern-c.patch | 24 + .../100-add-stub-udev_device_get_driver.patch | 25 + ...ev_device_new_from_subsystem_sysname.patch | 72 + ...b-udev_enumerate_add_nomatch_sysattr.patch | 41 + libs/libuecc/Makefile | 52 + libs/libugpio/Makefile | 72 + libs/libuhttpd/Makefile | 82 + libs/libunistring/Makefile | 59 + libs/libupm/Makefile | 83 + libs/libupm/patches/001-version.patch | 16 + libs/libupm/patches/002-at42qt1070-id.patch | 11 + libs/libupm/patches/003-lsm303-args.patch | 11 + libs/libupnp/Makefile | 76 + libs/libupnpp/Makefile | 51 + libs/liburcu/Makefile | 53 + libs/libusbmuxd/Makefile | 91 + libs/libuv/Makefile | 76 + libs/libuvc/Makefile | 54 + libs/libuwsc/Makefile | 82 + libs/libv4l/Makefile | 116 + .../patches/020-add-missing-includes.patch | 28 + .../patches/030-dont-call-getsubopt.patch | 28 + libs/libvorbis/Makefile | 69 + libs/libvorbisidec/Makefile | 63 + libs/libvpx/Makefile | 85 + libs/libwebsockets/Makefile | 105 + ...eLists-build-reproducible-by-default.patch | 78 + libs/libx264/Makefile | 88 + libs/libxerces-c/Makefile | 92 + .../0001-fix-configure-cross-compiling.patch | 20 + libs/libxml2/Makefile | 142 + libs/libxml2/patches/010-CVE-2018-9251.patch | 50 + libs/libxslt/Makefile | 151 + libs/libyaml-cpp/Makefile | 54 + libs/libyang/Makefile | 85 + libs/libyang/patches/001-fix-musl-issue.patch | 47 + libs/libzdb/Makefile | 89 + .../patches/010-cross-compile-fixes.patch | 186 + .../020-filterh-use-host-built-version.patch | 20 + libs/loudmouth/Makefile | 69 + .../patches/001-allow-disable-libidn.patch | 39 + .../900-disable-docs-examples-tests.patch | 27 + libs/lttng-ust/Makefile | 51 + .../lttng-ust/patches/001-no_docs_tests.patch | 11 + libs/lttng-ust/patches/002-examples.patch | 18 + libs/mtdev/Makefile | 56 + libs/musl-fts/Makefile | 60 + libs/mxml/Makefile | 56 + libs/mxml/patches/001-targets.patch | 11 + libs/nacl/Makefile | 49 + libs/nacl/do-openwrt | 206 + libs/neon/Makefile | 78 + libs/opencv/Makefile | 73 + libs/opencv/README.md | 23 + libs/openldap/Makefile | 153 + libs/openldap/files/ldap.init | 19 + .../patches/001-automake-compat.patch | 323 + .../patches/002-no-doc-and-tests-subdir.patch | 5 + libs/openldap/patches/020-autofs-schema.patch | 26 + .../patches/110-reproducible-builds.patch | 21 + libs/openldap/patches/750-no-strip.patch | 22 + libs/opus/Makefile | 73 + libs/p11-kit/Makefile | 60 + libs/p11-kit/files/opensc.module | 1 + libs/pcre/Makefile | 102 + libs/pcre2/Makefile | 95 + libs/pixman/Makefile | 50 + ...4-pixman-fix-detection-of-mips-dspr2.patch | 10 + .../0005-pixman-arm-neon-assembler-fix.patch | 17 + libs/poco/Makefile | 65 + libs/poco/patches/100-configure.patch | 15 + libs/poco/patches/200-strerror.patch | 11 + libs/postgresql/Makefile | 245 + libs/postgresql/files/postgresql.config | 2 + libs/postgresql/files/postgresql.init | 78 + libs/postgresql/files/postgresql.sh | 86 + .../patches/001-configure_fixes.patch | 11 + .../patches/050-build-contrib.patch | 11 + libs/postgresql/patches/200-ranlib.patch | 10 + .../patches/800-busybox-default-pager.patch | 14 + .../patches/900-pg_ctl-setuid.patch | 107 + libs/protobuf-c/Makefile | 68 + libs/protobuf/Makefile | 78 + libs/psqlodbc/Makefile | 76 + libs/pthsem/Makefile | 68 + libs/pthsem/patches/001-linux3x-fix.patch | 12 + libs/pthsem/patches/002-fix-signal.h | 22 + libs/pthsem/patches/003-linux4x-fix.patch | 13 + libs/qrencode/Makefile | 91 + .../qrencode/patches/001-add-inline-svg.patch | 67 + libs/quasselc/Makefile | 65 + .../patches/001-respect-cflags-ldflags.patch | 18 + libs/rxtx/Makefile | 49 + libs/rxtx/patches/010-acm-devices.patch | 11 + libs/sbc/Makefile | 60 + libs/speex/Makefile | 65 + libs/speexdsp/Makefile | 66 + libs/sqlite3/Config.in | 18 + libs/sqlite3/Makefile | 125 + libs/tcp_wrappers/Makefile | 69 + .../patches/001-debian_subset.patch | 936 + .../tcp_wrappers/patches/002-opt_cflags.patch | 12 + .../patches/003-scaffold_malloc.patch | 17 + .../patches/004-ipv4_prefix.patch | 72 + .../patches/005-no--lnsl-on-musl.patch | 22 + libs/tdb/Makefile | 92 + libs/tdb/files/tdb.cache.txt | 36 + .../100-Remove_libbsd_dependency_check.patch | 61 + libs/tiff/Makefile | 106 + libs/tiff/patches/001-autoconf-compat.patch | 31 + libs/tiff/patches/005-fix-ftell-macro.patch | 11 + libs/tiff/patches/020-CVE-2018-5784.patch | 128 + libs/tiff/patches/021-CVE-2018-7456.patch | 170 + libs/tiff/patches/022-CVE-2017-9935.patch | 164 + libs/tiff/patches/023-CVE-2017-18013.patch | 36 + libs/tiff/patches/024-CVE-2018-8905.patch | 53 + libs/tiff/patches/025-CVE-2018-10963.patch | 31 + libs/tiff/patches/026-CVE-2017-11613.patch | 44 + libs/tinycdb/Makefile | 39 + libs/tinycdb/patches/100-Makefile.patch | 25 + libs/udns/Makefile | 74 + libs/udns/patches/0001-use-autotools.patch | 78 + libs/unixodbc/Makefile | 150 + libs/unixodbc/files/odbc.init | 26 + libs/unixodbc/files/unixodbc_conf.h | 22 + .../100-cross-compile-odbc-config.patch | 36 + libs/uw-imap/Makefile | 73 + .../patches/001-fix_Makefiles_and_shlib.patch | 167 + libs/uw-imap/patches/002-imap-2004a-doc.patch | 30 + .../patches/003-imap-2007e-overflow.patch | 13 + .../patches/005-imap-2007e-authmd5.patch | 29 + .../006-imap-2007f-format-security.patch | 12 + .../uw-imap/patches/007-imap-2007e-poll.patch | 192 + libs/vips/Makefile | 82 + libs/vips/patches/001-no_introspection.patch | 73 + libs/xmlrpc-c/Makefile | 223 + libs/xmlrpc-c/patches/001-config.mk.in.patch | 11 + .../patches/002-automake-compat.patch | 13 + libs/xr_usb_serial_common/Makefile | 41 + libs/yajl/Makefile | 60 + .../100-link-reformatter-uclibc-libm.patch | 11 + .../patches/101-link-perf-uclibc-libm.patch | 8 + libs/yaml/Makefile | 51 + libs/zmq/Makefile | 92 + ...sable_pedantic_on_linux_with_ulibc++.patch | 14 + ...0-map_with_const_string_with_ublic++.patch | 41 + .../030-streamoff_missing_with_ulibc++.patch | 10 + .../040-fix_GNUC_conditional_for_GCC5.patch | 11 + .../patches/100-fix-cxx-include-order.patch | 84 + mail/alpine/Makefile | 123 + .../100-no-openssl-check-cross-compile.patch | 29 + mail/bogofilter/Makefile | 58 + mail/bogofilter/files/postfix-bogofilter | 43 + mail/clamsmtp/Makefile | 46 + mail/clamsmtp/files/clamsmtpd.init | 16 + mail/dovecot/Makefile | 149 + mail/dovecot/files/dovecot.init | 16 + mail/dovecot/patches/001-configure_in.patch | 31 + mail/emailrelay/Makefile | 119 + mail/emailrelay/files/emailrelay.auth | 16 + mail/emailrelay/files/emailrelay.config | 28 + mail/emailrelay/files/emailrelay.init | 66 + mail/emailrelay/patches/010-ssl3-fix.patch | 13 + mail/fdm/Config.in | 10 + mail/fdm/Makefile | 89 + mail/fdm/files/etc/fdm.conf | 36 + .../010-Compat-fixes-from-Rosen-Penev.patch | 388 + .../020-Fix-compile-with-OpenSSL-1.1.0.patch | 32 + mail/fdm/patches/040-openssl-1.1.patch | 31 + mail/greyfix/Makefile | 46 + .../100-ignore_cross_compile_test.patch | 40 + mail/mailman/Makefile | 126 + mail/mailman/files/mailman.init | 22 + mail/mailman/patches/100-postfix.patch | 12 + .../mailman/patches/200-nohostdnspython.patch | 68 + mail/mailman/patches/300-targetpython.patch | 12 + mail/mailman/patches/400-modules.patch | 35 + mail/mailsend/Makefile | 73 + mail/msmtp-scripts/Makefile | 141 + mail/msmtp-scripts/files/msmtpq-ng-mta.init | 17 + mail/msmtp-scripts/files/msmtpq-ng.rc | 18 + mail/msmtp/Makefile | 147 + mail/mutt/Makefile | 56 + mail/mutt/patches/0001-no-po.patch | 26 + mail/nail/Makefile | 59 + ...0-handle-openssl-without-sslv2-sslv3.patch | 22 + mail/opendkim/Makefile | 105 + mail/opendkim/files/opendkim-genkey | 11 + mail/opendkim/files/opendkim.conf.simple | 45 + mail/opendkim/files/opendkim.init | 15 + mail/pigeonhole/Makefile | 58 + mail/postfix/Makefile | 265 + mail/postfix/files/postfix.init | 62 + mail/postfix/patches/100-fsstat.patch | 12 + mail/postfix/patches/200-manpages.patch | 80 + .../patches/300-bdb_hash_segfault.patch | 13 + mail/postfix/patches/400-cdb.patch | 14 + mail/postfix/patches/500-crosscompile.patch | 27 + mail/postfix/patches/501-include_stdio.patch | 10 + mail/postfix/patches/600-nopostconf.patch | 44 + mail/postfix/patches/700-defaultconfig.patch | 93 + mail/postfix/patches/800-fmt.patch | 12 + .../patches/900_less_overlayfs_rewrites.patch | 24 + mail/sendmail/Makefile | 135 + mail/sendmail/files/OpenWrt | 61 + mail/sendmail/files/lm_getver.c | 9 + mail/sendmail/files/sharedlibrary.m4 | 25 + mail/sendmail/files/site.OpenWrt.m4 | 5 + .../patches/010-enable-nonroot-install.patch | 17 + .../patches/011-libmilter-so-version.patch | 16 + .../patches/100-misc-os-musl-fixes.patch | 49 + .../patches/101-fix-format-security.patch | 109 + .../patches/102-pthreads-stack-size.patch | 48 + .../patches/103-create-install-dirs.patch | 42 + mail/ssmtp/Makefile | 59 + mail/ssmtp/patches/002-fix_pointer.patch | 466 + .../patches/004-remove_dead-letter.patch | 94 + mail/ssmtp/patches/006-add_ip-header.patch | 21 + mail/ssmtp/patches/008-remove_garbage.patch | 18 + .../patches/010-fix_message-header.patch | 92 + multimedia/crtmpserver/Makefile | 99 + multimedia/crtmpserver/files/crtmpserver.init | 30 + .../patches/010-link-crypt-for-lua.patch | 11 + .../crtmpserver/patches/020-add-rpath.patch | 13 + .../patches/030-default-config.patch | 51 + .../crtmpserver/patches/040-use-select.patch | 11 + .../050-add-missing-make-defines.patch | 41 + .../patches/060-add-missing-includes.patch | 26 + .../patches/070-missing-include-gcc-47.patch | 10 + .../patches/080-disable-apple-streaming.patch | 12 + .../patches/080-musl-uint32_t.patch | 91 + multimedia/ffmpeg/Config.in | 485 + multimedia/ffmpeg/Makefile | 742 + multimedia/fswebcam/Makefile | 50 + multimedia/gphoto2/Makefile | 57 + .../gphoto2/patches/001-automake-compat.patch | 46 + .../gphoto2/patches/002-no-docs-test.patch | 44 + multimedia/grilo-plugins/Makefile | 89 + ...ilo-plugins-0.3.5-no-itstool-xmllint.patch | 122 + multimedia/grilo/Makefile | 75 + multimedia/grilo/files/grilo-0.3.vapi | 1033 + multimedia/grilo/files/grilo-net-0.3.vapi | 43 + multimedia/gst1-libav/Config.in | 272 + multimedia/gst1-libav/Makefile | 199 + multimedia/gst1-plugins-bad/Makefile | 275 + .../patches/001-no-translations.patch | 28 + .../patches/002-no-tests.patch | 59 + multimedia/gst1-plugins-base/Makefile | 290 + .../patches/001-no-translations.patch | 30 + .../patches/002-no-tests.patch | 47 + .../patches/003-no-docs.patch | 31 + multimedia/gst1-plugins-good/Makefile | 235 + .../patches/001-no-translations.patch | 22 + .../patches/002-no-tests.patch | 35 + .../patches/003-no-docs.patch | 24 + multimedia/gst1-plugins-ugly/Makefile | 176 + .../patches/001-no-translations.patch | 23 + .../patches/002-no-tests.patch | 25 + .../patches/003-no-docs.patch | 25 + multimedia/gstreamer1/Makefile | 234 + .../patches/001-no-translations.patch | 30 + .../gstreamer1/patches/002-no-tests.patch | 45 + .../gstreamer1/patches/003-no-docs.patch | 35 + ...10-gstplugin-use-lazy-symbol-binding.patch | 20 + multimedia/icecast/Makefile | 79 + multimedia/icecast/files/icecast.init | 23 + .../patches/001-icecast-2.4.0-tremor.patch | 156 + .../patches/005-no_examples_doc_win32.patch | 20 + .../patches/010-fix_libcurl_test_crap.patch | 11 + .../patches/015-add_with-openssl_option.patch | 25 + .../020-icecast_config_for_openwrt.patch | 25 + multimedia/ices/Makefile | 51 + multimedia/lcdgrilo/Makefile | 50 + multimedia/lcdgrilo/files/lcdgrilo.init | 16 + multimedia/minidlna/Makefile | 83 + multimedia/minidlna/files/minidlna.config | 18 + multimedia/minidlna/files/minidlna.init | 99 + .../patches/002-dont-build-po-files.patch | 25 + multimedia/mjpg-streamer/Config.in | 36 + multimedia/mjpg-streamer/Makefile | 116 + .../mjpg-streamer/files/mjpg-streamer.config | 15 + .../mjpg-streamer/files/mjpg-streamer.hotplug | 10 + .../mjpg-streamer/files/mjpg-streamer.init | 98 + .../patches/005-musl_compatibility.patch | 13 + .../010-enable_additional_plugins.patch | 17 + .../020-remove_gcc_debug_options.patch | 33 + .../030-allow_16_char_device_names.patch | 11 + .../patches/035-remove_build_date-time.patch | 34 + ...used-variable-from-struct-v4l2_buffe.patch | 87 + ...-leaking-data-via-struct-v4l2_buffer.patch | 242 + .../patches/050-fix-yuv-capture.patch | 58 + .../patches/060-fix-sigtrap-in-v4l2uvc.patch | 11 + multimedia/motion/Makefile | 59 + .../motion/patches/100-musl-compat.patch | 49 + multimedia/oggfwd/Makefile | 51 + multimedia/tvheadend/Config.in | 17 + multimedia/tvheadend/Makefile | 101 + multimedia/tvheadend/files/tvheadend.config | 13 + multimedia/tvheadend/files/tvheadend.init | 71 + multimedia/v4l2rtspserver/Makefile | 85 + .../v4l2rtspserver/files/config.openwrt | 19 + .../files/v4l2rtspserver.config | 10 + .../v4l2rtspserver/files/v4l2rtspserver.init | 83 + multimedia/xupnpd/Makefile | 76 + multimedia/xupnpd/files/xupnpd.init | 15 + .../xupnpd/patches/100-default_config.patch | 15 + .../xupnpd/patches/101-root_dir_param.patch | 83 + multimedia/youtube-dl/Makefile | 53 + net/acme/Makefile | 113 + net/acme/files/acme-cbi.lua | 86 + net/acme/files/acme-controller.lua | 7 + net/acme/files/acme.config | 12 + net/acme/files/acme.init | 35 + net/acme/files/run.sh | 254 + net/acme/files/uci-defaults-acme | 11 + net/adblock/Makefile | 62 + net/adblock/files/README.md | 312 + net/adblock/files/adblock.blacklist | 0 net/adblock/files/adblock.conf | 212 + net/adblock/files/adblock.init | 112 + net/adblock/files/adblock.notify | 69 + net/adblock/files/adblock.sh | 1068 + net/adblock/files/adblock.whitelist | 0 net/addrwatch/Makefile | 52 + net/addrwatch/files/addrwatch.config | 12 + net/addrwatch/files/addrwatch.init | 73 + .../patches/001-fix-sys_siglist.patch | 32 + .../patches/002-fix-uclibc-sysconf.patch | 11 + net/aggregate/Makefile | 47 + net/aircrack-ng/Makefile | 76 + net/announce/Makefile | 56 + net/apache/Config.in | 11 + net/apache/Makefile | 189 + net/apache/patches/001-Makefile_in.patch | 14 + net/apache/patches/002-test_char_h.patch | 49 + net/apache/patches/003-logdir_fix.patch | 37 + net/apache/patches/004-pidfile_fix.patch | 13 + net/apache/patches/005-httpd_conf.patch | 63 + .../patches/010-reproducible-builds.patch | 44 + net/apcupsd/Makefile | 106 + net/apcupsd/files/apccontrol | 146 + net/apcupsd/files/apcupsd.conf | 322 + net/apcupsd/files/apcupsd.css | 64 + net/apcupsd/files/apcupsd.init | 12 + net/apcupsd/files/apcupsd_mail.conf | 7 + net/apcupsd/files/changeme | 17 + net/apcupsd/files/commfailure | 17 + net/apcupsd/files/commok | 17 + net/apcupsd/files/hosts.conf | 19 + net/apcupsd/files/multimon.conf | 63 + net/apcupsd/files/offbattery | 17 + net/apcupsd/files/onbattery | 17 + net/apcupsd/patches/010-fix-usb.patch | 8 + net/apinger/Makefile | 68 + net/apinger/files/apinger.init | 18 + net/apinger/patches/001-autoreconf.patch | 13 + net/apinger/patches/002-run_as_user.patch | 11 + net/apinger/patches/003-no_docs.patch | 11 + net/aria2/Config.in | 83 + net/aria2/Makefile | 94 + net/aria2/files/aria2.conf | 31 + net/aria2/files/aria2.init | 348 + net/ariang/Makefile | 48 + net/arp-scan/Makefile | 48 + net/arp-scan/patches/001-cross_compile.patch | 10 + net/atftp/Makefile | 55 + .../01-missing-u_char-type-patch.patch | 13 + ...ix-invalid-read-in-tftp_send_request.patch | 13 + ...ix-undefined-reference-linker-errors.patch | 55 + net/autossh/Makefile | 52 + net/autossh/files/autossh.config | 6 + net/autossh/files/autossh.hotplug | 14 + net/autossh/files/autossh.init | 33 + net/bcp38/Makefile | 68 + net/bcp38/files/bcp38.config | 26 + net/bcp38/files/bcp38.defaults | 13 + net/bcp38/files/bcp38.init | 11 + net/bcp38/files/run.sh | 104 + net/beanstalkd/Makefile | 50 + net/beanstalkd/files/beanstalkd.init | 14 + net/beanstalkd/patches/900-makefile.patch | 116 + net/beanstalkd/patches/901-fix-headers.patch | 11 + .../patches/902-replace-posix_fallocate.patch | 18 + net/bind/Config.in | 37 + net/bind/Makefile | 252 + net/bind/files/bind/db.0 | 12 + net/bind/files/bind/db.127 | 13 + net/bind/files/bind/db.255 | 12 + net/bind/files/bind/db.local | 13 + net/bind/files/bind/db.root | 90 + net/bind/files/bind/named.conf.example | 45 + net/bind/files/named.init | 35 + net/bind/patches/001-no-tests.patch | 26 + net/bind/patches/002-autoconf-ar-fix.patch | 31 + net/bitlbee/Makefile | 68 + net/bmon/Makefile | 52 + net/bridge-utils/Makefile | 58 + .../patches/001-libbridge_cflags.patch | 11 + .../010-fix_struct_in6_addr_usage.patch | 10 + .../patches/100-musl-compat.patch | 11 + net/bwm-ng/Config.in | 35 + net/bwm-ng/Makefile | 61 + ...-Use-static-inline-instead-of-inline.patch | 286 + net/cgi-io/Makefile | 44 + net/cgi-io/src/CMakeLists.txt | 22 + net/cgi-io/src/main.c | 664 + net/cgi-io/src/multipart_parser.c | 309 + net/cgi-io/src/multipart_parser.h | 48 + net/chaosvpn/Makefile | 57 + net/chaosvpn/files/chaosvpn.hotplug | 3 + net/chaosvpn/files/chaosvpn.init | 31 + net/chrony/Makefile | 76 + net/chrony/files/chrony.conf | 10 + net/chrony/files/chrony.config | 14 + net/chrony/files/chrony.hotplug | 44 + net/chrony/files/chronyd.init | 76 + net/chrony/patches/001-freebind_uclibc.patch | 13 + net/cifs-utils/Makefile | 53 + net/cifs-utils/patches/010-no-libtalloc.patch | 13 + net/clamav/Makefile | 125 + net/clamav/files/bytecode.cvd | Bin 0 -> 68662 bytes net/clamav/files/clamav.config | 35 + net/clamav/files/clamav.init | 119 + net/clamav/files/freshclam.config | 8 + net/clamav/files/freshclam.init | 66 + net/clamav/patches/001-compile.patch | 10 + net/conserver/Makefile | 75 + net/conserver/files/conserver.cf | 13 + net/conserver/files/conserver.init | 14 + net/conserver/files/console.cf | 4 + net/conserver/patches/001-remove-strip.patch | 48 + net/coova-chilli/Config.in | 49 + net/coova-chilli/Makefile | 148 + net/coova-chilli/files/chilli.config | 233 + net/coova-chilli/files/chilli.firewall | 41 + net/coova-chilli/files/chilli.hotplug | 7 + net/coova-chilli/files/chilli.init | 83 + .../100-fix-sysinfo-redeclaration.patch | 24 + .../patches/200-fix_compile_kmod.patch | 17 + .../201-fix_dereferencing_pointers.patch | 49 + .../patches/300-fix-compile-with-cyassl.patch | 28 + .../patches/400-fix-compile-with-musl.patch | 61 + ...1-fix-compile-misleading-indentation.patch | 31 + net/cshark/Makefile | 62 + net/daemonlogger/Makefile | 47 + net/danish/Makefile | 55 + net/darkstat/Makefile | 66 + net/darkstat/files/darkstat.config | 20 + net/darkstat/files/darkstat.init | 97 + .../patches/100-do-not-use-NI_IDN.patch | 12 + net/davfs2/Makefile | 72 + net/davfs2/files/davfs2.conf | 9 + net/davfs2/patches/010-main_code_fix.patch | 22 + net/davfs2/patches/100-musl-compat.patch | 194 + ...vfs2-1.5.4-no-forced-stack-protector.patch | 12 + net/davfs2/patches/300-have_iconv_h.patch | 40 + net/ddns-scripts/Makefile | 446 + net/ddns-scripts/files/ddns.config | 32 + net/ddns-scripts/files/ddns.defaults | 201 + net/ddns-scripts/files/ddns.hotplug | 11 + net/ddns-scripts/files/ddns.init | 27 + .../files/dynamic_dns_functions.sh | 1373 ++ .../files/dynamic_dns_lucihelper.sh | 172 + net/ddns-scripts/files/dynamic_dns_updater.sh | 420 + net/ddns-scripts/files/services | 180 + net/ddns-scripts/files/services_ipv6 | 103 + .../files/update_cloudflare_com_v4.sh | 193 + .../files/update_freedns_42_pl.sh | 17 + .../files/update_godaddy_com_v1.sh | 172 + net/ddns-scripts/files/update_no-ip_com.sh | 52 + net/ddns-scripts/files/update_nsupdate.sh | 48 + net/ddns-scripts/files/update_route53_v1.sh | 97 + net/ddns-scripts/samples/ddns.config_sample | 314 + net/ddns-scripts/samples/getlocalip_sample.sh | 35 + net/ddns-scripts/samples/update_sample.sh | 41 + net/dhcp-forwarder/Makefile | 74 + net/dhcp-forwarder/files/dhcp-fwd.init | 25 + net/dhcpcd/Makefile | 66 + net/dhcpcd/files/dhcpcd.init | 24 + net/dmapd/Makefile | 66 + net/dmapd/files/dmapd.init | 28 + net/dmapd/patches/001-dmapd_conf.patch | 11 + .../002-make_unit_test_optionnal.patch | 17 + net/dnscrypt-proxy/Config.in | 8 + net/dnscrypt-proxy/Makefile | 131 + .../files/dnscrypt-proxy.config | 35 + net/dnscrypt-proxy/files/dnscrypt-proxy.init | 166 + .../files/dnscrypt-resolvers.csv | 107 + net/dynapoint/Makefile | 47 + net/dynapoint/src/dynapoint.config | 9 + net/dynapoint/src/dynapoint.init | 15 + net/dynapoint/src/dynapoint.lua | 211 + net/e2guardian/Makefile | 83 + net/e2guardian/files/e2guardian.config | 69 + net/e2guardian/files/e2guardian.init | 212 + net/e2guardian/files/e2guardianf1.conf | 430 + net/esniper/Makefile | 42 + net/etherwake/Makefile | 55 + net/etherwake/files/etherwake.config | 28 + net/etherwake/files/etherwake.init | 132 + .../patches/100-no_ether_hostton.patch | 37 + .../patches/110-format_security_fix.patch | 19 + net/etherwake/patches/120-musl-compat.patch | 17 + net/fakeidentd/Makefile | 48 + net/fakeidentd/files/fakeidentd.init | 12 + net/fastd/Config.in | 114 + net/fastd/Makefile | 205 + net/fastd/files/fastd.upgrade | 1 + net/foolsm/Makefile | 55 + net/foolsm/files/connections.conf | 13 + net/foolsm/files/foolsm.conf | 43 + net/foolsm/files/foolsm.init | 19 + net/foolsm/files/foolsm_script | 57 + .../patches/100-plugin-export-dir.patch | 11 + net/foolsm/patches/110-missing-WAIT_ANY.patch | 11 + net/fossil/Makefile | 72 + net/fossil/files/fossil.config | 5 + net/fossil/files/fossil.init | 54 + net/fossil/patches/001-no_https.patch | 22 + net/fping/Makefile | 54 + net/freeradius3/Config.in | 14 + net/freeradius3/Makefile | 614 + net/freeradius3/files/radiusd.init | 28 + .../patches/001-fix-cert-expiry.patch | 33 + ...-disable-session-cache-CVE-2017-9148.patch | 47 + net/fwknop/Config.in | 16 + net/fwknop/Makefile | 134 + net/fwknop/files/fwknopd | 12 + net/fwknop/files/fwknopd.init | 163 + net/git/Makefile | 151 + .../100-configure_for_crosscompiling.patch | 32 + .../patches/200-imapsend_without_curl.patch | 11 + net/gitolite/Makefile | 62 + .../patches/100-fix-missing-hooks-dir.patch | 27 + net/gnunet/Makefile | 429 + .../files/gnunet-dhtcache-heap.defaults | 8 + .../files/gnunet-dhtcache-pgsql.defaults | 8 + .../files/gnunet-dhtcache-sqlite.defaults | 11 + net/gnunet/files/gnunet-fs-heap.defaults | 8 + net/gnunet/files/gnunet-fs-pgsql.defaults | 8 + net/gnunet/files/gnunet-fs-sqlite.defaults | 11 + net/gnunet/files/gnunet-gns-flat.defaults | 16 + net/gnunet/files/gnunet-gns-pgsql.defaults | 10 + net/gnunet/files/gnunet-gns-sqlite.defaults | 16 + net/gnunet/files/gnunet-gns.defaults | 51 + .../files/gnunet-peerstore-flat.defaults | 11 + .../files/gnunet-peerstore-sqlite.defaults | 11 + net/gnunet/files/gnunet-pgsql.defaults | 9 + net/gnunet/files/gnunet-proto.sh | 51 + net/gnunet/files/gnunet-social-pgsql.defaults | 8 + .../files/gnunet-social-sqlite.defaults | 11 + net/gnunet/files/gnunet-vpn.defaults | 34 + net/gnunet/files/gnunet.defaults | 14 + net/gnunet/files/gnunet.init | 129 + net/gnunet/files/gnunet.upgrade | 1 + net/gnurl/Makefile | 120 + net/haproxy/Makefile | 206 + net/haproxy/files/haproxy.cfg | 100 + net/haproxy/files/haproxy.hotplug | 8 + net/haproxy/files/haproxy.init | 25 + ...t-SSL_ERROR_SYSCALL-as-unrecovarable.patch | 61 + ...ion-for-reading-on-SSL_ERROR_SYSCALL.patch | 63 + ...n-tunnel-mode-as-earlier-as-possible.patch | 69 + ...le-ssl_bc_-fetch-keywords-are-broken.patch | 103 + net/horst/Makefile | 57 + net/horst/horst.config | 4 + net/horst/horst.init | 22 + .../patches/0001-reproducible-builds.patch | 26 + net/htpdate/Makefile | 61 + net/htpdate/files/htpdate.conf | 11 + net/htpdate/files/htpdate.init | 54 + net/htpdate/patches/100-adjtimex.patch | 20 + .../101-daemon-run-in-foreground.patch | 40 + net/httping/Makefile | 90 + net/httping/patches/001-no_strip.patch | 12 + .../patches/002-fix_compile_warnings.patch | 10 + .../patches/003-fix_response_time.patch | 17 + net/httping/patches/004-minimize.patch | 375 + net/https-dns-proxy/Makefile | 33 + .../files/https_dns_proxy.config | 8 + .../files/https_dns_proxy.init | 48 + net/i2pd/Makefile | 71 + net/i2pd/files/i2pd.init | 39 + net/ibrdtn-tools/Makefile | 51 + net/ibrdtnd/Makefile | 62 + net/ibrdtnd/files/build-config.sh | 173 + net/ibrdtnd/files/ibrdtn.init | 71 + net/ibrdtnd/files/ibrdtn.uci | 176 + net/ibrdtnd/files/mkcontainer.sh | 43 + net/ibrdtnd/files/mountcontainer.sh | 122 + net/ibrdtnd/files/safety-wrapper.sh | 172 + net/ibrdtnd/files/systemcheck.sh | 101 + net/ifstat/Makefile | 44 + net/inadyn/Makefile | 50 + net/iodine/Makefile | 73 + net/iodine/files/iodined.config | 5 + net/iodine/files/iodined.init | 27 + net/iodine/patches/010-cross-compile.patch | 24 + .../patches/100-musl-compatibility.patch | 26 + ...musl-workaround-incomplete-nameser-h.patch | 27 + net/iotivity/Makefile | 313 + net/iotivity/files/etc/iotivity/ReadMe.txt | 2 + .../files/etc/iotivity/oic_svr_db.cbor | Bin 0 -> 1234 bytes .../files/etc/iotivity/oic_svr_db.json | 101 + net/iotivity/patches/001-no_unit_test.patch | 141 + .../patches/002-do-not-chck-for-boost.patch | 29 + .../020-linux-Add-more-architectures.patch | 44 + ...ld-do-not-set-TARGET_ARCH-to-default.patch | 39 + ...ompiler-options-to-supported-archite.patch | 57 + ...ke-compiler-options-from-environment.patch | 126 + .../patches/030-remove-check-for-curl.patch | 55 + .../040-linux-Use-system-sqlite3.patch | 27 + ...tyHandlerResponse-from-stack-to-heap.patch | 54 + ...-OCClientResponse-from-stack-to-heap.patch | 357 + ...-OCClientResponse-from-stack-to-heap.patch | 103 + ...ompilation-against-non-debug-mbedtls.patch | 27 + ..._version_get_string-only-if-availabl.patch | 35 + ..._ssl_conf_renegotiation-only-if-avai.patch | 30 + ...-of-patched-mbed-functions-condition.patch | 44 + .../patches/078-use-system-mbedtls.patch | 22 + ...pper-do-not-check-for-floating-point.patch | 31 + net/iotivity/patches/140-remove-glib2.patch | 32 + ...le-try-to-load-security-configuratio.patch | 44 + net/ipsec-tools/Makefile | 103 + net/ipsec-tools/files/functions.sh | 172 + net/ipsec-tools/files/p1client-down | 41 + net/ipsec-tools/files/p1client-up | 41 + net/ipsec-tools/files/racoon | 113 + net/ipsec-tools/files/racoon.init | 479 + net/ipsec-tools/files/vpnctl | 19 + .../patches/001-ipsec-tools-def-psk.patch | 24 + net/ipsec-tools/patches/001-no_libfl.patch | 22 + net/ipsec-tools/patches/002-patch8-utmp.patch | 72 + .../patches/003-microsoft-fqdn-in-main.patch | 13 + net/ipsec-tools/patches/005-isakmp-fix.patch | 11 + .../patches/006-linux-3.7-compat.patch | 50 + .../patches/007-force_have_policy_fwd.patch | 12 + .../008-racoon-fix_dereference_crash.patch | 16 + net/ipsec-tools/patches/009-musl-compat.patch | 187 + .../patches/010-CVE-2016-10396.patch | 201 + net/iptraf-ng/Makefile | 64 + net/irssi/Makefile | 60 + net/isc-dhcp/Makefile | 252 + net/isc-dhcp/files/dhclient-script | 281 + net/isc-dhcp/files/dhclient.init | 30 + net/isc-dhcp/files/dhclient6.conf | 2 + net/isc-dhcp/files/dhclient6.init | 30 + net/isc-dhcp/files/dhcpd.defaults | 11 + net/isc-dhcp/files/dhcpd.init | 314 + net/isc-dhcp/files/dhcpd6.conf | 30 + net/isc-dhcp/files/dhcpd6.init | 33 + net/isc-dhcp/files/dhcrelay.conf | 29 + net/isc-dhcp/files/dhcrelay4.init | 65 + net/isc-dhcp/files/dhcrelay6.init | 42 + net/isc-dhcp/patches/000-compile.patch | 9 + net/isc-dhcp/patches/510-bind-CC.patch | 16 + net/jool/Makefile | 115 + net/kadnode/Config.in | 44 + net/kadnode/Makefile | 97 + net/kadnode/files/kadnode.config | 58 + net/kadnode/files/kadnode.init | 96 + net/kadnode/files/kadnode.postinst | 6 + net/kadnode/patches/0001-LFLAGS-LDFLAGS.patch | 67 + net/keepalived/Makefile | 79 + net/keepalived/files/hotplug-user | 7 + net/keepalived/files/keepalived.config | 147 + net/keepalived/files/keepalived.init | 429 + net/keepalived/files/keepalived.user | 14 + net/kismet/Makefile | 140 + net/kismet/files/kismet.conf | 304 + net/kismet/files/kismet_drone.conf | 69 + net/kismet/files/kismet_drone.config | 2 + net/kismet/files/kismet_drone.init | 26 + net/kismet/files/kismet_server.config | 2 + net/kismet/files/kismet_server.init | 26 + .../010-dont-add-host-include-paths.patch | 12 + .../patches/020-musl-include-fixes.patch | 32 + net/knot/Makefile | 275 + net/knot/files/knotd.init | 39 + net/knot/files/runtests.sh | 8 + net/knot/patches/01_zscanner_tests.patch | 25 + net/knot/patches/02_knot.conf.patch | 24 + net/knxd/Makefile | 80 + net/knxd/files/knxd.config | 43 + net/knxd/files/knxd.ini | 17 + net/knxd/files/knxd.init | 79 + net/knxd/patches/0099-openwrt.patch | 8 + net/kplex/Makefile | 51 + net/kplex/files/kplex.init | 19 + net/krb5/Makefile | 141 + net/krb5/files/krb5kdc | 19 + ...001-fix-uninitialized-warning-errors.patch | 55 + net/lcdringer/Makefile | 54 + net/lcdringer/files/lcdringer.init | 16 + net/lftp/Makefile | 63 + net/lighttpd/Makefile | 240 + net/lighttpd/files/lighttpd.conf | 29 + net/lighttpd/files/lighttpd.init | 33 + ...decode-when-char-is-unsigned-fixes-2.patch | 43 + net/linknx/Makefile | 67 + net/linknx/files/linknx.config | 8 + net/linknx/files/linknx.init | 23 + net/linknx/files/linknx.xml.dist | 16 + net/linuxptp/Makefile | 55 + net/lispmob/Makefile | 57 + net/lispmob/patches/001-fix-musl-build.patch | 31 + net/lksctp-tools/Makefile | 92 + net/mac-telnet/Makefile | 72 + net/mac-telnet/files/mactelnet.config | 9 + net/mac-telnet/files/mactelnet.init | 80 + net/mdnsresponder/Makefile | 164 + net/mdnsresponder/files/mDNSResponder.conf | 4 + net/mdnsresponder/files/mDNSResponder.init | 14 + net/mdnsresponder/files/mdnsd.init | 14 + .../patches/001-cross_compile.patch | 115 + .../patches/100-linux_fixes.patch | 388 + .../patches/114-fix_posix_build.patch | 11 + .../patches/120-reproducible-builds.patch | 52 + net/memcached/Makefile | 72 + net/memcached/files/memcached.config | 6 + net/memcached/files/memcached.init | 27 + net/memcached/patches/100-fix_iov_max.patch | 25 + net/mii-tool/Makefile | 54 + .../001-mii-tool-4.9-compatibility.patch | 10 + net/mikrotik-btest/Makefile | 44 + net/mini_snmpd/Makefile | 67 + net/mini_snmpd/files/mini_snmpd.config | 26 + net/mini_snmpd/files/mini_snmpd.init | 237 + net/miniupnpc/Makefile | 74 + .../patches/100-no_minixml_test.patch | 13 + .../patches/200-miniupnpc_desc.patch | 11 + net/miniupnpd/Makefile | 68 + net/miniupnpd/files/firewall.include | 69 + net/miniupnpd/files/miniupnpd.defaults | 13 + net/miniupnpd/files/miniupnpd.hotplug | 33 + net/miniupnpd/files/miniupnpd.init | 210 + net/miniupnpd/files/upnpd.config | 28 + .../patches/100-build-on-OpenWrt.patch | 58 + net/mosquitto/Config.in | 13 + net/mosquitto/Makefile | 231 + net/mosquitto/files/etc/config/mosquitto | 4 + net/mosquitto/files/etc/init.d/mosquitto | 253 + net/mtr/Makefile | 74 + net/mtr/patches/100-disabled-ipv6-fix.patch | 49 + net/mwan3/Makefile | 68 + net/mwan3/files/etc/config/mwan3 | 137 + net/mwan3/files/etc/hotplug.d/iface/14-mwan3 | 48 + net/mwan3/files/etc/hotplug.d/iface/15-mwan3 | 95 + .../files/etc/hotplug.d/iface/16-mwan3-user | 16 + net/mwan3/files/etc/init.d/mwan3 | 32 + net/mwan3/files/etc/mwan3.user | 16 + net/mwan3/files/lib/mwan3/common.sh | 6 + net/mwan3/files/lib/mwan3/mwan3.sh | 973 + net/mwan3/files/usr/libexec/rpcd/mwan3 | 140 + net/mwan3/files/usr/sbin/mwan3 | 225 + net/mwan3/files/usr/sbin/mwan3track | 247 + net/nbd/Makefile | 89 + net/nbd/files/nbd-client.conf | 9 + net/nbd/files/nbd-client.init | 69 + net/nbd/files/nbd-server.conf | 31 + net/nbd/files/nbd-server.init | 112 + .../100-make-gnutls-test-optional.patch | 15 + .../101-fix-build-without-gnutls.patch | 11 + net/ncp/Makefile | 49 + net/net-snmp/Makefile | 284 + net/net-snmp/files/snmpd.conf | 130 + net/net-snmp/files/snmpd.init | 344 + net/net-snmp/files/snmptrapd.init | 15 + net/net-snmp/patches/000-cross-compile.patch | 47 + .../patches/100-debian-statistics.patch | 22 + .../patches/110-debian-makefiles.patch | 43 + .../patches/120-debian-searchdirs.patch | 14 + .../patches/130-debian-extramibs.patch | 5183 +++++ net/net-snmp/patches/160-no_ldconfig.patch | 11 + net/net-snmp/patches/170-ldflags.patch | 11 + net/net-snmp/patches/750-ieee802dot11.patch | 6156 ++++++ net/net-snmp/patches/900-musl-compat.patch | 14 + net/netatalk/Makefile | 93 + net/netatalk/files/afpd.init | 23 + .../patches/001-automake-compat.patch | 9 + .../patches/002-ld_library_path.patch | 26 + net/netcat/Makefile | 65 + .../patches/001-netcat_flag_count.patch | 22 + net/netdiscover/Makefile | 38 + net/netopeer2/Config_keystored.in | 7 + net/netopeer2/Makefile | 131 + .../files/netopeer2-keystored-keygen.default | 22 + .../files/netopeer2-keystored.default | 16 + net/netopeer2/files/netopeer2-server.default | 45 + net/netopeer2/files/netopeer2-server.init | 47 + net/netopeer2/files/stock_config.xml | 17 + .../001-remove-sysrepoctl-commands-from-cmake | 40 + net/netopeer2/patches/002-fix-for-cmake-build | 58 + net/netperf/Makefile | 51 + net/netperf/files/netserver.init | 12 + net/nfs-kernel-server/Makefile | 159 + net/nfs-kernel-server/files/nfsd.exports | 1 + net/nfs-kernel-server/files/nfsd.init | 38 + .../patches/100-no_malloc_h.patch | 10 + .../patches/101-musl-getservbyport.patch | 16 + .../patches/102-limits.patch | 10 + net/nginx/Config.in | 205 + net/nginx/Makefile | 286 + net/nginx/files/nginx.init | 17 + .../100-no_by_lua_block.patch | 195 + net/nginx/patches/101-feature_test_fix.patch | 107 + net/nginx/patches/102-sizeof_test_fix.patch | 27 + net/nginx/patches/103-sys_nerr.patch | 12 + net/nginx/patches/200-config.patch | 18 + net/nginx/patches/300-max-processes.patch | 11 + net/ngircd/Makefile | 109 + net/ngircd/files/ngircd.init | 11 + net/nlbwmon/Makefile | 48 + net/nlbwmon/files/nlbwmon.config | 51 + net/nlbwmon/files/nlbwmon.init | 89 + net/nmap/Makefile | 145 + net/noddos/Makefile | 82 + net/nsd/Makefile | 135 + net/nsd/files/nsd.init | 16 + net/ntpclient/Makefile | 57 + net/ntpclient/files/ntpclient.config | 23 + net/ntpclient/files/ntpclient.hotplug | 78 + net/ntpclient/patches/100-daemon.patch | 22 + net/ntpd/Makefile | 157 + net/ntpd/README.md | 86 + net/ntpd/files/ntpd.hotplug | 10 + net/ntpd/files/ntpd.hotplug-helper | 15 + net/ntpd/files/ntpd.init | 87 + net/ntpd/files/ntpdate.init | 13 + net/ntripcaster/Makefile | 50 + net/ntripclient/Makefile | 49 + net/ntripclient/patches/100-musl-compat.patch | 10 + net/ntripserver/Makefile | 50 + net/nut/Config.in | 32 + net/nut/Makefile | 539 + net/nut/files/add_nut_httpd_conf | 6 + net/nut/files/nut-cgi.init | 44 + net/nut/files/nut-monitor.init | 181 + net/nut/files/nut-sched.default | 10 + net/nut/files/nut-sendmail-notify | 10 + net/nut/files/nut-sendmail-notify.default | 44 + net/nut/files/nut-server.init | 158 + net/nut/files/nut.service | 34 + net/nut/files/nut_cgi | 6 + net/nut/files/nut_monitor | 54 + net/nut/files/nut_server | 23 + ...Add-compatibility-with-openssl-1.1.0.patch | 73 + .../0002-Fix-check-for-empty-string.patch | 25 + net/obfsproxy/Makefile | 59 + net/obfsproxy/files/obfsproxy.conf | 57 + net/obfsproxy/files/obfsproxy.init | 158 + net/obfsproxy/patches/001-exclude-tests.patch | 13 + .../patches/002-fix-python-path.patch | 16 + .../003-remove-argparse-dependency-test.patch | 12 + .../patches/004-add-syslog-support.patch | 51 + net/ocserv/Config.in | 26 + net/ocserv/Makefile | 109 + net/ocserv/README | 198 + net/ocserv/files/config | 17 + net/ocserv/files/ocserv.conf.template | 415 + net/ocserv/files/ocserv.init | 217 + net/ocserv/files/ocserv.upgrade | 8 + net/ola/Makefile | 119 + net/ola/files/olad.init | 15 + ...iminate-protobuf-AddDescriptors-call.patch | 91 + ...emove-visibility-inlines-hidden-flag.patch | 13 + .../patches/050-always-force-gnu++11.patch | 21 + net/openconnect/Config.in | 21 + net/openconnect/Makefile | 81 + net/openconnect/README | 49 + net/openconnect/files/openconnect-wrapper | 13 + net/openconnect/files/openconnect.sh | 111 + net/openconnect/files/openconnect.upgrade | 9 + ...ompilation-with-libp11-version-0.4.7.patch | 50 + net/opennhrp/Makefile | 60 + net/opennhrp/files/opennhrp.init | 15 + net/opennhrp/patches/100-musl-compat.patch | 20 + net/openssh/Makefile | 293 + net/openssh/files/sftp-ssh.service | 9 + net/openssh/files/sshd.init | 46 + net/openssh/files/sshd.pam | 41 + net/openssh/files/sshd.pam-access | 4 + net/openssh/patches/100-dscp-qos.patch | 21 + net/opentracker/Makefile | 104 + net/opentracker/files/opentracker.init | 16 + net/opentracker/files/opentracker6.init | 16 + net/opentracker/patches/100-makefile.patch | 30 + net/openvswitch/Makefile | 304 + .../files/etc/init.d/openvswitch.init | 22 + .../patches/0001-musl-compatibility.patch | 39 + ...linux-Use-unsigned-int-for-ifi_flags.patch | 28 + ...-interface-flag-survive-internal-por.patch | 41 + ...host-target-python-for-cross-compile.patch | 59 + .../0103-ovs-ctl-fix-setting-hostname.patch | 33 + .../0104-ovs-lib-fix-install_dir.patch | 31 + net/p910nd/Makefile | 59 + net/p910nd/files/p910nd.config | 5 + net/p910nd/files/p910nd.init | 45 + net/pagekitec/Makefile | 104 + net/pagekitec/files/etc/config/pagekitec | 1 + net/pagekitec/files/etc/init.d/pagekitec | 36 + net/pen/Makefile | 58 + net/pingcheck/Makefile | 58 + net/pingcheck/pingcheck.init | 15 + net/pixiewps/Makefile | 49 + net/polipo/Makefile | 61 + net/polipo/files/polipo.config | 42 + net/polipo/files/polipo.init | 150 + net/port-mirroring/Makefile | 45 + net/portmap/Makefile | 53 + net/portmap/files/portmap.init | 13 + net/portmap/patches/101-no_pie.patch | 12 + net/pppossh/Makefile | 37 + net/pppossh/README.md | 68 + net/pppossh/files/pppossh.sh | 72 + net/pptpd/Makefile | 69 + net/pptpd/files/options.pptpd | 21 + net/pptpd/files/pptpd.conf | 4 + net/pptpd/files/pptpd.config | 8 + net/pptpd/files/pptpd.init | 72 + net/pptpd/patches/001-bad_pqueue_debug.patch | 18 + net/pptpd/patches/002-makefile_fix.patch | 11 + net/pptpd/patches/003-opt_flags.patch | 11 + net/pptpd/patches/100-musl-compat.patch | 38 + net/privoxy/Config.in | 115 + net/privoxy/Makefile | 163 + net/privoxy/files/privoxy.config | 44 + net/privoxy/files/privoxy.hotplug | 20 + net/privoxy/files/privoxy.init | 180 + net/privoxy/files/privoxy.upgrade | 4 + net/prosody/Makefile | 124 + net/prosody/files/prosody.cfg.lua | 170 + net/prosody/files/prosody.init | 46 + net/quassel-irssi/Makefile | 53 + .../patches/001-respect-cflags.patch | 22 + .../patches/002-use-cc-var.patch | 13 + .../003-use-pkgconfig-ldflags-quasselc.patch | 13 + net/radicale/Makefile | 146 + net/radicale/files/config.template | 30 + net/radicale/files/logging.template | 47 + net/radicale/files/radicale.config | 200 + net/radicale/files/radicale.hotplug | 18 + net/radicale/files/radicale.init | 236 + net/radicale/files/radicale.rights | 49 + net/radicale/files/radicale.upgrade | 4 + net/radicale/files/radicale.users | 6 + ...-Run-as-user-group-radicale-radicale.patch | 30 + net/radsecproxy/Makefile | 60 + net/radsecproxy/files/radsecproxy.conf | 43 + net/radsecproxy/files/radsecproxy.init | 142 + .../patches/100-missing-return.patch | 58 + .../patches/200-logdest-on-foreground.patch | 31 + net/reaver/Makefile | 58 + net/redsocks/Makefile | 59 + net/redsocks/files/redsocks.conf | 108 + net/redsocks/files/redsocks.init | 36 + .../0006-fix_default_config_location.patch | 17 + net/remserial/Makefile | 34 + net/rp-pppoe/Makefile | 146 + net/rp-pppoe/files/ppp/options | 10 + net/rp-pppoe/files/ppp/pap-secrets | 2 + net/rp-pppoe/files/ppp/pppoe-server-options | 9 + net/rp-pppoe/files/ppp_defs.h | 11 + net/rp-pppoe/files/pppoe-relay.default | 10 + net/rp-pppoe/files/pppoe-relay.init | 79 + net/rp-pppoe/files/pppoe-server.default | 10 + net/rp-pppoe/files/pppoe-server.init | 79 + net/rp-pppoe/files/pppoe.config | 23 + net/rp-pppoe/patches/100-configure.patch | 36 + net/rp-pppoe/patches/110-Makefile.patch | 11 + .../120-use-linux-ether-not-netinet.patch | 34 + net/rp-pppoe/patches/130-static-lib-fix.patch | 12 + net/rsync/Config.in | 27 + net/rsync/Makefile | 104 + net/rsync/files/rsyncd.conf | 16 + net/rsync/files/rsyncd.init | 14 + net/rsyslog/Makefile | 57 + net/rsyslog/files/rsyslog.conf | 18 + net/rsyslog/files/rsyslog.init | 12 + net/rtorrent/Makefile | 93 + .../patches/100-fix-cross_compile.patch | 30 + net/rtorrent/patches/120-fix-ncurses.patch | 11 + net/scapy/Makefile | 54 + net/seafile-ccnet/Makefile | 76 + net/seafile-ccnet/patches/010-Makefile.patch | 31 + net/seafile-seahub/Makefile | 61 + .../patches/010-default-config.patch | 30 + .../patches/020-Makefile-fixes.patch | 42 + net/seafile-server/Config.in | 16 + net/seafile-server/Makefile | 149 + net/seafile-server/files/seafile.conf | 12 + net/seafile-server/files/seafile.init | 157 + net/seafile-server/files/seahub.init | 226 + .../patches/020-script-patches.patch | 77 + .../030-pidfiles-in-same-directory.patch | 24 + .../patches/040-seafile-admin.patch | 61 + .../050-libseafile-makefile-fixes.patch | 43 + .../patches/060-timestamps-as-int64.patch | 39 + .../patches/070-fuse-mount.patch | 21 + net/ser2net/Makefile | 58 + net/ser2net/files/ser2net.conf | 70 + net/ser2net/files/ser2net.config | 67 + net/ser2net/files/ser2net.init | 186 + net/shadowsocks-client/Makefile | 40 + net/shadowsocks-client/files/sslocal.config | 7 + net/shadowsocks-client/files/sslocal.init | 52 + net/shadowsocks-libev/Makefile | 125 + net/shadowsocks-libev/README.md | 97 + net/shadowsocks-libev/files/firewall.ss-rules | 2 + .../files/shadowsocks-libev.config | 61 + .../files/shadowsocks-libev.init | 309 + net/shadowsocks-libev/files/ss-rules | 264 + net/shadowsocks-libev/files/ss-rules.defaults | 10 + net/shorewall-core/Makefile | 66 + .../patches/110-lib.common.patch | 22 + net/shorewall-lite/Makefile | 81 + net/shorewall-lite/files/hostname | 2 + net/shorewall-lite/files/hotplug_iface | 13 + net/shorewall-lite/files/shorewall-lite.init | 32 + net/shorewall-lite/files/vardir | 3 + .../patches/010-install_cp.patch | 13 + net/shorewall-lite/patches/020-set-PATH.patch | 11 + net/shorewall-lite/patches/120-logfile.patch | 13 + net/shorewall/Makefile | 82 + net/shorewall/files/hostname | 3 + net/shorewall/files/hotplug_iface | 13 + net/shorewall/files/shorewall.init | 32 + net/shorewall/files/vardir | 2 + net/shorewall/patches/120-logfile.patch | 20 + net/shorewall/patches/130-set-path.patch | 13 + net/shorewall6-lite/Makefile | 82 + net/shorewall6-lite/files/hostname | 2 + net/shorewall6-lite/files/hotplug_iface | 13 + .../files/shorewall6-lite.init | 32 + net/shorewall6-lite/files/vardir | 2 + .../patches/010-install_cp.patch | 13 + .../patches/020-set-PATH.patch | 11 + net/shorewall6-lite/patches/120-logfile.patch | 13 + net/shorewall6/Makefile | 81 + net/shorewall6/files/hostname | 3 + net/shorewall6/files/hotplug_iface | 13 + net/shorewall6/files/shorewall6.init | 32 + net/shorewall6/files/vardir | 2 + net/shorewall6/patches/120-logfile.patch | 22 + net/shorewall6/patches/130-set-path.patch | 13 + net/siit/Makefile | 42 + net/siit/src/Makefile | 5 + net/siit/src/siit.c | 1433 ++ net/siit/src/siit.h | 61 + net/simple-adblock/Makefile | 81 + net/simple-adblock/files/README.md | 130 + net/simple-adblock/files/simple-adblock.conf | 26 + .../files/simple-adblock.hotplug | 5 + net/simple-adblock/files/simple-adblock.init | 428 + net/smartsnmpd/Makefile | 76 + net/smartsnmpd/files/mibs/dummy.lua | 24 + net/smartsnmpd/files/mibs/interfaces.lua | 125 + net/smartsnmpd/files/mibs/system.lua | 176 + net/smartsnmpd/files/smartsnmpd.conf | 21 + net/smartsnmpd/files/smartsnmpd.init | 47 + net/snort/Config.in | 11 + net/snort/Makefile | 156 + net/snort/files/snort.config | 3 + net/snort/files/snort.init | 40 + net/snort/patches/001-compile.patch | 244 + net/socat/Makefile | 92 + net/socat/files/socat.config | 5 + net/socat/files/socat.init | 39 + net/socat/patches/100-musl-compat.patch | 23 + net/softethervpn/Makefile | 152 + net/softethervpn/files/dummy | 0 net/softethervpn/files/launcher.sh | 2 + net/softethervpn/files/vpnbridge.init | 12 + net/softethervpn/files/vpnclient.init | 12 + net/softethervpn/files/vpnserver.init | 12 + net/softethervpn/patches/103-noeucjp.patch | 29 + net/softethervpn/patches/105-nossl3.patch | 13 + net/softflowd/Makefile | 54 + net/softflowd/files/softflowd.config | 14 + net/softflowd/files/softflowd.init | 58 + net/spawn-fcgi/Makefile | 42 + net/sqm-scripts-extra/Makefile | 47 + .../test_LAN_dual-isolate__piece_of_cake.qos | 102 + ...t_LAN_dual-isolate__piece_of_cake.qos.help | 12 + ...test_LAN_triple-isolate__piece_of_cake.qos | 102 + ...LAN_triple-isolate__piece_of_cake.qos.help | 12 + .../test_WAN_dual-isolate__piece_of_cake.qos | 89 + ...t_WAN_dual-isolate__piece_of_cake.qos.help | 10 + ...test_WAN_triple-isolate__piece_of_cake.qos | 89 + ...WAN_triple-isolate__piece_of_cake.qos.help | 10 + .../src/test_triple_isolated_llt_cake.qos | 82 + .../test_triple_isolated_llt_cake.qos.help | 3 + net/sqm-scripts/Makefile | 88 + net/squid/Makefile | 136 + net/squid/files/squid.conf | 44 + net/squid/files/squid.config | 9 + net/squid/files/squid.init | 64 + net/squid/patches/001-cross_compile.patch | 40 + net/sshfs/Makefile | 62 + net/sshtunnel/Makefile | 45 + net/sshtunnel/files/sshtunnel.init | 213 + net/sshtunnel/files/uci_sshtunnel | 63 + net/sslh/Makefile | 50 + net/sslh/files/sslh.config | 32 + net/sslh/files/sslh.init | 65 + net/sslh/patches/001-no_sslh_select.patch | 31 + net/sslh/patches/002-configfile-fix.patch | 30 + net/sstp-client/Makefile | 61 + net/sstp-client/files/etc/ppp/chap-secrets | 4 + .../etc/ppp/peers/peer-sstp-example-nopty.txt | 14 + .../files/etc/ppp/peers/peer-sstp-example.txt | 15 + net/sstp-client/patches/100-musl-compat.patch | 33 + net/strongswan/Config.in | 16 + net/strongswan/Makefile | 673 + .../files/etc/hotplug.d/ipsec/01-user | 7 + net/strongswan/files/ipsec.init | 385 + net/strongswan/files/ipsec.secrets | 1 + net/strongswan/files/ipsec.user | 6 + net/strongswan/patches/101-musl-fixes.patch | 83 + net/strongswan/patches/201-kmodloader.patch | 28 + net/strongswan/patches/203-uci.patch | 20 + net/strongswan/patches/210-sleep.patch | 11 + .../patches/300-include-ipsec-hotplug.patch | 16 + .../patches/305-minimal_dh_plugin.patch | 221 + net/stubby/Makefile | 63 + net/stubby/files/README.md | 46 + net/stubby/files/stubby.init | 25 + net/stubby/files/stubby.yml | 39 + net/stunnel/Makefile | 85 + net/stunnel/files/stunnel.conf | 45 + net/stunnel/files/stunnel.init | 180 + net/stunnel/files/stunnel.uci | 10 + net/subversion/Makefile | 144 + net/subversion/files/subversion.config | 3 + net/subversion/files/subversion.init | 37 + .../patches/301-cross-compilation-macos.patch | 97 + net/sysrepo/Config_libsysrepo.in | 23 + net/sysrepo/Makefile | 181 + net/sysrepo/files/libsysrepo.default | 32 + net/sysrepo/files/sysrepo.init | 30 + ...obuf-remove-protoc-command-from-cmake-file | 14804 +++++++++++++ .../002-remove-buildtime-module-install | 26 + net/sysrepo/patches/003-missing-time-header | 12 + .../patches/004-disable-sysrepod-autostart | 19 + .../patches/005-fix-struct-ucred-define | 30 + net/tcpproxy/Makefile | 84 + net/tcpproxy/files/tcpproxy.config | 26 + net/tcpproxy/files/tcpproxy.init | 96 + .../patches/001-ragel_generated.patch | 1378 ++ ...move-build-timestamps-build-hostname.patch | 40 + net/tcpreplay/Makefile | 158 + net/tgt/Makefile | 65 + net/tgt/files/etc/config/tgt | 64 + net/tgt/files/etc/init.d/tgt | 237 + net/tgt/patches/020-usr_Makefile.patch | 51 + net/tgt/patches/030-Makefile.patch | 11 + net/tgt/patches/100-musl-compat.patch | 30 + net/tinc/Makefile | 60 + net/tinc/files/tinc.config | 56 + net/tinc/files/tinc.init | 239 + net/tinc/files/tinc.upgrade | 1 + net/tinyproxy/Makefile | 51 + net/tinyproxy/files/tinyproxy.config | 251 + net/tinyproxy/files/tinyproxy.init | 142 + .../patches/010-no-docs-and-tests.patch | 86 + .../patches/020-config_and_pid-path.patch | 13 + .../030-allow_bind_in_transparent_mode.patch | 22 + net/tinyproxy/patches/120-fix_INET6.patch | 38 + ...2-3505-tiniproxy-randomized-hashmaps.patch | 101 + ...VE-2012-3505-tinyproxy-limit-headers.patch | 44 + net/tor/Makefile | 145 + net/tor/files/tor.init | 26 + net/tor/patches/001-torrc.patch | 25 + net/transmission/Makefile | 183 + net/transmission/files/transmission.config | 77 + net/transmission/files/transmission.init | 137 + net/transmission/files/transmission.sysctl | 2 + .../patches/010-add-mbedtls-support.patch | 430 + .../patches/020-fix-external-miniupnpc.patch | 35 + .../patches/030-fix-port-test.patch | 30 + .../patches/040-https-portcheck.patch | 26 + net/transmission/patches/050-fix-safari.patch | 26 + net/travelmate/Makefile | 54 + net/travelmate/files/README.md | 139 + net/travelmate/files/travelmate.conf | 14 + net/travelmate/files/travelmate.init | 73 + net/travelmate/files/travelmate.sh | 428 + net/u2pnpd/Makefile | 63 + net/u2pnpd/files/u2pnpd.config | 11 + net/u2pnpd/files/u2pnpd.defaults | 10 + net/u2pnpd/files/u2pnpd.init | 62 + net/uanytun/Makefile | 175 + net/uanytun/files/uanytun-nocrypt.config | 88 + net/uanytun/files/uanytun.config | 116 + net/uanytun/files/uanytun.init | 104 + .../patches/100-reproducible-builds.patch | 12 + net/udpxy/Makefile | 65 + net/udpxy/files/udpxy.conf | 15 + net/udpxy/files/udpxy.init | 67 + net/ulogd/Makefile | 210 + net/ulogd/files/ulogd.init | 12 + net/ulogd/patches/100-musl-compat.patch | 57 + ...-ulogd-use-strncpy-instead-of-memcpy.patch | 31 + net/umurmur/Makefile | 101 + .../patches/010-mbedtls_fix_includes.patch | 11 + net/unbound/Makefile | 197 + net/unbound/files/README.md | 350 + net/unbound/files/defaults.sh | 43 + net/unbound/files/dnsmasq.sh | 181 + net/unbound/files/iptools.sh | 140 + net/unbound/files/odhcpd.awk | 209 + net/unbound/files/odhcpd.sh | 116 + net/unbound/files/root.key | 3 + net/unbound/files/rootzone.sh | 106 + net/unbound/files/unbound.init | 77 + net/unbound/files/unbound.ntpd | 27 + net/unbound/files/unbound.sh | 1265 ++ net/unbound/files/unbound.uci | 35 + net/unbound/files/unbound_ext.conf | 9 + net/unbound/files/unbound_srv.conf | 9 + net/unbound/patches/100-example-conf-in.patch | 86 + net/usbip/Makefile | 113 + net/vallumd/Makefile | 49 + net/vallumd/files/vallumd.conf | 6 + net/vallumd/files/vallumd.init | 34 + net/vncrepeater/Makefile | 70 + .../patches/001-uclibcxx_linking.patch | 39 + net/vncrepeater/patches/002-cfg-path.patch | 38 + net/vnstat/Makefile | 110 + net/vnstat/files/vnstat.config | 5 + net/vnstat/files/vnstat.defaults | 13 + net/vnstat/files/vnstat.init | 89 + .../990-adjust-configuration-defaults.patch | 28 + net/vpnbypass/Makefile | 98 + net/vpnbypass/files/README.md | 119 + net/vpnbypass/files/vpnbypass.conf | 5 + net/vpnbypass/files/vpnbypass.hotplug | 2 + net/vpnbypass/files/vpnbypass.init | 102 + net/vpnc-scripts/Makefile | 37 + net/vpnc-scripts/files/vpnc-script | 219 + net/vpnc/Config.in | 18 + net/vpnc/Makefile | 95 + net/vpnc/README | 41 + net/vpnc/files/vpnc.sh | 110 + net/vpnc/files/vpnc.upgrade | 2 + net/vpnc/patches/001-cross.patch | 42 + net/vpnc/patches/100-musl-compat.patch | 42 + net/vsftpd/Makefile | 98 + net/vsftpd/files/vsftpd.conf | 30 + net/vsftpd/files/vsftpd.init | 13 + net/vsftpd/patches/001-destdir.patch | 47 + net/vsftpd/patches/002-find_libs.patch | 13 + net/vsftpd/patches/003-chroot.patch | 11 + .../patches/004-disable-capabilities.patch | 12 + net/vsftpd/patches/005-disable-pam.patch | 11 + .../patches/006-musl-compatibility.patch | 13 + net/vsftpd/patches/007-CVE-2015-1419.patch | 98 + net/wakeonlan/Makefile | 50 + net/wavemon/Makefile | 60 + net/webui-aria2/Makefile | 56 + .../patches/001-simplify-flag-icon-css.patch | 9 + net/wget/Makefile | 100 + net/wifidog-ng/Makefile | 106 + net/wifidog-ng/files/wifidog-ng.config | 25 + net/wifidog-ng/files/wifidog-ng.crt | 24 + net/wifidog-ng/files/wifidog-ng.hotplug | 3 + net/wifidog-ng/files/wifidog-ng.init | 49 + net/wifidog-ng/files/wifidog-ng.key | 28 + net/wifidog/Makefile | 104 + net/wifidog/files/wifidog.init | 22 + net/wifischedule/LICENSE | 11 + net/wifischedule/Makefile | 58 + net/wifischedule/README.md | 86 + net/wifischedule/net/etc/config/wifi_schedule | 19 + net/wifischedule/net/usr/bin/wifi_schedule.sh | 321 + net/xinetd/Makefile | 67 + net/xinetd/files/xinetd.conf | 6 + net/xinetd/files/xinetd.init | 15 + net/xinetd/patches/001-ar.patch | 66 + net/xinetd/patches/002-destdir.patch | 27 + net/xinetd/patches/003-rpc_fix.patch | 19 + net/xinetd/patches/004-ident-bind.patch | 42 + net/xl2tpd/Makefile | 90 + net/xl2tpd/README.md | 45 + net/xl2tpd/files/l2tp.sh | 121 + net/xl2tpd/files/options.xl2tpd | 20 + net/xl2tpd/files/xl2tp-secrets | 5 + net/xl2tpd/files/xl2tpd.conf | 23 + net/xl2tpd/files/xl2tpd.conf.sample | 73 + net/xl2tpd/files/xl2tpd.init | 24 + net/xtables-addons/Makefile | 169 + .../002-fix-kernel-version-detection.patch | 11 + .../patches/100-add-rtsp-conntrack.patch | 1683 ++ .../patches/200-add-lua-packetscript.patch | 18158 ++++++++++++++++ .../patches/201-fix-lua-packetscript.patch | 127 + .../patches/300-geoip-endian-detection.patch | 18 + net/yaaw/Makefile | 50 + net/zerotier/Config.in | 14 + net/zerotier/Makefile | 76 + net/zerotier/files/zerotier.config | 14 + net/zerotier/files/zerotier.init | 96 + ...ind-miniupnpc.h-in-staging-directory.patch | 27 + net/zerotier/patches/0002-remove-pie.patch | 33 + .../patches/0003-remove-march-armv5.patch | 33 + .../0004-accept-external-linker-flags.patch | 25 + net/znc/Config.in | 18 + net/znc/Makefile | 313 + net/znc/files/znc.conf | 29 + net/znc/files/znc.init | 183 + .../100-move_rootcheck_after_config.patch | 52 + net/znc/patches/101-Reduce_rebuild_time.patch | 39 + .../104-disable-empty-modules-check.patch | 15 + net/znc/patches/110-add-playback-module.patch | 291 + sound/alsa-utils/Makefile | 94 + .../patches/100-uClibc-compat.patch | 23 + .../patches/101-disable-libsamplerate.patch | 45 + sound/espeak/Makefile | 57 + sound/espeak/patches/101-portaudio.patch | 2093 ++ sound/fdk-aac/Config.in | 12 + sound/fdk-aac/Makefile | 66 + sound/forked-daapd/Makefile | 76 + sound/forked-daapd/files/forked-daapd.conf | 187 + sound/forked-daapd/files/forked-daapd.init | 15 + ...10-use_a_wrapper_for_dmap_find_field.patch | 103 + sound/lame/Config.in | 12 + sound/lame/Makefile | 93 + sound/madplay/Makefile | 85 + .../patches/0001-switch-to-new-alsa-api.patch | 173 + .../patches/010-use_correct_shell.patch | 30 + sound/mocp/Makefile | 68 + sound/mpc/Makefile | 57 + sound/mpc/files/pls-handler.sh | 5 + sound/mpd/Makefile | 214 + sound/mpd/files/mpd.init | 30 + sound/mpd/files/mpd.service | 9 + .../patches/210-support_raw_pcm_streams.patch | 10 + ...20-handle_slow_server_stream_startup.patch | 16 + sound/mpg123/Makefile | 133 + sound/opus-tools/Makefile | 46 + sound/pianod/Makefile | 110 + sound/pianod/files/pianod.init | 42 + sound/portaudio/Makefile | 76 + sound/pulseaudio/Makefile | 274 + sound/pulseaudio/files/pulseaudio.init | 29 + .../patches/001-no_default_64mb_alloc.patch | 11 + sound/shairplay/Makefile | 51 + sound/shairplay/files/shairplay.config | 10 + sound/shairplay/files/shairplay.init | 51 + .../shairplay/patches/001-key_file_dir.patch | 11 + .../patches/002-libavahi-compat-dnssd.patch | 11 + .../patches/003-fix_big-endian.patch | 11 + sound/shairport-sync/Makefile | 125 + .../files/shairport-sync.config | 61 + .../shairport-sync/files/shairport-sync.init | 142 + sound/shine/Makefile | 64 + .../shine/patches/001-fix_mips64_bswap.patch | 11 + .../002-fix-name-collision-with-ffmpeg.patch | 64 + sound/sox/Makefile | 79 + sound/sox/patches/001-cross_compile.patch | 22 + .../patches/010-fix_uclibc_build_issue.patch | 19 + .../sox/patches/020-reproducible-builds.patch | 32 + sound/squeezelite/Makefile | 144 + sound/squeezelite/files/squeezelite.conf | 13 + sound/squeezelite/files/squeezelite.init | 142 + .../patches/005-respect_LDFLAGS.patch | 56 + .../010-select_broadcast_interface.patch | 356 + sound/squeezelite/patches/020-no_libmad.patch | 83 + .../patches/030-fix_musl_compatibilty.patch | 14 + .../patches/040-clear_dynlink_errors.patch | 105 + sound/svox/Makefile | 61 + ...nf-building-of-library-using-libtool.patch | 113 + .../0002-gitignore-for-autotools-files.patch | 51 + ...t-text-to-.wav-using-svox-text-to-sp.patch | 399 + .../svox/patches/0004-add-header-files.patch | 59 + .../patches/0005-Install-lang-files.patch | 32 + sound/svox/patches/0006-Set-picolangdir.patch | 40 + sound/svox/patches/0008-64bits.patch | 26 + sound/svox/patches/0009-Fix-link-order.patch | 21 + sound/svox/patches/0010-platform.patch | 30 + sound/svox/patches/0011-subdir.patch | 12 + sound/svox/patches/0012-no-headers.patch | 46 + sound/upmpdcli/Config.in | 17 + sound/upmpdcli/Makefile | 63 + sound/upmpdcli/files/upmpdcli.config | 15 + sound/upmpdcli/files/upmpdcli.init | 51 + sound/upmpdcli/files/upmpdcli.png | Bin 0 -> 1640 bytes .../patches/010-Add_icon_config.patch | 11 + utils/acl/Makefile | 89 + .../patches/100-no-gettext_configure.patch | 21 + .../acl/patches/101-no-gettext_autogen.patch | 9 + .../acl/patches/102-no-gettext_Makefile.patch | 13 + utils/acpica-unix/Makefile | 55 + utils/acpid/Makefile | 68 + utils/acpid/files/acpid.hotplug | 7 + utils/acpid/files/acpid.init | 25 + utils/acpid/files/default | 5 + .../acpid/patches/002-dont-use-isfdtype.patch | 21 + utils/ap51-flash/Makefile | 50 + utils/ap51-flash/files/ap51-flash.config | 6 + utils/ap51-flash/files/ap51-flash.init | 50 + utils/ap51-flash/files/ap51-flash.sh | 21 + utils/at/Makefile | 59 + utils/at/files/atd.init | 26 + .../patches/100-remove-glibc-assumption.patch | 59 + utils/at/patches/110-getloadavg.patch | 14 + utils/attendedsysupgrade-common/Makefile | 56 + .../files/attendedsysupgrade.defaults | 17 + utils/attr/Makefile | 94 + .../patches/100-no-gettext_configure.patch | 21 + .../attr/patches/101-no-gettext_autogen.patch | 9 + .../patches/102-no-gettext_Makefile.patch | 13 + utils/auc/Makefile | 38 + utils/auc/src/CMakeLists.txt | 12 + utils/auc/src/auc.c | 1172 + utils/avrdude/Makefile | 60 + .../patches/010-configure-fixups.patch | 18 + .../patches/020-no-cpp-timestamps.patch | 21 + utils/avrdude/patches/100-musl-compat.patch | 60 + utils/bandwidthd/Makefile | 227 + .../bandwidthd/files/bandwidthd-pgsql.config | 13 + utils/bandwidthd/files/bandwidthd-php.config | 7 + utils/bandwidthd/files/bandwidthd-php.init | 75 + .../bandwidthd/files/bandwidthd-sqlite.config | 13 + utils/bandwidthd/files/bandwidthd-sqlite.init | 133 + utils/bandwidthd/files/bandwidthd.config | 11 + utils/bandwidthd/files/bandwidthd.init | 106 + utils/bandwidthd/files/logo-openwrt.gif | Bin 0 -> 9431 bytes .../files/phphtdocs-sqlite/details.php | 104 + .../files/phphtdocs-sqlite/footer.php | 3 + .../files/phphtdocs-sqlite/graph.php | 455 + .../files/phphtdocs-sqlite/include.php | 69 + .../files/phphtdocs-sqlite/index.php | 190 + utils/bandwidthd/files/phphtdocs/details.php | 102 + utils/bandwidthd/files/phphtdocs/footer.php | 3 + utils/bandwidthd/files/phphtdocs/graph.php | 454 + utils/bandwidthd/files/phphtdocs/include.php | 54 + utils/bandwidthd/files/phphtdocs/index.php | 197 + ...010-dont-add-host-paths-in-config.in.patch | 24 + .../patches/020-change-p2p-to-smtp.patch | 20 + utils/banhosts/Makefile | 40 + utils/banhosts/files/updatebanhost | 19 + utils/bash/Makefile | 91 + utils/bash/patches/100-fix-jobs.patch | 31 + utils/bash/patches/900-no_doc.patch | 13 + utils/bc/Makefile | 65 + utils/bc/patches/001-disable-doc.patch | 21 + utils/beep/Makefile | 46 + utils/bluelog/Makefile | 108 + utils/bluelog/files/bluelog.init | 13 + .../100-gen-oui-fix-tempfile-use-mirror.patch | 31 + utils/bluez/Makefile | 162 + utils/bluez/files/bluetooth.config | 15 + utils/bluez/files/bluetoothd.init | 14 + utils/bluez/files/givepin | 14 + ...01-bcm43xx-Add-bcm43xx-3wire-variant.patch | 21 + ...-speed-must-be-reset-after-the-firmw.patch | 33 + ...ncrease-firmware-load-timeout-to-30s.patch | 20 + ...-the-43xx-firmware-into-lib-firmware.patch | 20 + utils/bluez/patches/201-readline.patch | 57 + utils/bluez/patches/202-fix-endianness.patch | 10 + .../patches/203-obexd_without_systemd.patch | 61 + utils/bmx7-dnsupdate/Makefile | 27 + .../files/etc/init.d/bmx7-dnsupdate | 14 + .../files/usr/bin/bmx7-dnsupdate | 29 + utils/bonnie++/Makefile | 53 + .../patches/001-cross_compile_fix.patch | 38 + .../002-add-verbose-error-messages.patch | 47 + utils/btrfs-progs/Makefile | 78 + utils/btrfs-progs/files/btrfs-scan.init | 9 + utils/canutils/Makefile | 76 + utils/ccid/Makefile | 52 + utils/ccrypt/Makefile | 42 + utils/ccrypt/patches/001-no-intl.patch | 89 + utils/cmdpad/Makefile | 61 + utils/cmdpad/files/cmdpad.init | 14 + utils/cmdpad/patches/100-Makefile.patch | 35 + .../cmdpad/patches/120-kernel26-compat.patch | 15 + utils/cmdpad/patches/130-no_zombie.patch | 18 + utils/cmdpad/patches/140-compile_fix.patch | 11 + utils/collectd/Makefile | 403 + utils/collectd/files/collectd.conf | 39 + utils/collectd/files/collectd.init | 15 + .../001-undefined-AM_PATH_LIBGCRYPT.patch | 4 + .../050-backport-modbus-little-endian.patch | 179 + .../100-rrdtool-add-rrasingle-option.patch | 55 + .../collectd/patches/140-fix-fqdnlookup.patch | 11 + .../patches/300-delay-first-read-cycle.patch | 11 + .../patches/400-fix-olsrd-get-all.patch | 11 + .../patches/600-fix-libmodbus-detection.patch | 43 + .../700-disable-sys-capability-check.patch | 15 + .../patches/900-add-iwinfo-plugin.patch | 279 + .../patches/920-fix-ping-droprate.patch | 11 + utils/coreutils/Makefile | 120 + .../patches/001-no_docs_man_tests.patch | 89 + .../patches/002-fix_compile_with_uclibc.patch | 12 + utils/crconf/Makefile | 43 + utils/crelay/Makefile | 75 + utils/crelay/files/crelay.init | 24 + .../crelay/patches/010-link_with_ftdi1.patch | 11 + utils/cryptodev-linux/Makefile | 74 + utils/cryptsetup/Makefile | 79 + utils/dbus/Makefile | 214 + utils/dbus/files/dbus-launch | 12 + utils/dbus/files/dbus.init | 17 + utils/dbus/patches/100-fix-poll-select.patch | 13 + utils/dfu-programmer/Makefile | 46 + utils/dfu-util/Makefile | 45 + utils/digitemp/Makefile | 89 + .../patches/0001_add_missing_includes.patch | 72 + utils/dmidecode/Makefile | 48 + utils/domoticz/Makefile | 136 + utils/domoticz/files/domoticz.config | 29 + utils/domoticz/files/domoticz.hotplug | 44 + utils/domoticz/files/domoticz.init | 71 + utils/dosfstools/Makefile | 52 + ..._CHECK_LIB-for-iconv-library-linking.patch | 27 + utils/dump1090/Makefile | 80 + utils/dump1090/files/dump1090.config | 50 + utils/dump1090/files/dump1090.default | 16 + utils/dump1090/files/dump1090.init | 105 + utils/dvtm/Makefile | 42 + utils/ecdsautils/Makefile | 73 + utils/evtest/Makefile | 46 + utils/findutils/Makefile | 88 + utils/flashrom/Makefile | 111 + utils/flashrom/flashrom.mk | 99 + .../patches/0001-fix_internal_bitbang.patch | 11 + .../patches/0002-fix-io-h-include.patch | 10 + ...pi-avoid-deprecated-libusb-functions.patch | 40 + utils/flent-tools/Makefile | 52 + utils/fontconfig/Makefile | 64 + utils/gammu/Makefile | 72 + utils/gammu/files/gammu | 5 + utils/gammu/files/gammu.init | 116 + .../patches/001-iconv-disabling-option.patch | 51 + .../patches/002-no-fstack-protector.patch | 11 + .../patches/003-cmake-cross-toolchain.patch | 43 + .../patches/004-cmake_libdbi_optional.patch | 34 + utils/gammu/patches/010-utils-shell-fix.patch | 16 + utils/gawk/Makefile | 45 + utils/gkermit/Makefile | 58 + utils/gnupg/Makefile | 109 + utils/gpsd/Makefile | 143 + utils/gpsd/files/gpsd.config | 5 + utils/gpsd/files/gpsd.init | 44 + .../patches/0002-ncurses6_detection.patch | 15 + utils/gptfdisk/Makefile | 98 + utils/grep/Makefile | 60 + utils/gzip/Makefile | 64 + utils/hamlib/Makefile | 100 + utils/haserl/Config.in | 35 + utils/haserl/Makefile | 57 + .../patches/100-replace-lua2c-with-sed.patch | 82 + .../patches/101-adjust-script-size.patch | 11 + utils/haveged/Makefile | 66 + utils/haveged/files/haveged.init | 16 + utils/hd-idle/Makefile | 55 + utils/hd-idle/files/hd-idle.config | 5 + utils/hd-idle/files/hd-idle.init | 72 + utils/hdparm/Makefile | 42 + utils/hfsprogs/Makefile | 82 + utils/hfsprogs/files/hfsfsck.sh | 30 + ...01-Create-short-Makefiles-for-Debian.patch | 93 + ...002-Add-exclude-Darwin-specific-code.patch | 1407 ++ ...de-files-absent-from-the-upstream-pa.patch | 1024 + ...004-Fix-compilation-on-64-bit-arches.patch | 131 + ...Remove-Apple-specific-p-from-strings.patch | 291 + .../0006-Adjust-types-for-printing.patch | 37 + .../0007-Fix-path-for-HFS-wrapper-block.patch | 23 + .../0008-Provide-command-line-option-a.patch | 40 + .../0009-Rename-dprintf-to-dbg_printf.patch | 187 + ...10-Rename-custom-macro-nil-with-NULL.patch | 1319 ++ utils/hfsprogs/patches/0011-Fix-types.patch | 71 + ...t-creating-UUIDs-for-new-filesystems.patch | 50 + .../hfsprogs/patches/0013-Fix-manpages.patch | 157 + .../patches/0014-uClibc_no_loadavg.patch | 15 + .../patches/0015-sysctl-only-on-glibc.patch | 91 + utils/hub-ctrl/Makefile | 54 + utils/i2c-tools/Makefile | 125 + utils/inotify-tools/Makefile | 99 + utils/io/Makefile | 36 + utils/io/src/io.c | 428 + utils/irqbalance/Makefile | 52 + .../patches/100-disable-ui-compilation.patch | 47 + utils/irqbalance/patches/200-avoid-glib.patch | 421 + .../300-upstream-fix-for-AARCH64.patch | 21 + utils/joe/Makefile | 60 + utils/joe/files/joerc | 783 + utils/jq/Makefile | 46 + utils/jq/patches/001-stack-exhaustion.patch | 37 + .../jq/patches/002-heap-buffer-overflow.patch | 34 + utils/klish/Makefile | 90 + .../klish/patches/010-shell_execute_fix.patch | 16 + utils/kmod/Makefile | 93 + .../kmod/patches/001-fix_pkgconfig_file.patch | 22 + utils/lcd4linux/Config.in | 490 + utils/lcd4linux/Makefile | 302 + utils/lcd4linux/files/lcd4linux.init | 15 + .../patches/100-drv_RouterBoard.patch | 11 + .../patches/110-uclibc-logarithm-fix.patch | 11 + .../120-remove-as-needed-linker-option.patch | 11 + .../patches/140-no_repnop_T6963.patch | 22 + .../patches/150-addlibmpdclient.patch | 2624 +++ utils/lcd4linux/patches/160-uinput_defs.patch | 24 + .../170-add-generic-spidev-driver.patch | 195 + ...ecify-drv_generic_graphic_real_clear.patch | 45 + .../patches/172-add-TEW673GRU-driver.patch | 552 + .../patches/173-glcd2usb-bigendian-fix.patch | 20 + utils/lcdproc/Makefile | 167 + utils/lcdproc/files/LCDd | 14 + utils/lcdproc/files/lcdexec | 14 + utils/lcdproc/files/lcdproc | 14 + utils/lcdproc/files/lcdvc | 14 + .../patches/100-remove-build-timestamp.patch | 35 + utils/less/Makefile | 93 + utils/lm-sensors/Makefile | 121 + utils/lm-sensors/files/lm-sensors.init | 14 + utils/lm-sensors/files/sensors.conf | 117 + .../lm-sensors/patches/100-musl-compat.patch | 44 + utils/logrotate/Makefile | 62 + utils/logrotate/files/logrotate.conf | 30 + utils/lrzsz/Makefile | 58 + .../patches/100-install_delete_fix.patch | 19 + utils/lsof/Makefile | 72 + utils/lsof/patches/001-lsof_makefile.patch | 13 + utils/lsof/patches/002-lsof_noportmap.patch | 18 + utils/lsof/patches/003-lsof_selinux.patch | 13 + utils/lsof/patches/004-lsof_ccv.patch | 14 + .../lsof/patches/005-reproducable-build.patch | 24 + utils/lvm2/Makefile | 96 + utils/lvm2/files/lvm2.init | 14 + utils/lvm2/patches/000-compile.patch | 11 + utils/lvm2/patches/001-include_fix.patch | 11 + utils/lvm2/patches/002-const-stdio.patch | 43 + utils/lvm2/patches/003-no-mallinfo.patch | 45 + ...04-device-include-goto-lable-as-well.patch | 26 + utils/lxc/Config.in | 53 + utils/lxc/Makefile | 294 + utils/lxc/files/lxc-auto.config | 5 + utils/lxc/files/lxc-auto.init | 60 + utils/lxc/files/lxc-unprivileged.defaults | 4 + utils/lxc/files/lxc.conf | 1 + ...01-nl-avoid-NULL-pointer-dereference.patch | 37 + utils/lxc/patches/002-compile.patch | 10 + utils/lxc/patches/003-compile.patch | 11 + utils/lxc/patches/010-compile.patch | 37 + utils/lxc/patches/015-getline.patch | 15 + utils/lxc/patches/020-lxc-checkconfig.patch | 20 + .../025-remove-unsupported-option.patch | 24 + utils/macchanger/Makefile | 45 + .../patches/0001-fix-build-with-musl.patch | 13 + utils/mariadb/Makefile | 567 + utils/mariadb/conf/my.cnf | 54 + utils/mariadb/conf/mysqld.default | 10 + utils/mariadb/files/mysqld.init | 53 + utils/mariadb/patches/100-fix_hostname.patch | 11 + utils/mariadb/patches/110-pcre.cmake.patch | 11 + .../patches/120-fix-ucontext-check.patch | 18 + utils/mariadb/patches/130-c11_atomics.patch | 121 + .../patches/140-mips-connect-unaligned.patch | 262 + .../patches/150-mips-innobase-atomic.patch | 14 + utils/mariadb/patches/160-mips-machine.patch | 25 + .../patches/170-ppc-remove-glibc-dep.patch | 75 + utils/mbtools/Makefile | 61 + ...00-fix-unit-test-server-return-value.patch | 10 + utils/mc/Config.in | 59 + utils/mc/Makefile | 124 + utils/mc/patches/010-subshell.patch | 22 + utils/minicom/Makefile | 46 + .../patches/100-fix_iconv_include.patch | 12 + .../patches/101-fix_music_includes.patch | 14 + .../patches/102-fix_musl_compatibility.patch | 13 + .../patches/110-reproducible-builds.patch | 20 + utils/mksh/Makefile | 92 + utils/mksh/patches/100-dot_mkshrc | 48 + utils/mktorrent/Makefile | 44 + utils/mmc-utils/Makefile | 54 + ...perly-set-fortify-source-in-makefile.patch | 9 + utils/moreutils/Makefile | 61 + .../patches/001_disable-manuals.patch | 21 + .../patches/002_no-install-strip.patch | 11 + utils/mpack/Makefile | 45 + utils/mpack/patches/001-use-stdlib.patch | 34 + utils/mt-st/Makefile | 51 + utils/nano/Makefile | 56 + ...pstream-fix-for-3.1-tiny-compilation.patch | 29 + utils/ncdu/Makefile | 49 + utils/netwhere/Makefile | 41 + utils/ntfs-3g/Makefile | 213 + ...001-fuseint-fix-path-mounted-on-musl.patch | 26 + utils/oath-toolkit/Makefile | 49 + utils/open-plc-utils/Makefile | 105 + .../patches/100-remove-build-timestamp.patch | 37 + utils/open2300/Makefile | 67 + utils/open2300/files/open2300.conf | 65 + utils/open2300/patches/001-crosscompile.patch | 139 + utils/openobex/Makefile | 89 + utils/openobex/patches/001-cxx.patch | 10 + utils/openocd/Makefile | 76 + utils/opensc/Makefile | 224 + utils/openzwave/Makefile | 98 + ...x-compilation-against-musl-libc-1127.patch | 28 + utils/openzwave/patches/900_fix-build.patch | 29 + .../patches/901_no-hidcontroller.patch | 89 + utils/openzwave/patches/902_no-udev.patch | 24 + .../patches/904-fix-lib-include-path.patch | 15 + utils/owfs/Config.in | 49 + utils/owfs/Makefile | 300 + utils/owfs/files/owfs.conf | 10 + utils/owfs/files/owfs.init | 82 + utils/owfs/files/owftpd.conf | 8 + utils/owfs/files/owftpd.init | 81 + utils/owfs/files/owhttpd.conf | 8 + utils/owfs/files/owhttpd.init | 81 + utils/owfs/files/owserver.conf | 8 + utils/owfs/files/owserver.init | 81 + ...-netlink-w1-status-message-detection.patch | 30 + .../101-fix-no-reset-routine-segfault.patch | 13 + utils/pciutils/Makefile | 82 + .../patches/100-remove-no-timestamping.patch | 11 + utils/pciutils/patches/101-no-strip.patch | 11 + .../pciutils/patches/102-compressed-ids.patch | 31 + .../patches/103-relative-path-ids.patch | 11 + utils/pciutils/patches/104-resolv.patch | 11 + utils/pciutils/patches/105-fix-host.patch | 11 + utils/pcmciautils/Makefile | 57 + .../files/etc/hotplug.d/pcmcia/pcmcia.agent | 28 + .../pcmcia_socket/pcmcia_socket.agent | 18 + utils/pcmciautils/files/etc/init.d/pcmcia | 25 + .../files/etc/init.d/pcmcia_socket | 19 + .../patches/001-switch_unsigned.patch | 11 + .../patches/002-disable_yywrap.patch | 27 + utils/pcsc-lite/Makefile | 102 + utils/pcsc-lite/files/pcscd.init | 15 + utils/pcsc-tools/Makefile | 43 + .../pcsc-tools/patches/001-disable-atr.patch | 16 + utils/picocom/Makefile | 46 + utils/picocom/patches/100-musl-compat.patch | 17 + utils/pps-tools/Makefile | 50 + utils/procps-ng/Makefile | 110 + .../procps-ng/patches/100-no-tests-docs.patch | 26 + utils/progress/Makefile | 55 + .../patches/001_set-ncurses-lib.patch | 23 + utils/prometheus-node-exporter-lua/Makefile | 153 + .../etc/config/prometheus-node-exporter-lua | 3 + .../etc/init.d/prometheus-node-exporter-lua | 22 + .../usr/bin/prometheus-node-exporter-lua | 146 + .../lib/lua/prometheus-collectors/bmx6.lua | 39 + .../lib/lua/prometheus-collectors/bmx7.lua | 66 + .../lua/prometheus-collectors/conntrack.lua | 8 + .../usr/lib/lua/prometheus-collectors/cpu.lua | 47 + .../lib/lua/prometheus-collectors/filefd.lua | 8 + .../lib/lua/prometheus-collectors/loadavg.lua | 9 + .../lib/lua/prometheus-collectors/meminfo.lua | 12 + .../lua/prometheus-collectors/nat_traffic.lua | 31 + .../lib/lua/prometheus-collectors/netdev.lua | 39 + .../lib/lua/prometheus-collectors/netstat.lua | 30 + .../lib/lua/prometheus-collectors/openwrt.lua | 24 + .../lua/prometheus-collectors/textfile.lua | 11 + .../lib/lua/prometheus-collectors/time.lua | 6 + .../lib/lua/prometheus-collectors/uname.lua | 16 + .../lib/lua/prometheus-collectors/wifi.lua | 43 + .../prometheus-collectors/wifi_stations.lua | 31 + utils/pv/Makefile | 46 + utils/qemu/Makefile | 261 + utils/qemu/files/00-virtio-ports.hotplug | 19 + utils/qemu/files/10-qemu-ga.hotplug | 15 + utils/qemu/files/bridge.conf | 1 + utils/qemu/files/qemu-ga.init | 15 + ...nfigure-allow-disable-fortify_source.patch | 27 + ...lation-failure-when-isnan-is-a-macro.patch | 69 + ...ilation-when-AS-is-actually-gcc-driv.patch | 35 + utils/relayctl/Makefile | 47 + utils/relayctl/patches/0001-ftdi1.patch | 26 + utils/rng-tools/Makefile | 63 + utils/rng-tools/files/rngd.init | 26 + utils/rng-tools/files/rngd.uci_defaults | 8 + .../patches/100-message-no-newline.patch | 137 + utils/rpcd-mod-lxc/Makefile | 37 + utils/rpcd-mod-lxc/files/CMakeLists.txt | 19 + utils/rpcd-mod-lxc/files/lxc.c | 552 + utils/rrdtool1/Makefile | 135 + .../patches/001-no_ordering_cd_joke.patch | 21 + utils/rrdtool1/patches/002-no_timezone.patch | 24 + .../rrdtool1/patches/020-x86-float-cast.patch | 13 + .../rrdtool1/patches/030-pod2man-stderr.patch | 11 + utils/rtklib/Makefile | 97 + utils/rtl-ais/Makefile | 54 + utils/rtl-ais/files/rtl_ais.init | 38 + utils/rtl-ais/files/uci_rtl_ais | 3 + utils/rtl-sdr/Makefile | 97 + utils/rtl-sdr/files/rtl_tcp.config | 12 + utils/rtl-sdr/files/rtl_tcp.init | 64 + utils/rtl-sdr/patches/101-fix-inlines.patch | 66 + utils/rtl_433/Makefile | 46 + utils/rtty/Makefile | 93 + utils/rtty/files/rtty.config | 13 + utils/rtty/files/rtty.init | 59 + utils/sane-backends/Makefile | 356 + utils/sane-backends/files/xinet.d_sane-port | 14 + .../patches/002-remove-uneeded.patch | 11 + .../patches/031-fix_uclibc.patch | 24 + ...emove_linked_libs_for_unused_preload.patch | 22 + utils/screen/Makefile | 58 + utils/screen/files/etc/screenrc | 1 + .../patches/100-cross_compile_fix.patch | 64 + ...10-do_not_add_srcdir_to_include_path.patch | 11 + utils/screen/patches/200-musl-compat.patch | 57 + utils/serialconsole/Makefile | 41 + utils/setserial/Makefile | 34 + utils/shadow/Makefile | 148 + utils/shadow/patches/001-busybox_ash.patch | 11 + .../patches/002-disable-ruser-lookup.patch | 10 + ...id_t-and-gid_t-using-AC_CHECK_SIZEOF.patch | 35 + .../patches/004-fix-su-controoling-term.patch | 16 + utils/sispmctl/Makefile | 57 + utils/sispmctl/patches/001-fix-includes.patch | 25 + utils/slide-switch/Makefile | 61 + utils/smartmontools/Makefile | 95 + utils/smartmontools/files/smartd.conf | 1 + utils/smartmontools/files/smartd.init | 16 + .../patches/001-musl-compat-realpath.patch | 19 + utils/smstools3/Makefile | 65 + utils/smstools3/files/smstools3.conf | 24 + utils/smstools3/files/smstools3.init | 37 + utils/smstools3/patches/002-Makefile.patch | 11 + utils/smstools3/patches/003-bash-ash.patch | 8 + .../patches/004-modem-processes.patch | 26 + utils/sockread/Makefile | 35 + utils/sockread/src/Makefile | 11 + utils/sockread/src/main.c | 63 + utils/spi-tools/Makefile | 49 + utils/squashfs-tools/Config.in | 17 + utils/squashfs-tools/Makefile | 90 + ...c-get-inline-functions-work-with-C99.patch | 154 + .../patches/0004-vla-to-malloc.patch | 474 + utils/stm32flash/Makefile | 41 + utils/stoken/Makefile | 81 + utils/stress/Makefile | 49 + utils/sumo/Makefile | 63 + utils/sumo/files/sumo.sh | 6 + utils/sumo/patches/100-configure_fix.patch | 14 + utils/swig/Makefile | 40 + ...0001-Add-Node-7.x-aka-V8-5.2-support.patch | 330 + utils/sysstat/Makefile | 66 + utils/sysstat/files/sysstat.config | 7 + utils/sysstat/files/sysstat.init | 49 + utils/sysstat/patches/100-musl-compat.patch | 30 + utils/sysstat/patches/110-remove-sccsid.patch | 131 + utils/tar/Makefile | 108 + utils/taskwarrior/Makefile | 48 + utils/tcsh/Makefile | 61 + utils/tcsh/patches/001-sysmalloc.patch | 15 + utils/tio/Makefile | 42 + utils/tmux/Makefile | 46 + utils/tracertools/Makefile | 43 + utils/tree/Makefile | 37 + utils/triggerhappy/Makefile | 57 + .../files/triggerhappy-example.conf | 14 + utils/triggerhappy/files/triggerhappy.hotplug | 15 + utils/triggerhappy/files/triggerhappy.init | 10 + utils/ttyd/Makefile | 47 + utils/uledd/Makefile | 32 + utils/uledd/files/uledd.init | 13 + utils/unrar/Makefile | 100 + utils/unrar/patches/100-makefile_fixes.patch | 28 + utils/unzip/Makefile | 74 + .../001-CVE-2014-8139-crc-overflow.patch | 49 + .../002-CVE-2014-8140-test-compr-eb.patch | 23 + .../003-CVE-2014-8141-getzip64data.patch | 133 + .../004-CVE-2014-9636-test-compr-eb.patch | 25 + .../005-CVE-2015-7696-heap-overflow.patch | 21 + .../006-CVE-2015-7697-infinite-loop.patch | 15 + ...007-integer-underflow-csiz_decrypted.patch | 21 + ...-cve-2014-9913-unzip-buffer-overflow.patch | 29 + ...ve-2016-9844-zipinfo-buffer-overflow.patch | 28 + .../unzip/patches/010-remove-build-date.patch | 17 + utils/usbmuxd/Makefile | 53 + utils/uvcdynctrl/Makefile | 72 + utils/vim/Makefile | 239 + utils/vim/files/vimrc | 12 + utils/vim/files/vimrc.full | 30 + ...ompilation-date-in-SOURCE_DATE_EPOCH.patch | 81 + .../002-remove_helptags_generation.patch | 10 + utils/watchcat/Makefile | 45 + utils/watchcat/files/initd_watchcat | 109 + utils/watchcat/files/uci_defaults_watchcat | 10 + utils/watchcat/files/watchcat.sh | 77 + utils/wifitoggle/Makefile | 46 + utils/wifitoggle/files/wifitoggle.config | 13 + utils/wifitoggle/files/wifitoggle.hotplug | 174 + utils/xz/Makefile | 117 + utils/yara/Config.in | 16 + utils/yara/Makefile | 71 + utils/yunbridge/Makefile | 49 + utils/yunbridge/files/etc/config/yunbridge | 6 + utils/yunbridge/files/etc/init.d/yunbridge | 22 + utils/yunbridge/files/sbin/yunbridge | 6 + .../files/usr/bin/pretty-wifi-info.lua | 75 + .../lib/lua/luci/controller/arduino/index.lua | 414 + .../files/usr/lib/lua/luci/sha256.lua | 199 + utils/yunbridge/patches/000-scripts.patch | 18 + utils/zile/Makefile | 56 + .../010-remove_gets_definition_warning.patch | 11 + utils/zip/Makefile | 73 + ...e-borrow-the-LFS-test-from-autotools.patch | 90 + utils/zip/patches/010-remove-build-date.patch | 15 + utils/zoneinfo/Makefile | 242 + utils/zsh/Makefile | 108 + 2707 files changed, 247731 insertions(+), 611 deletions(-) create mode 100644 .github/issue_template create mode 100644 .github/pull_request_template create mode 100644 .keys/626471F1.asc create mode 100644 .keys/D52BBB6B.asc create mode 100644 .travis.yml create mode 100755 .travis_do.sh create mode 100644 CONTRIBUTING.md create mode 100644 admin/debootstrap/Makefile create mode 100644 admin/debootstrap/files/pkgdetails.c create mode 100644 admin/htop/Makefile create mode 100644 admin/ipmitool/Makefile create mode 100644 admin/monit/Makefile create mode 100644 admin/monit/files/monit.init create mode 100644 admin/monit/patches/001-fix-default-piddir.patch create mode 100644 admin/muninlite/Makefile create mode 100644 admin/muninlite/files/etc/xinetd.d/munin create mode 100644 admin/muninlite/patches/001-fix_disks.patch create mode 100644 admin/muninlite/patches/002-hostname.patch create mode 100644 admin/muninlite/patches/100-fix-no-ethtool.patch create mode 100644 admin/muninlite/patches/110-fix-uptime-days.patch create mode 100644 admin/muninlite/patches/200-add-tap-dev.patch create mode 100644 admin/muninlite/patches/210-add-bridge-devs.patch create mode 100644 admin/muninlite/patches/220-modify-ifname-parser.patch create mode 100644 admin/muninlite/patches/230-fix-available-interface-parsing.patch create mode 100644 admin/netdata/Makefile create mode 100644 admin/netdata/files/netdata.conf create mode 100644 admin/netdata/files/netdata.init create mode 100644 admin/netdata/patches/001-disable_external_plugins_by_default.patch create mode 100644 admin/openwisp-config/Makefile create mode 100644 admin/sudo/Makefile create mode 100755 admin/sudo/files/sudo.init create mode 100644 admin/sudo/patches/010-cross-compile-fixes.patch create mode 100644 admin/sudo/patches/020-no-owner-change.patch create mode 100644 admin/sudo/patches/030-musl-fix-missing-header.patch create mode 100644 admin/syslog-ng/Makefile create mode 100644 admin/syslog-ng/files/syslog-ng.conf create mode 100644 admin/syslog-ng/files/syslog-ng.init create mode 100644 admin/syslog-ng/patches/100-use-1.0.2k-threadids.patch create mode 100644 admin/zabbix/Makefile create mode 100644 admin/zabbix/files/mac80211 create mode 100644 admin/zabbix/files/network create mode 100644 admin/zabbix/files/wifi create mode 100755 admin/zabbix/files/zabbix_agentd.init create mode 100644 admin/zabbix/files/zabbix_helper_mac80211.c create mode 100644 admin/zabbix/patches/002-fix-res_send-on-uclibc.patch create mode 100644 admin/zabbix/patches/002-uclibc_loadavg.patch create mode 100644 admin/zabbix/patches/003-change-user-and-foreground.patch create mode 100644 admin/zabbix/patches/010-change-agentd-config.patch create mode 100644 admin/zabbix/patches/100-musl-compat.patch create mode 100644 admin/zabbix/patches/110-reproducible-builds.patch create mode 100644 devel/autoconf/Makefile create mode 100644 devel/automake/Makefile create mode 100644 devel/diffutils/Makefile create mode 100644 devel/gcc/Makefile create mode 100644 devel/gcc/README create mode 100644 devel/gcc/patches/001-revert_register_mode_search.patch create mode 100644 devel/gcc/patches/002-case_insensitive.patch create mode 100644 devel/gcc/patches/002-dont-choke-when-building-32bit-on-64bit.patch create mode 100644 devel/gcc/patches/003-mpfr-longlong-mips.patch create mode 100644 devel/gcc/patches/010-documentation.patch create mode 100644 devel/gcc/patches/020-no-plt-backport.patch create mode 100644 devel/gcc/patches/040-fix-mips-ICE-PR-68400.patch create mode 100644 devel/gcc/patches/100-uclibc-conf.patch create mode 100644 devel/gcc/patches/200-musl_config.patch create mode 100644 devel/gcc/patches/201-musl_arm.patch create mode 100644 devel/gcc/patches/202-musl_mips.patch create mode 100644 devel/gcc/patches/203-musl_powerpc.patch create mode 100644 devel/gcc/patches/204-musl_sh.patch create mode 100644 devel/gcc/patches/205-musl_x86.patch create mode 100644 devel/gcc/patches/206-musl_aarch64.patch create mode 100644 devel/gcc/patches/207-musl_fixincludes.patch create mode 100644 devel/gcc/patches/209-musl_libstdc++.patch create mode 100644 devel/gcc/patches/230-musl_libssp.patch create mode 100644 devel/gcc/patches/240-musl-libitm-fixes.patch create mode 100644 devel/gcc/patches/250-add-musl.patch create mode 100644 devel/gcc/patches/260-musl-add-unwind-fix.patch create mode 100644 devel/gcc/patches/270-musl-add-powerpc-softfloat-fix.patch create mode 100644 devel/gcc/patches/300-mips_Os_cpu_rtx_cost_model.patch create mode 100644 devel/gcc/patches/800-arm_v5te_no_ldrd_strd.patch create mode 100644 devel/gcc/patches/810-arm-softfloat-libgcc.patch create mode 100644 devel/gcc/patches/820-libgcc_pic.patch create mode 100644 devel/gcc/patches/830-arm_unbreak_armv4t.patch create mode 100644 devel/gcc/patches/840-armv4_pass_fix-v4bx_to_ld.patch create mode 100644 devel/gcc/patches/850-use_shared_libgcc.patch create mode 100644 devel/gcc/patches/851-libgcc_no_compat.patch create mode 100644 devel/gcc/patches/870-ppc_no_crtsavres.patch create mode 100644 devel/gcc/patches/880-no_java_section.patch create mode 100644 devel/gcc/patches/900-bad-mips16-crt.patch create mode 100644 devel/gcc/patches/910-mbsd_multi.patch create mode 100644 devel/gcc/patches/920-specs_nonfatal_getenv.patch create mode 100644 devel/gcc/patches/930-fix-mips-noexecstack.patch create mode 100644 devel/gcc/patches/930-osdefines.patch create mode 100644 devel/gcc/patches/940-no-clobber-stamp-bits.patch create mode 100644 devel/gcc/patches/950-cpp_file_path_translation.patch create mode 100644 devel/gcc/patches/960-go_libm.patch create mode 100644 devel/gcc/patches/970-warn_bug.patch create mode 100644 devel/libtool-bin/Makefile create mode 100644 devel/lpc21isp/Makefile create mode 100644 devel/lpc21isp/patches/100-fix-reproducible-builds.patch create mode 100644 devel/lttng-modules/Makefile create mode 100644 devel/lttng-modules/patches/001-mm_page_alloc_extfrag.patch create mode 100644 devel/lttng-tools/Makefile create mode 100644 devel/lttng-tools/patches/100-musl-compat.patch create mode 100644 devel/lttng-tools/patches/200-use-extern.patch create mode 100644 devel/m4/Makefile create mode 100644 devel/make/Makefile create mode 100644 devel/patch/Makefile create mode 100644 devel/patch/patches/010-CVE-2018-6951.patch create mode 100644 devel/patch/patches/020-CVE-2018-1000156.patch create mode 100644 devel/patch/patches/030-CVE-2018-6952.patch create mode 100644 devel/pkg-config/Makefile create mode 100644 fonts/dejavu-fonts-ttf/Makefile create mode 100644 ipv6/tayga/Makefile create mode 100755 ipv6/tayga/files/tayga-proto.sh create mode 100644 ipv6/tayga/files/tayga.hotplug create mode 100644 ipv6/tayga/files/tayga.sh create mode 100644 ipv6/tayga/patches/001-configure_unset_CFLAGS.patch create mode 100644 ipv6/tayga/patches/002-bigendian_wrong_checksum.patch create mode 100644 kernel/exfat-nofuse/Makefile create mode 100644 kernel/mtd-rw/Makefile create mode 100644 lang/dkjson/Makefile create mode 100644 lang/erlang/Makefile create mode 100644 lang/erlang/patches/101-emulator_includes.patch create mode 100644 lang/erlang/patches/102-musl_compat.patch create mode 100644 lang/erlang/patches/103-disable_emacs.patch create mode 100644 lang/golang/golang-compiler.mk create mode 100644 lang/golang/golang-package.mk create mode 100644 lang/golang/golang-values.mk create mode 100644 lang/golang/golang-version.mk create mode 100644 lang/golang/golang/Makefile create mode 100644 lang/golang/golang/files/go-gcc-helper create mode 100644 lang/jamvm/Makefile create mode 100644 lang/jamvm/patches/001-Use-fenv.h-instead-of-fpu_control.h.patch create mode 100644 lang/json4lua/Makefile create mode 100644 lang/ldbus/Makefile create mode 100644 lang/lpeg/Makefile create mode 100644 lang/lua-bencode/Makefile create mode 100644 lang/lua-cjson/Makefile create mode 100644 lang/lua-copas/Makefile create mode 100644 lang/lua-copas/patches/makefile.patch create mode 100644 lang/lua-coxpcall/Makefile create mode 100644 lang/lua-coxpcall/patches/config.patch create mode 100644 lang/lua-lsqlite3/Makefile create mode 100644 lang/lua-lzlib/Makefile create mode 100644 lang/lua-lzlib/patches/001-allow_optim_flags.patch create mode 100644 lang/lua-md5/Makefile create mode 100644 lang/lua-md5/patches/config.patch create mode 100644 lang/lua-md5/patches/makefile.patch create mode 100644 lang/lua-mobdebug/Makefile create mode 100644 lang/lua-mosquitto/Makefile create mode 100644 lang/lua-openssl/Makefile create mode 100644 lang/lua-openssl/patches/0001-Revise-Makefile.patch create mode 100644 lang/lua-openssl/patches/0010-Fix-Linkage.patch create mode 100644 lang/lua-openssl/patches/0020-support-OPENSSL_NO_SSL3_METHOD.patch create mode 100644 lang/lua-openssl/patches/0030-support-OPENSSL_NO_COMP.patch create mode 100644 lang/lua-penlight/Makefile create mode 100644 lang/lua-rings/Makefile create mode 100644 lang/lua-rings/patches/config.patch create mode 100644 lang/lua-rings/patches/makefile.patch create mode 100644 lang/lua-rs232/Makefile create mode 100644 lang/lua-rs232/patches/100-remove-build-timestamps.patch create mode 100644 lang/lua-sha2/Makefile create mode 100644 lang/lua-sha2/patches/001-makefile.patch create mode 100644 lang/lua-wsapi/Makefile create mode 100644 lang/lua-xavante/Makefile create mode 100644 lang/luabitop/Makefile create mode 100644 lang/luaexpat/Makefile create mode 100644 lang/luaexpat/files/compat-5.1r5/compat-5.1.c create mode 100644 lang/luaexpat/files/compat-5.1r5/compat-5.1.h create mode 100644 lang/luaexpat/files/compat-5.1r5/compat-5.1.lua create mode 100644 lang/luafilesystem/Makefile create mode 100644 lang/luai2c/Makefile create mode 100644 lang/luajit/Makefile create mode 100644 lang/luajit/patches/010-lua-path.patch create mode 100644 lang/lualanes/Makefile create mode 100644 lang/lualanes/patches/100-musl-compat.patch create mode 100644 lang/luaposix/Makefile create mode 100644 lang/luaposix/patches/100-eglibc-compat.patch create mode 100644 lang/luaposix/patches/101-disable-curses.patch create mode 100644 lang/luaposix/patches/102-disable-compat-deprecated.diff create mode 100644 lang/luarocks/Makefile create mode 100644 lang/luarocks/patches/01_dont_modify_bin_shebang.diff create mode 100644 lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch create mode 100644 lang/luasec/Makefile create mode 100644 lang/luasoap/Makefile create mode 100644 lang/luasocket/Makefile create mode 100644 lang/luasocket/patches/0001-Add-interface-support.patch create mode 100644 lang/luasocket/patches/0301-Fix-mpc85xx-build.patch create mode 100644 lang/luasql/Makefile create mode 100644 lang/luv/Config.in create mode 100644 lang/luv/Makefile create mode 100644 lang/lzmq/Makefile create mode 100644 lang/node-arduino-firmata/Makefile create mode 100644 lang/node-arduino-firmata/files/usr/lib/node/arduino-firmata/lib/arduino-firmata.js create mode 100644 lang/node-arduino-firmata/patches/000-new-serialport.patch create mode 100644 lang/node-cylon/Makefile create mode 100644 lang/node-cylon/patches/0001-serialport.patch create mode 100644 lang/node-hid/Makefile create mode 100644 lang/node-mozilla-iot-gateway/Makefile create mode 100644 lang/node-mozilla-iot-gateway/files/mozilla-iot-gateway.init create mode 100644 lang/node-serialport/Makefile create mode 100644 lang/node/Makefile create mode 100644 lang/node/patches/001-hardfloat.patch create mode 100644 lang/node/patches/002-addr_info.patch create mode 100644 lang/node/patches/003-path.patch create mode 100644 lang/node/patches/004-node_crypto_include_cmath.patch create mode 100644 lang/perl-authen-sasl-xs/Makefile create mode 100644 lang/perl-authen-sasl-xs/patches/100-remove-devel-checklib-checks.patch create mode 100644 lang/perl-authen-sasl/Makefile create mode 100644 lang/perl-cgi/Makefile create mode 100644 lang/perl-compress-bzip2/Makefile create mode 100644 lang/perl-dbi/Makefile create mode 100644 lang/perl-device-serialport/Makefile create mode 100644 lang/perl-device-usb/Makefile create mode 100644 lang/perl-device-usb/README.patches create mode 100644 lang/perl-device-usb/patches/100-fix_buildsystem.patch create mode 100644 lang/perl-device-usb/patches/110-just_assume_libusb_is_there.diff create mode 100644 lang/perl-device-usb/patches/120-use_libusb_0_1.patch create mode 100644 lang/perl-device-usb/patches/130-provide-proper-library-paths.patch create mode 100644 lang/perl-device-usb/patches/140-avoid-libusb-name-conflicts.patch create mode 100644 lang/perl-encode-locale/Makefile create mode 100644 lang/perl-file-listing/Makefile create mode 100644 lang/perl-file-sharedir-install/Makefile create mode 100644 lang/perl-html-form/Makefile create mode 100644 lang/perl-html-parser/Makefile create mode 100644 lang/perl-html-tagset/Makefile create mode 100644 lang/perl-html-tree/Makefile create mode 100644 lang/perl-http-cookies/Makefile create mode 100644 lang/perl-http-daemon/Makefile create mode 100644 lang/perl-http-date/Makefile create mode 100644 lang/perl-http-message/Makefile create mode 100644 lang/perl-http-negotiate/Makefile create mode 100644 lang/perl-http-server-simple/Makefile create mode 100644 lang/perl-inline-c/Makefile create mode 100644 lang/perl-inline-c/patches/100-inline_c-no_compile_hack.patch create mode 100644 lang/perl-inline-c/patches/110-inline_c-make_system_typemap_overridable.patch create mode 100644 lang/perl-inline/Makefile create mode 100644 lang/perl-io-html/Makefile create mode 100644 lang/perl-lockfile-simple/Makefile create mode 100644 lang/perl-lwp-mediatypes/Makefile create mode 100644 lang/perl-net-http/Makefile create mode 100644 lang/perl-net-telnet/Makefile create mode 100644 lang/perl-parse-recdescent/Makefile create mode 100644 lang/perl-sub-uplevel/Makefile create mode 100644 lang/perl-test-harness/Makefile create mode 100644 lang/perl-test-warn/Makefile create mode 100644 lang/perl-text-csv_xs/Makefile create mode 100644 lang/perl-uri/Makefile create mode 100644 lang/perl-www-curl/Makefile create mode 100644 lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch create mode 100644 lang/perl-www-curl/patches/101-skip-preprocessor-symbol.path create mode 100644 lang/perl-www-curl/patches/200-fix_default_lflags.patch create mode 100644 lang/perl-www-mechanize/Makefile create mode 100644 lang/perl-www-robotrules/Makefile create mode 100644 lang/perl-www/Makefile create mode 100644 lang/perl-xml-parser/Makefile create mode 100644 lang/perl-xml-parser/patches/010-xml-parser-expat-use-ppport.h create mode 100644 lang/perl-xml-parser/patches/020-xml-parser-expat-lib-inc-path-anchor.patch create mode 100644 lang/perl/Config.in create mode 100644 lang/perl/Makefile create mode 100644 lang/perl/README.patches create mode 100644 lang/perl/files/README.config create mode 100644 lang/perl/files/aarch64.config create mode 100644 lang/perl/files/architecture.config create mode 100644 lang/perl/files/arm.config create mode 100644 lang/perl/files/armeb.config create mode 100644 lang/perl/files/base.config create mode 100644 lang/perl/files/i486.config create mode 100644 lang/perl/files/libc.config create mode 100644 lang/perl/files/mips.config create mode 100644 lang/perl/files/mips64.config create mode 100644 lang/perl/files/mipsel.config create mode 100644 lang/perl/files/misc.config create mode 100755 lang/perl/files/perl-run_tests.sh create mode 100644 lang/perl/files/perlconfig.pl create mode 100644 lang/perl/files/powerpc.config create mode 100644 lang/perl/files/signal.config create mode 100644 lang/perl/files/threads.config create mode 100644 lang/perl/files/version.config create mode 100644 lang/perl/files/x86_64.config create mode 100644 lang/perl/patches/010-musl-compat.patch create mode 100644 lang/perl/patches/020-storables-stacksize.patch create mode 100644 lang/perl/patches/100-fix-cross-compile-endianness-detection.patch create mode 100644 lang/perl/patches/110-always_use_miniperl.patch create mode 100644 lang/perl/patches/120-remove-build-timestamp.patch create mode 100644 lang/perl/patches/300-add-relink-hack.patch create mode 100644 lang/perl/patches/320-copy-pod-hack.patch create mode 100644 lang/perl/patches/710-threads_join-skip_ps_on_busybox.patch create mode 100644 lang/perl/patches/900-use-rm-force.patch create mode 100644 lang/perl/patches/910-miniperl-needs-inc-dot.patch create mode 100644 lang/perl/patches/920-fix-no-locale.patch create mode 100644 lang/perl/perlbase.mk create mode 100644 lang/perl/perlmod.mk create mode 100644 lang/perl/perlver.mk create mode 100644 lang/php7-pecl-dio/Makefile create mode 100644 lang/php7-pecl-http/Makefile create mode 100644 lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch create mode 100644 lang/php7-pecl-http/patches/200-string_or_null_register.patch create mode 100644 lang/php7-pecl-http/patches/300-fix-73.patch create mode 100644 lang/php7-pecl-libevent/Makefile create mode 100644 lang/php7-pecl-libevent/patches/010-libevent2.patch create mode 100644 lang/php7-pecl-propro/Makefile create mode 100644 lang/php7-pecl-raphf/Makefile create mode 100644 lang/php7/Makefile create mode 100644 lang/php7/files/php.ini create mode 100644 lang/php7/files/php7-fastcgi.config create mode 100644 lang/php7/files/php7-fastcgi.init create mode 100644 lang/php7/files/php7-fpm-www.conf create mode 100644 lang/php7/files/php7-fpm.conf create mode 100644 lang/php7/files/php7-fpm.config create mode 100644 lang/php7/files/php7-fpm.init create mode 100644 lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch create mode 100644 lang/php7/patches/0016-dont-gitclean-in-build.patch create mode 100644 lang/php7/patches/0032-Use-system-timezone.patch create mode 100644 lang/php7/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch create mode 100644 lang/php7/patches/0042-Remove-W3C-validation-icon-to-not-expose-the-reader-.patch create mode 100644 lang/php7/patches/0050-remove-build-timestamps.patch create mode 100644 lang/php7/patches/1000-fix_membar_producer_link_error_gcc3x.patch create mode 100644 lang/php7/patches/1001-ext-opcache-fix-detection-of-shm-mmap.patch create mode 100644 lang/php7/patches/1002-gd-iconv.patch create mode 100644 lang/php7/patches/1003-Fix-dl-cross-compiling-issue.patch create mode 100644 lang/php7/patches/1004-disable-phar-command.patch create mode 100644 lang/php7/patches/1006-multiline-syslog.patch create mode 100644 lang/php7/patches/1010-pcrelib-NativeMIPS.patch create mode 100644 lang/php7/patches/1012-php_iconv_string-null-out-pointer.patch create mode 100644 lang/php7/pecl.mk create mode 100644 lang/python/Flask/Makefile create mode 100644 lang/python/Jinja2/Makefile create mode 100644 lang/python/MarkupSafe/Makefile create mode 100644 lang/python/Werkzeug/Makefile create mode 100644 lang/python/chardet/Makefile create mode 100644 lang/python/click/Makefile create mode 100644 lang/python/django-appconf/Makefile create mode 100644 lang/python/django-compressor/Makefile create mode 100644 lang/python/django-constance/Makefile create mode 100644 lang/python/django-jsonfield/Makefile create mode 100644 lang/python/django-picklefield/Makefile create mode 100644 lang/python/django-postoffice/Makefile create mode 100644 lang/python/django-restframework/Makefile create mode 100644 lang/python/django-statici18n/Makefile create mode 100644 lang/python/django/Makefile create mode 100644 lang/python/et_xmlfile/Makefile create mode 100644 lang/python/flup/Makefile create mode 100644 lang/python/gunicorn/Makefile create mode 100644 lang/python/itsdangerous/Makefile create mode 100644 lang/python/jdcal/Makefile create mode 100644 lang/python/micropython-lib/Makefile create mode 100644 lang/python/micropython/Makefile create mode 100644 lang/python/micropython/patches/000-Makefile-no-errors create mode 100644 lang/python/micropython/patches/001-all-unix create mode 100644 lang/python/openpyxl/Makefile create mode 100644 lang/python/pillow/Makefile create mode 100644 lang/python/pillow/patches/010-fix-paths.patch create mode 100644 lang/python/pyodbc/Makefile create mode 100644 lang/python/pyodbc/patches/100-connection-assume-SQL_C_WCHAR-is-native-endian.patch create mode 100644 lang/python/python-asn1crypto/Makefile create mode 100644 lang/python/python-attrs/Makefile create mode 100644 lang/python/python-automat/Makefile create mode 100644 lang/python/python-automat/patches/001-do-not-use-setuptools-scm-m2r.patch create mode 100644 lang/python/python-automat/patches/002-omit-visualize.patch create mode 100644 lang/python/python-automat/patches/003-omit-tests.patch create mode 100644 lang/python/python-cffi/Makefile create mode 100644 lang/python/python-constantly/Makefile create mode 100644 lang/python/python-crcmod/Makefile create mode 100644 lang/python/python-crypto/Makefile create mode 100644 lang/python/python-crypto/patches/001-no-host-paths.patch create mode 100644 lang/python/python-crypto/patches/002-fix-endianness-detect.patch create mode 100644 lang/python/python-crypto/patches/003-omit-tests.patch create mode 100644 lang/python/python-cryptography/Makefile create mode 100644 lang/python/python-cryptography/patches/001-disable-setup-requirements.patch create mode 100644 lang/python/python-cryptography/patches/002-remove-undefined-dtls-methods.patch create mode 100644 lang/python/python-curl/Makefile create mode 100644 lang/python/python-dateutil/Makefile create mode 100644 lang/python/python-dns/Makefile create mode 100644 lang/python/python-dpkt/Makefile create mode 100644 lang/python/python-egenix-mx-base/Makefile create mode 100644 lang/python/python-enum34/Makefile create mode 100644 lang/python/python-enum34/patches/001-omit-docs.patch create mode 100644 lang/python/python-evdev/Makefile create mode 100644 lang/python/python-gmpy2/Makefile create mode 100644 lang/python/python-gnupg/Makefile create mode 100644 lang/python/python-host.mk create mode 100644 lang/python/python-hyperlink/Makefile create mode 100644 lang/python/python-hyperlink/patches/001-omit-tests.patch create mode 100644 lang/python/python-idna/Makefile create mode 100644 lang/python/python-incremental/Makefile create mode 100644 lang/python/python-incremental/patches/001-omit-tests.patch create mode 100644 lang/python/python-ipaddress/Makefile create mode 100644 lang/python/python-ldap/Makefile create mode 100644 lang/python/python-ldap/patches/010-setup_cfg.patch create mode 100644 lang/python/python-lxml/Makefile create mode 100644 lang/python/python-mysql/Makefile create mode 100644 lang/python/python-mysql/patches/010-threadsafe.patch create mode 100644 lang/python/python-package-install.sh create mode 100644 lang/python/python-package.mk create mode 100644 lang/python/python-packages/Makefile create mode 100644 lang/python/python-packages/README.md create mode 100644 lang/python/python-parsley/Makefile create mode 100644 lang/python/python-parsley/patches/001-py3-read-utf8.patch create mode 100644 lang/python/python-parsley/patches/002-omit-tests.patch create mode 100644 lang/python/python-pcapy/Makefile create mode 100644 lang/python/python-pip-conf/Makefile create mode 100644 lang/python/python-pip-conf/files/pip.conf create mode 100644 lang/python/python-ply/Makefile create mode 100644 lang/python/python-psycopg2/Makefile create mode 100644 lang/python/python-pyasn1-modules/Makefile create mode 100644 lang/python/python-pyasn1/Makefile create mode 100644 lang/python/python-pycparser/Makefile create mode 100644 lang/python/python-pycparser/patches/001-use-external-ply.patch create mode 100644 lang/python/python-pyopenssl/Makefile create mode 100644 lang/python/python-pyptlib/Makefile create mode 100644 lang/python/python-pyserial/Makefile create mode 100644 lang/python/python-service-identity/Makefile create mode 100644 lang/python/python-six/Makefile create mode 100644 lang/python/python-txsocksx/Makefile create mode 100644 lang/python/python-txsocksx/patches/001-omit-tests.patch create mode 100644 lang/python/python-txsocksx/patches/002-do-not-use-vcversioner.patch create mode 100644 lang/python/python-urllib3/Makefile create mode 100644 lang/python/python-version.mk create mode 100644 lang/python/python-yaml/Makefile create mode 100644 lang/python/python-zope-interface/Makefile create mode 100644 lang/python/python-zope-interface/patches/001-omit-tests.patch create mode 100644 lang/python/python/Config-python-light.in create mode 100644 lang/python/python/Makefile create mode 100644 lang/python/python/files/config.site create mode 100644 lang/python/python/files/python-package-codecs.mk create mode 100644 lang/python/python/files/python-package-compiler.mk create mode 100644 lang/python/python/files/python-package-ctypes.mk create mode 100644 lang/python/python/files/python-package-db.mk create mode 100644 lang/python/python/files/python-package-decimal.mk create mode 100644 lang/python/python/files/python-package-dev.mk create mode 100644 lang/python/python/files/python-package-distutils.mk create mode 100644 lang/python/python/files/python-package-email.mk create mode 100644 lang/python/python/files/python-package-gdbm.mk create mode 100644 lang/python/python/files/python-package-lib2to3.mk create mode 100644 lang/python/python/files/python-package-logging.mk create mode 100644 lang/python/python/files/python-package-multiprocessing.mk create mode 100644 lang/python/python/files/python-package-ncurses.mk create mode 100644 lang/python/python/files/python-package-openssl.mk create mode 100644 lang/python/python/files/python-package-pip.mk create mode 100644 lang/python/python/files/python-package-pydoc.mk create mode 100644 lang/python/python/files/python-package-setuptools.mk create mode 100644 lang/python/python/files/python-package-sqlite3.mk create mode 100644 lang/python/python/files/python-package-unittest.mk create mode 100644 lang/python/python/files/python-package-xml.mk create mode 100644 lang/python/python/patches/001-enable-zlib.patch create mode 100644 lang/python/python/patches/002-do-not-add-include-dirs-when-cross-compiling.patch create mode 100644 lang/python/python/patches/003-do-not-compile-tests-at-build.patch create mode 100644 lang/python/python/patches/004-do-not-write-bytes-codes.patch create mode 100644 lang/python/python/patches/005-fix-bluetooth-support.patch create mode 100644 lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch create mode 100644 lang/python/python/patches/007-distutils-do-not-adjust-path.patch create mode 100644 lang/python/python/patches/008-distutils-use-python-sysroot.patch create mode 100644 lang/python/python/patches/009-do-not-use-dblib_dir-when-cross-compiling.patch create mode 100644 lang/python/python/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch create mode 100644 lang/python/python/patches/012-add-support-source-date-epoch-pyc.patch create mode 100644 lang/python/python/patches/013-getbuildinfo-date-time-source-date-epoch.patch create mode 100644 lang/python/python3-bottle/Makefile create mode 100644 lang/python/python3-host.mk create mode 100644 lang/python/python3-package.mk create mode 100644 lang/python/python3-version.mk create mode 100644 lang/python/python3/Config-python3-light.in create mode 100644 lang/python/python3/Makefile create mode 100644 lang/python/python3/files/config.site create mode 100644 lang/python/python3/files/python3-package-asyncio.mk create mode 100644 lang/python/python3/files/python3-package-cgi.mk create mode 100644 lang/python/python3/files/python3-package-codecs.mk create mode 100644 lang/python/python3/files/python3-package-ctypes.mk create mode 100644 lang/python/python3/files/python3-package-dbm.mk create mode 100644 lang/python/python3/files/python3-package-decimal.mk create mode 100644 lang/python/python3/files/python3-package-dev.mk create mode 100644 lang/python/python3/files/python3-package-distutils.mk create mode 100644 lang/python/python3/files/python3-package-email.mk create mode 100644 lang/python/python3/files/python3-package-gdbm.mk create mode 100644 lang/python/python3/files/python3-package-lib2to3.mk create mode 100644 lang/python/python3/files/python3-package-logging.mk create mode 100644 lang/python/python3/files/python3-package-lzma.mk create mode 100644 lang/python/python3/files/python3-package-multiprocessing.mk create mode 100644 lang/python/python3/files/python3-package-ncurses.mk create mode 100644 lang/python/python3/files/python3-package-openssl.mk create mode 100644 lang/python/python3/files/python3-package-pip.mk create mode 100644 lang/python/python3/files/python3-package-pydoc.mk create mode 100644 lang/python/python3/files/python3-package-setuptools.mk create mode 100644 lang/python/python3/files/python3-package-sqlite3.mk create mode 100644 lang/python/python3/files/python3-package-unittest.mk create mode 100644 lang/python/python3/files/python3-package-xml.mk create mode 100644 lang/python/python3/patches/001-enable-zlib.patch create mode 100644 lang/python/python3/patches/003-do-not-run-distutils-tests.patch create mode 100644 lang/python/python3/patches/004-do-not-write-bytes-codes.patch create mode 100644 lang/python/python3/patches/006-remove-multi-arch-and-local-paths.patch create mode 100644 lang/python/python3/patches/007-distutils-do-not-adjust-path.patch create mode 100644 lang/python/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch create mode 100644 lang/python/python3/patches/012-add-support-source-date-epoch-pyc.patch create mode 100644 lang/python/python3/patches/013-getbuildinfo-date-time-source-date-epoch.patch create mode 100644 lang/python/python3/patches/014-remove-platform-so-suffix.patch create mode 100644 lang/python/python3/patches/015-abort-on-failed-modules.patch create mode 100644 lang/python/python3/patches/016-adjust-config-paths.patch create mode 100644 lang/python/pytz/Makefile create mode 100644 lang/python/rcssmin/Makefile create mode 100644 lang/python/simplejson/Makefile create mode 100644 lang/python/twisted/Makefile create mode 100644 lang/python/twisted/patches/001-omit-tkconch.patch create mode 100644 lang/python/twisted/patches/002-omit-tests.patch create mode 100644 lang/ruby/Makefile create mode 100644 lang/ruby/files/ruby create mode 100644 lang/ruby/ruby_find_pkgsdeps create mode 100644 lang/ruby/ruby_missingfiles create mode 100644 lang/tcl/Makefile create mode 100644 lang/tcl/patches/100-disable_tzdata_and_msgs_install.patch create mode 100644 lang/tcl/patches/200-fix_mips_build.patch create mode 100644 lang/uuid/Makefile create mode 100644 lang/vala/Makefile create mode 100644 libs/alsa-lib/Makefile create mode 100644 libs/alsa-lib/patches/100-link_fix.patch create mode 100644 libs/apr-util/Makefile create mode 100644 libs/apr-util/patches/001-automake-compat.patch create mode 100644 libs/apr/Makefile create mode 100644 libs/apr/patches/001-autoconf-compat.patch create mode 100644 libs/apr/patches/101-fix_apr_time_now.patch create mode 100644 libs/apr/patches/201-upgrade-and-fix-1.5.1.patch create mode 100644 libs/avahi/Makefile create mode 100644 libs/avahi/files/avahi-daemon.conf create mode 100644 libs/avahi/files/avahi-daemon.init create mode 100755 libs/avahi/files/netifd-autoip.sh create mode 100644 libs/avahi/files/service-http create mode 100644 libs/avahi/files/service-ssh create mode 100644 libs/avahi/patches/010-step_back_autotools-no-gettext.patch create mode 100644 libs/avahi/patches/011-fix-poll-h-warnings-on-musl.patch create mode 100644 libs/avro/Makefile create mode 100644 libs/boost/Makefile create mode 100644 libs/c-ares/Makefile create mode 100644 libs/check/Makefile create mode 100644 libs/classpath/Makefile create mode 100644 libs/classpath/patches/010-double-memleak.patch create mode 100644 libs/confuse/Makefile create mode 100644 libs/cyrus-sasl/Makefile create mode 100644 libs/db47/Makefile create mode 100644 libs/db47/patches/010-patch.4.7.25.1.patch create mode 100644 libs/db47/patches/020-patch.4.7.25.2.patch create mode 100644 libs/db47/patches/030-patch.4.7.25.3.patch create mode 100644 libs/db47/patches/040-patch.4.7.25.4.patch create mode 100644 libs/db47/patches/100-repmgr-format-security.patch create mode 100644 libs/dmx_usb_module/Makefile create mode 100644 libs/dmx_usb_module/patches/001-dmx_usb_Makefile.patch create mode 100644 libs/dmx_usb_module/patches/002-fix-build-4.14.patch create mode 100644 libs/dtc/Makefile create mode 100644 libs/dtndht/Makefile create mode 100644 libs/dtndht/patches/001-musl_header.patch create mode 100644 libs/elektra/Makefile create mode 100644 libs/eventlog/Makefile create mode 100644 libs/expat/Makefile create mode 100644 libs/faad2/Makefile create mode 100644 libs/fcgi/Makefile create mode 100644 libs/fcgi/patches/100-fcgio-int-type-fix.patch create mode 100644 libs/fcgi/patches/110-no_examples.patch create mode 100644 libs/fcgi/patches/120-stdio.patch create mode 100644 libs/fftw3/Makefile create mode 100644 libs/fftw3/patches/001-makefile.patch create mode 100644 libs/file/Makefile create mode 100644 libs/flac/Makefile create mode 100644 libs/flac/patches/001-no-docs-and-examples.patch create mode 100644 libs/flac/patches/002-no-utility.patch create mode 100644 libs/flac/patches/005-gcc_debug_options.patch create mode 100644 libs/flac/patches/010-automake-compat.patch create mode 100644 libs/freetype/Makefile create mode 100644 libs/gdbm/Makefile create mode 100644 libs/getdns/Config.in create mode 100644 libs/getdns/Makefile create mode 100644 libs/getdns/patches/001-Bugfix-399-Reinclude-linux-sysctl.h-in-getentropy_li.patch create mode 100644 libs/giflib/Makefile create mode 100644 libs/giflib/patches/100-no-docs.patch create mode 100644 libs/glib2/Makefile create mode 100644 libs/glib2/patches/001-automake-compat.patch create mode 100644 libs/glib2/patches/002-fix-gthreadedresolver.patch create mode 100644 libs/glpk/Makefile create mode 100644 libs/gnutls/Config.in create mode 100644 libs/gnutls/Makefile create mode 100644 libs/gperf/Makefile create mode 100644 libs/gperf/patches/100-include_own_first.patch create mode 100644 libs/hidapi/Makefile create mode 100644 libs/hidapi/patches/010-add-iconv-linkage.patch create mode 100644 libs/hiredis/Makefile create mode 100644 libs/hiredis/patches/001-lvalue_fix.patch create mode 100644 libs/ibrcommon/Makefile create mode 100644 libs/ibrcommon/patches/001-fix-build-with-musl.patch create mode 100644 libs/ibrdtn/Makefile create mode 100644 libs/icu/Makefile create mode 100644 libs/icu/patches/000-dont-cpy-files-from-topdirs.patch create mode 100644 libs/icu/patches/002-Disable-LDFLAGSICUDT-for-Linux.patch create mode 100644 libs/intltool/Makefile create mode 100644 libs/intltool/patches/100-optional-perl-xml-parser.patch create mode 100644 libs/jansson/Makefile create mode 100644 libs/ldns/Makefile create mode 100644 libs/ldns/patches/001-perl5-defined-array.patch create mode 100644 libs/libaio/Makefile create mode 100644 libs/libaio/patches/001_arches.patch create mode 100644 libs/libaio/patches/002_arches_sh.patch create mode 100644 libs/libaio/patches/003_arches_sparc64.patch create mode 100644 libs/libaio/patches/004_arches_x32.patch create mode 100644 libs/libaio/patches/005_arches_mips.patch create mode 100644 libs/libaio/patches/006_arches_mips_fix_padding.patch create mode 100644 libs/libantlr3c/Makefile create mode 100644 libs/libao/Makefile create mode 100644 libs/libarchive/Makefile create mode 100644 libs/libartnet/Makefile create mode 100644 libs/libartnet/patches/001-bswap_16.patch create mode 100644 libs/libaudiofile/Makefile create mode 100644 libs/libaudiofile/patches/010-gcc6-fix-left-shift-negative-number.patch create mode 100644 libs/libaudiofile/patches/020-remove-tests-examples-docs.patch create mode 100644 libs/libaudiofile/patches/030-CVE-2015-7747.patch create mode 100644 libs/libaudiofile/patches/110-Always-check-the-number-of-coefficients.patch create mode 100644 libs/libaudiofile/patches/120-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch create mode 100644 libs/libaudiofile/patches/130-Check-for-multiplication-overflow-in-sfconvert.patch create mode 100644 libs/libaudiofile/patches/140-Actually-fail-when-error-occurs-in-parseFormat.patch create mode 100644 libs/libaudiofile/patches/150-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch create mode 100644 libs/libaudiofile/patches/160-Fix-signature-of-multiplyCheckOverflow.patch create mode 100644 libs/libaudiofile/patches/170-Check-for-division-by-zero-in-BlockCodec.patch create mode 100644 libs/libavl/Makefile create mode 100644 libs/libavl/patches/010-update_GNUmakefile.patch create mode 100644 libs/libcanfestival/Makefile create mode 100644 libs/libcanfestival/patches/001-sigval-ref-fix.patch create mode 100644 libs/libcanfestival/patches/002-makefile-gcc-linker.patch create mode 100644 libs/libcanfestival/patches/003-makefile-skip-examples.patch create mode 100644 libs/libcanfestival/patches/004-override-cflags.patch create mode 100644 libs/libcap/Makefile create mode 100644 libs/libcap/patches/100-portability.patch create mode 100644 libs/libcap/patches/200-change-hardcoded-shell-to-sh.patch create mode 100644 libs/libcoap/Makefile create mode 100644 libs/libdaemon/Makefile create mode 100644 libs/libdaemon/patches/001-daemon_set_verbosity.patch create mode 100644 libs/libdaq/Makefile create mode 100644 libs/libdaq/patches/001-compile.patch create mode 100644 libs/libdaq/patches/100-musl-compat.patch create mode 100644 libs/libdbi-drivers/Makefile create mode 100644 libs/libdbi-drivers/patches/001_libsqlite3_fix.patch create mode 100644 libs/libdbi-drivers/patches/100-remove-date-to-fix-reproducible-builds.patch create mode 100644 libs/libdbi/Makefile create mode 100644 libs/libdmapsharing/Makefile create mode 100644 libs/libdmapsharing/patches/001-disable_pixbuf.patch create mode 100644 libs/libdmapsharing/patches/002-disable_tests.patch create mode 100644 libs/libdnet/Makefile create mode 100644 libs/libdnet/patches/001-compile.patch create mode 100644 libs/libdnet/patches/002-config.patch create mode 100644 libs/libdouble-conversion/Makefile create mode 100644 libs/libdrm/Makefile create mode 100644 libs/libdrm/patches/000-remove-dep-on-pthread-stubs.patch create mode 100644 libs/libedit/Makefile create mode 100644 libs/libesmtp/Makefile create mode 100644 libs/libestr/Makefile create mode 100644 libs/libev/Makefile create mode 100644 libs/libevdev/Makefile create mode 100644 libs/libevdev/patches/010-no-clock-monotonic-raw-in-uclibc.patch create mode 100644 libs/libevhtp/Makefile create mode 100644 libs/libevhtp/patches/010-strcmp-endianness-fix.patch create mode 100644 libs/libexif/Makefile create mode 100644 libs/libexif/patches/100-no_doc.patch create mode 100644 libs/libextractor/Makefile create mode 100644 libs/libfastjson/Makefile create mode 100644 libs/libffi/Makefile create mode 100644 libs/libffi/patches/002-fix-toolexeclibdir-path.patch create mode 100644 libs/libffi/patches/100-fix_mips_softfloat.patch create mode 100644 libs/libfmt/Makefile create mode 100644 libs/libftdi/Makefile create mode 100644 libs/libftdi/patches/100-fix-x86_64-build.patch create mode 100644 libs/libftdi/patches/101-fix-cmake-version-packagekit.patch create mode 100644 libs/libftdi/patches/102-fix-cmake-include-examples.patch create mode 100644 libs/libftdi1/Makefile create mode 100644 libs/libftdi1/patches/100-fix-x86_64-build.patch create mode 100644 libs/libgcrypt/Makefile create mode 100644 libs/libgcrypt/patches/001-no_docs_tests.patch create mode 100644 libs/libgcrypt/patches/002-Add-configure-option-enable-build-timestamp.patch create mode 100644 libs/libgd/Makefile create mode 100644 libs/libgd/patches/101-gdlib-config.patch create mode 100644 libs/libgd/patches/102-gdlib-pc-in.patch create mode 100644 libs/libgd/patches/200-uclibc-ceill.patch create mode 100644 libs/libgee/Makefile create mode 100644 libs/libgee/patches/libgee-0.18.0-no-introspection.patch create mode 100644 libs/libglog/Makefile create mode 100644 libs/libgpg-error/Makefile create mode 100644 libs/libgpg-error/patches/001-gcc5.patch create mode 100644 libs/libgphoto2/Makefile create mode 100644 libs/libgphoto2/patches/001-automake-compat.patch create mode 100644 libs/libgphoto2/patches/002-no-docs-examples-test-translations.patch create mode 100644 libs/libgpiod/Makefile create mode 100644 libs/libhttp-parser/Makefile create mode 100644 libs/libical/Makefile create mode 100644 libs/libid3tag/Makefile create mode 100644 libs/libidn/Makefile create mode 100644 libs/libidn/patches/010-fix-idn-error-usage.patch create mode 100644 libs/libidn2/Makefile create mode 100644 libs/libiio/Makefile create mode 100644 libs/libiio/files/iiod.init create mode 100644 libs/libimobiledevice/Makefile create mode 100644 libs/libinput/Makefile create mode 100644 libs/libinput/patches/001-no-locale.patch create mode 100644 libs/libinput/patches/002-static_assert.patch create mode 100644 libs/libjpeg/Makefile create mode 100644 libs/liblo/Makefile create mode 100644 libs/liblo/patches/001-fix-musl-include.patch create mode 100644 libs/liblz4/Makefile create mode 100644 libs/libmad/Makefile create mode 100644 libs/libmad/patches/001-mips_removal_h_constraint.patch create mode 100644 libs/libmcrypt/Makefile create mode 100644 libs/libmicrohttpd/Makefile create mode 100644 libs/libmms/Makefile create mode 100644 libs/libmms/patches/010-remove_glib_from_pkgconfig.patch create mode 100644 libs/libmodbus/Makefile create mode 100644 libs/libmpdclient/Makefile create mode 100644 libs/libmpeg2/Makefile create mode 100644 libs/libmpeg2/patches/101-ppc_no_altivec.patch create mode 100644 libs/libmpeg2/patches/102-arm_data_preload_check.patch create mode 100644 libs/libmraa/Makefile create mode 100644 libs/libmraa/patches/0001-base.patch create mode 100644 libs/libmraa/patches/0002-add-mips-support.patch create mode 100644 libs/libmraa/patches/0003-uart.patch create mode 100644 libs/libmraa/patches/0004-fixes.patch create mode 100644 libs/libnatpmp/Makefile create mode 100644 libs/libnatpmp/patches/001-install_declspec.patch create mode 100644 libs/libndpi/Makefile create mode 100644 libs/libnet-1.2.x/Makefile create mode 100644 libs/libnet-1.2.x/patches/100-musl-compat.patch create mode 100644 libs/libnetconf2/Makefile create mode 100644 libs/libnetfilter-acct/Makefile create mode 100644 libs/libnopoll/Makefile create mode 100644 libs/libnopoll/patches/001-param_h_rename.patch create mode 100644 libs/libogg/Makefile create mode 100644 libs/liboil/Makefile create mode 100644 libs/liboping/Makefile create mode 100644 libs/liboping/patches/01-no-werror.patch create mode 100644 libs/libowfat/Makefile create mode 100644 libs/libowfat/patches/001-fixbuild.patch create mode 100644 libs/libp11/Makefile create mode 100644 libs/libp11/patches/001-fix-install.patch create mode 100644 libs/libpam/Makefile create mode 100644 libs/libpam/files/pam.conf create mode 100644 libs/libpam/files/pam.d/common-account create mode 100644 libs/libpam/files/pam.d/common-auth create mode 100644 libs/libpam/files/pam.d/common-password create mode 100644 libs/libpam/files/pam.d/common-session create mode 100644 libs/libpam/files/pam.d/common-session-noninteractive create mode 100644 libs/libpam/files/pam.d/other create mode 100644 libs/libpam/patches/0001-build-always-use-lib-instead-of-lib64.patch create mode 100644 libs/libpam/patches/0002-build-ignore-pam_rhosts-if-neither-ruserok-nor-ruser.patch create mode 100644 libs/libpam/patches/0003-build-ignore-pam_lastlog-when-logwtmp-is-not-availab.patch create mode 100644 libs/libpam/patches/0004-build-fix-build-when-crypt-is-not-part-of-crypt_libs.patch create mode 100644 libs/libpam/patches/0005-build-fix-doc-build.patch create mode 100644 libs/libpam/patches/0006-pam_unix-fix-compilation-in-case-rpc-rpc.h-is-missin.patch create mode 100644 libs/libpam/patches/0007-Check-if-innetgr-is-available-at-compile-time.patch create mode 100644 libs/libplist/Makefile create mode 100644 libs/libpng/Makefile create mode 100644 libs/libpng/patches/100-config_fix.patch create mode 100644 libs/libpng/patches/101-old-libtool.patch create mode 100644 libs/libradcli/Config.in create mode 100644 libs/libradcli/Makefile create mode 100644 libs/libredblack/Makefile create mode 100644 libs/libsamplerate/Makefile create mode 100644 libs/libsearpc/Makefile create mode 100644 libs/libseccomp/Makefile create mode 100644 libs/libseccomp/patches/100-dont-use-linux-prctl.h-with-musl.patch create mode 100644 libs/libshout/Makefile create mode 100644 libs/libshout/patches/100-add_with-openssl_option.patch create mode 100644 libs/libshout/patches/120-vorbis-c.patch create mode 100644 libs/libshout/patches/140-no_example_doc_win32.patch create mode 100644 libs/libsigc++/Makefile create mode 100644 libs/libsigc++/patches/001-no_doc_tests_examples.patch create mode 100644 libs/libsndfile/Makefile create mode 100644 libs/libsoc/Makefile create mode 100644 libs/libsodium/Makefile create mode 100644 libs/libsoup/Makefile create mode 100644 libs/libsoxr/Makefile create mode 100644 libs/libsoxr/patches/010-Remove_automatic_avutil_inclusion.patch create mode 100644 libs/libssh/Makefile create mode 100644 libs/libssh/patches/001-compile.patch create mode 100644 libs/libssh/patches/002-disable-libssp.patch create mode 100644 libs/libssh2/Config.in create mode 100644 libs/libssh2/Makefile create mode 100644 libs/libssh2/patches/01-fix-acinclude-m4.patch create mode 100644 libs/libstrophe/Config.in create mode 100644 libs/libstrophe/Makefile create mode 100644 libs/libtalloc/Makefile create mode 100644 libs/libtasn1/Makefile create mode 100644 libs/libtheora/Makefile create mode 100644 libs/libtheora/patches/001-no_docs_tests.patch create mode 100644 libs/libtheora/patches/002-no_sdl_check.patch create mode 100644 libs/libtins/Makefile create mode 100644 libs/libtirpc/Makefile create mode 100644 libs/libtirpc/patches/01-Disable-parts-of-TIRPC-requiring-NIS-support.patch create mode 100644 libs/libtirpc/patches/02-uClibc-without-RPC-support-and-musl-does-not-install-rpcent.h.patch create mode 100644 libs/libtirpc/patches/03-Disable-DES-authentification-support.patch create mode 100644 libs/libtirpc/patches/04-musl-rpc-fix-types.h.patch create mode 100644 libs/libtorrent/Makefile create mode 100644 libs/libtorrent/patches/100-fix_cross_compile.patch create mode 100644 libs/libudev-fbsd/Makefile create mode 100644 libs/libudev-fbsd/patches/001-fix-unused.patch create mode 100644 libs/libudev-fbsd/patches/002-replace-nitems.patch create mode 100644 libs/libudev-fbsd/patches/003-add-pkg-config-description.patch create mode 100644 libs/libudev-fbsd/patches/005-extern-c.patch create mode 100644 libs/libudev-fbsd/patches/100-add-stub-udev_device_get_driver.patch create mode 100644 libs/libudev-fbsd/patches/101-add-stub-udev_device_new_from_subsystem_sysname.patch create mode 100644 libs/libudev-fbsd/patches/102-add-stub-udev_enumerate_add_nomatch_sysattr.patch create mode 100644 libs/libuecc/Makefile create mode 100644 libs/libugpio/Makefile create mode 100755 libs/libuhttpd/Makefile create mode 100644 libs/libunistring/Makefile create mode 100644 libs/libupm/Makefile create mode 100644 libs/libupm/patches/001-version.patch create mode 100644 libs/libupm/patches/002-at42qt1070-id.patch create mode 100644 libs/libupm/patches/003-lsm303-args.patch create mode 100644 libs/libupnp/Makefile create mode 100644 libs/libupnpp/Makefile create mode 100644 libs/liburcu/Makefile create mode 100644 libs/libusbmuxd/Makefile create mode 100644 libs/libuv/Makefile create mode 100644 libs/libuvc/Makefile create mode 100755 libs/libuwsc/Makefile create mode 100644 libs/libv4l/Makefile create mode 100644 libs/libv4l/patches/020-add-missing-includes.patch create mode 100644 libs/libv4l/patches/030-dont-call-getsubopt.patch create mode 100644 libs/libvorbis/Makefile create mode 100644 libs/libvorbisidec/Makefile create mode 100644 libs/libvpx/Makefile create mode 100644 libs/libwebsockets/Makefile create mode 100644 libs/libwebsockets/patches/001-CMakeLists-build-reproducible-by-default.patch create mode 100644 libs/libx264/Makefile create mode 100644 libs/libxerces-c/Makefile create mode 100644 libs/libxerces-c/patches/0001-fix-configure-cross-compiling.patch create mode 100644 libs/libxml2/Makefile create mode 100644 libs/libxml2/patches/010-CVE-2018-9251.patch create mode 100644 libs/libxslt/Makefile create mode 100644 libs/libyaml-cpp/Makefile create mode 100644 libs/libyang/Makefile create mode 100644 libs/libyang/patches/001-fix-musl-issue.patch create mode 100644 libs/libzdb/Makefile create mode 100644 libs/libzdb/patches/010-cross-compile-fixes.patch create mode 100644 libs/libzdb/patches/020-filterh-use-host-built-version.patch create mode 100644 libs/loudmouth/Makefile create mode 100644 libs/loudmouth/patches/001-allow-disable-libidn.patch create mode 100644 libs/loudmouth/patches/900-disable-docs-examples-tests.patch create mode 100644 libs/lttng-ust/Makefile create mode 100644 libs/lttng-ust/patches/001-no_docs_tests.patch create mode 100644 libs/lttng-ust/patches/002-examples.patch create mode 100644 libs/mtdev/Makefile create mode 100644 libs/musl-fts/Makefile create mode 100644 libs/mxml/Makefile create mode 100644 libs/mxml/patches/001-targets.patch create mode 100644 libs/nacl/Makefile create mode 100755 libs/nacl/do-openwrt create mode 100644 libs/neon/Makefile create mode 100644 libs/opencv/Makefile create mode 100644 libs/opencv/README.md create mode 100644 libs/openldap/Makefile create mode 100644 libs/openldap/files/ldap.init create mode 100644 libs/openldap/patches/001-automake-compat.patch create mode 100644 libs/openldap/patches/002-no-doc-and-tests-subdir.patch create mode 100644 libs/openldap/patches/020-autofs-schema.patch create mode 100644 libs/openldap/patches/110-reproducible-builds.patch create mode 100644 libs/openldap/patches/750-no-strip.patch create mode 100644 libs/opus/Makefile create mode 100644 libs/p11-kit/Makefile create mode 100644 libs/p11-kit/files/opensc.module create mode 100644 libs/pcre/Makefile create mode 100644 libs/pcre2/Makefile create mode 100644 libs/pixman/Makefile create mode 100644 libs/pixman/patches/0004-pixman-fix-detection-of-mips-dspr2.patch create mode 100644 libs/pixman/patches/0005-pixman-arm-neon-assembler-fix.patch create mode 100644 libs/poco/Makefile create mode 100644 libs/poco/patches/100-configure.patch create mode 100644 libs/poco/patches/200-strerror.patch create mode 100644 libs/postgresql/Makefile create mode 100644 libs/postgresql/files/postgresql.config create mode 100644 libs/postgresql/files/postgresql.init create mode 100644 libs/postgresql/files/postgresql.sh create mode 100644 libs/postgresql/patches/001-configure_fixes.patch create mode 100644 libs/postgresql/patches/050-build-contrib.patch create mode 100644 libs/postgresql/patches/200-ranlib.patch create mode 100644 libs/postgresql/patches/800-busybox-default-pager.patch create mode 100644 libs/postgresql/patches/900-pg_ctl-setuid.patch create mode 100644 libs/protobuf-c/Makefile create mode 100644 libs/protobuf/Makefile create mode 100644 libs/psqlodbc/Makefile create mode 100644 libs/pthsem/Makefile create mode 100644 libs/pthsem/patches/001-linux3x-fix.patch create mode 100644 libs/pthsem/patches/002-fix-signal.h create mode 100644 libs/pthsem/patches/003-linux4x-fix.patch create mode 100644 libs/qrencode/Makefile create mode 100644 libs/qrencode/patches/001-add-inline-svg.patch create mode 100644 libs/quasselc/Makefile create mode 100644 libs/quasselc/patches/001-respect-cflags-ldflags.patch create mode 100644 libs/rxtx/Makefile create mode 100755 libs/rxtx/patches/010-acm-devices.patch create mode 100644 libs/sbc/Makefile create mode 100644 libs/speex/Makefile create mode 100644 libs/speexdsp/Makefile create mode 100644 libs/sqlite3/Config.in create mode 100644 libs/sqlite3/Makefile create mode 100644 libs/tcp_wrappers/Makefile create mode 100644 libs/tcp_wrappers/patches/001-debian_subset.patch create mode 100644 libs/tcp_wrappers/patches/002-opt_cflags.patch create mode 100644 libs/tcp_wrappers/patches/003-scaffold_malloc.patch create mode 100644 libs/tcp_wrappers/patches/004-ipv4_prefix.patch create mode 100644 libs/tcp_wrappers/patches/005-no--lnsl-on-musl.patch create mode 100644 libs/tdb/Makefile create mode 100644 libs/tdb/files/tdb.cache.txt create mode 100644 libs/tdb/patches/100-Remove_libbsd_dependency_check.patch create mode 100644 libs/tiff/Makefile create mode 100644 libs/tiff/patches/001-autoconf-compat.patch create mode 100644 libs/tiff/patches/005-fix-ftell-macro.patch create mode 100644 libs/tiff/patches/020-CVE-2018-5784.patch create mode 100644 libs/tiff/patches/021-CVE-2018-7456.patch create mode 100644 libs/tiff/patches/022-CVE-2017-9935.patch create mode 100644 libs/tiff/patches/023-CVE-2017-18013.patch create mode 100644 libs/tiff/patches/024-CVE-2018-8905.patch create mode 100644 libs/tiff/patches/025-CVE-2018-10963.patch create mode 100644 libs/tiff/patches/026-CVE-2017-11613.patch create mode 100644 libs/tinycdb/Makefile create mode 100644 libs/tinycdb/patches/100-Makefile.patch create mode 100644 libs/udns/Makefile create mode 100644 libs/udns/patches/0001-use-autotools.patch create mode 100644 libs/unixodbc/Makefile create mode 100644 libs/unixodbc/files/odbc.init create mode 100644 libs/unixodbc/files/unixodbc_conf.h create mode 100644 libs/unixodbc/patches/100-cross-compile-odbc-config.patch create mode 100644 libs/uw-imap/Makefile create mode 100644 libs/uw-imap/patches/001-fix_Makefiles_and_shlib.patch create mode 100644 libs/uw-imap/patches/002-imap-2004a-doc.patch create mode 100644 libs/uw-imap/patches/003-imap-2007e-overflow.patch create mode 100644 libs/uw-imap/patches/005-imap-2007e-authmd5.patch create mode 100644 libs/uw-imap/patches/006-imap-2007f-format-security.patch create mode 100644 libs/uw-imap/patches/007-imap-2007e-poll.patch create mode 100644 libs/vips/Makefile create mode 100644 libs/vips/patches/001-no_introspection.patch create mode 100644 libs/xmlrpc-c/Makefile create mode 100644 libs/xmlrpc-c/patches/001-config.mk.in.patch create mode 100644 libs/xmlrpc-c/patches/002-automake-compat.patch create mode 100644 libs/xr_usb_serial_common/Makefile create mode 100644 libs/yajl/Makefile create mode 100644 libs/yajl/patches/100-link-reformatter-uclibc-libm.patch create mode 100644 libs/yajl/patches/101-link-perf-uclibc-libm.patch create mode 100644 libs/yaml/Makefile create mode 100644 libs/zmq/Makefile create mode 100644 libs/zmq/patches/010-disable_pedantic_on_linux_with_ulibc++.patch create mode 100644 libs/zmq/patches/020-map_with_const_string_with_ublic++.patch create mode 100644 libs/zmq/patches/030-streamoff_missing_with_ulibc++.patch create mode 100644 libs/zmq/patches/040-fix_GNUC_conditional_for_GCC5.patch create mode 100644 libs/zmq/patches/100-fix-cxx-include-order.patch create mode 100644 mail/alpine/Makefile create mode 100644 mail/alpine/patches/100-no-openssl-check-cross-compile.patch create mode 100644 mail/bogofilter/Makefile create mode 100755 mail/bogofilter/files/postfix-bogofilter create mode 100644 mail/clamsmtp/Makefile create mode 100644 mail/clamsmtp/files/clamsmtpd.init create mode 100644 mail/dovecot/Makefile create mode 100644 mail/dovecot/files/dovecot.init create mode 100644 mail/dovecot/patches/001-configure_in.patch create mode 100644 mail/emailrelay/Makefile create mode 100644 mail/emailrelay/files/emailrelay.auth create mode 100644 mail/emailrelay/files/emailrelay.config create mode 100644 mail/emailrelay/files/emailrelay.init create mode 100644 mail/emailrelay/patches/010-ssl3-fix.patch create mode 100644 mail/fdm/Config.in create mode 100644 mail/fdm/Makefile create mode 100644 mail/fdm/files/etc/fdm.conf create mode 100644 mail/fdm/patches/010-Compat-fixes-from-Rosen-Penev.patch create mode 100644 mail/fdm/patches/020-Fix-compile-with-OpenSSL-1.1.0.patch create mode 100644 mail/fdm/patches/040-openssl-1.1.patch create mode 100644 mail/greyfix/Makefile create mode 100644 mail/greyfix/patches/100-ignore_cross_compile_test.patch create mode 100644 mail/mailman/Makefile create mode 100644 mail/mailman/files/mailman.init create mode 100644 mail/mailman/patches/100-postfix.patch create mode 100644 mail/mailman/patches/200-nohostdnspython.patch create mode 100644 mail/mailman/patches/300-targetpython.patch create mode 100644 mail/mailman/patches/400-modules.patch create mode 100644 mail/mailsend/Makefile create mode 100644 mail/msmtp-scripts/Makefile create mode 100644 mail/msmtp-scripts/files/msmtpq-ng-mta.init create mode 100644 mail/msmtp-scripts/files/msmtpq-ng.rc create mode 100644 mail/msmtp/Makefile create mode 100644 mail/mutt/Makefile create mode 100644 mail/mutt/patches/0001-no-po.patch create mode 100644 mail/nail/Makefile create mode 100644 mail/nail/patches/100-handle-openssl-without-sslv2-sslv3.patch create mode 100644 mail/opendkim/Makefile create mode 100644 mail/opendkim/files/opendkim-genkey create mode 100644 mail/opendkim/files/opendkim.conf.simple create mode 100755 mail/opendkim/files/opendkim.init create mode 100644 mail/pigeonhole/Makefile create mode 100644 mail/postfix/Makefile create mode 100644 mail/postfix/files/postfix.init create mode 100644 mail/postfix/patches/100-fsstat.patch create mode 100644 mail/postfix/patches/200-manpages.patch create mode 100644 mail/postfix/patches/300-bdb_hash_segfault.patch create mode 100644 mail/postfix/patches/400-cdb.patch create mode 100644 mail/postfix/patches/500-crosscompile.patch create mode 100644 mail/postfix/patches/501-include_stdio.patch create mode 100644 mail/postfix/patches/600-nopostconf.patch create mode 100644 mail/postfix/patches/700-defaultconfig.patch create mode 100644 mail/postfix/patches/800-fmt.patch create mode 100644 mail/postfix/patches/900_less_overlayfs_rewrites.patch create mode 100644 mail/sendmail/Makefile create mode 100644 mail/sendmail/files/OpenWrt create mode 100644 mail/sendmail/files/lm_getver.c create mode 100644 mail/sendmail/files/sharedlibrary.m4 create mode 100644 mail/sendmail/files/site.OpenWrt.m4 create mode 100644 mail/sendmail/patches/010-enable-nonroot-install.patch create mode 100644 mail/sendmail/patches/011-libmilter-so-version.patch create mode 100644 mail/sendmail/patches/100-misc-os-musl-fixes.patch create mode 100644 mail/sendmail/patches/101-fix-format-security.patch create mode 100644 mail/sendmail/patches/102-pthreads-stack-size.patch create mode 100644 mail/sendmail/patches/103-create-install-dirs.patch create mode 100644 mail/ssmtp/Makefile create mode 100644 mail/ssmtp/patches/002-fix_pointer.patch create mode 100644 mail/ssmtp/patches/004-remove_dead-letter.patch create mode 100644 mail/ssmtp/patches/006-add_ip-header.patch create mode 100644 mail/ssmtp/patches/008-remove_garbage.patch create mode 100644 mail/ssmtp/patches/010-fix_message-header.patch create mode 100644 multimedia/crtmpserver/Makefile create mode 100644 multimedia/crtmpserver/files/crtmpserver.init create mode 100644 multimedia/crtmpserver/patches/010-link-crypt-for-lua.patch create mode 100644 multimedia/crtmpserver/patches/020-add-rpath.patch create mode 100644 multimedia/crtmpserver/patches/030-default-config.patch create mode 100644 multimedia/crtmpserver/patches/040-use-select.patch create mode 100644 multimedia/crtmpserver/patches/050-add-missing-make-defines.patch create mode 100644 multimedia/crtmpserver/patches/060-add-missing-includes.patch create mode 100644 multimedia/crtmpserver/patches/070-missing-include-gcc-47.patch create mode 100644 multimedia/crtmpserver/patches/080-disable-apple-streaming.patch create mode 100644 multimedia/crtmpserver/patches/080-musl-uint32_t.patch create mode 100644 multimedia/ffmpeg/Config.in create mode 100644 multimedia/ffmpeg/Makefile create mode 100644 multimedia/fswebcam/Makefile create mode 100644 multimedia/gphoto2/Makefile create mode 100644 multimedia/gphoto2/patches/001-automake-compat.patch create mode 100644 multimedia/gphoto2/patches/002-no-docs-test.patch create mode 100644 multimedia/grilo-plugins/Makefile create mode 100644 multimedia/grilo-plugins/patches/001-grilo-plugins-0.3.5-no-itstool-xmllint.patch create mode 100644 multimedia/grilo/Makefile create mode 100644 multimedia/grilo/files/grilo-0.3.vapi create mode 100644 multimedia/grilo/files/grilo-net-0.3.vapi create mode 100644 multimedia/gst1-libav/Config.in create mode 100644 multimedia/gst1-libav/Makefile create mode 100644 multimedia/gst1-plugins-bad/Makefile create mode 100644 multimedia/gst1-plugins-bad/patches/001-no-translations.patch create mode 100644 multimedia/gst1-plugins-bad/patches/002-no-tests.patch create mode 100644 multimedia/gst1-plugins-base/Makefile create mode 100644 multimedia/gst1-plugins-base/patches/001-no-translations.patch create mode 100644 multimedia/gst1-plugins-base/patches/002-no-tests.patch create mode 100644 multimedia/gst1-plugins-base/patches/003-no-docs.patch create mode 100644 multimedia/gst1-plugins-good/Makefile create mode 100644 multimedia/gst1-plugins-good/patches/001-no-translations.patch create mode 100644 multimedia/gst1-plugins-good/patches/002-no-tests.patch create mode 100644 multimedia/gst1-plugins-good/patches/003-no-docs.patch create mode 100644 multimedia/gst1-plugins-ugly/Makefile create mode 100644 multimedia/gst1-plugins-ugly/patches/001-no-translations.patch create mode 100644 multimedia/gst1-plugins-ugly/patches/002-no-tests.patch create mode 100644 multimedia/gst1-plugins-ugly/patches/003-no-docs.patch create mode 100644 multimedia/gstreamer1/Makefile create mode 100644 multimedia/gstreamer1/patches/001-no-translations.patch create mode 100644 multimedia/gstreamer1/patches/002-no-tests.patch create mode 100644 multimedia/gstreamer1/patches/003-no-docs.patch create mode 100644 multimedia/gstreamer1/patches/010-gstplugin-use-lazy-symbol-binding.patch create mode 100644 multimedia/icecast/Makefile create mode 100755 multimedia/icecast/files/icecast.init create mode 100644 multimedia/icecast/patches/001-icecast-2.4.0-tremor.patch create mode 100644 multimedia/icecast/patches/005-no_examples_doc_win32.patch create mode 100644 multimedia/icecast/patches/010-fix_libcurl_test_crap.patch create mode 100644 multimedia/icecast/patches/015-add_with-openssl_option.patch create mode 100644 multimedia/icecast/patches/020-icecast_config_for_openwrt.patch create mode 100644 multimedia/ices/Makefile create mode 100644 multimedia/lcdgrilo/Makefile create mode 100644 multimedia/lcdgrilo/files/lcdgrilo.init create mode 100644 multimedia/minidlna/Makefile create mode 100644 multimedia/minidlna/files/minidlna.config create mode 100644 multimedia/minidlna/files/minidlna.init create mode 100644 multimedia/minidlna/patches/002-dont-build-po-files.patch create mode 100644 multimedia/mjpg-streamer/Config.in create mode 100644 multimedia/mjpg-streamer/Makefile create mode 100644 multimedia/mjpg-streamer/files/mjpg-streamer.config create mode 100644 multimedia/mjpg-streamer/files/mjpg-streamer.hotplug create mode 100644 multimedia/mjpg-streamer/files/mjpg-streamer.init create mode 100644 multimedia/mjpg-streamer/patches/005-musl_compatibility.patch create mode 100644 multimedia/mjpg-streamer/patches/010-enable_additional_plugins.patch create mode 100644 multimedia/mjpg-streamer/patches/020-remove_gcc_debug_options.patch create mode 100644 multimedia/mjpg-streamer/patches/030-allow_16_char_device_names.patch create mode 100644 multimedia/mjpg-streamer/patches/035-remove_build_date-time.patch create mode 100644 multimedia/mjpg-streamer/patches/040-Buffer-the-bytesused-variable-from-struct-v4l2_buffe.patch create mode 100644 multimedia/mjpg-streamer/patches/041-Stop-leaking-data-via-struct-v4l2_buffer.patch create mode 100644 multimedia/mjpg-streamer/patches/050-fix-yuv-capture.patch create mode 100644 multimedia/mjpg-streamer/patches/060-fix-sigtrap-in-v4l2uvc.patch create mode 100644 multimedia/motion/Makefile create mode 100644 multimedia/motion/patches/100-musl-compat.patch create mode 100644 multimedia/oggfwd/Makefile create mode 100644 multimedia/tvheadend/Config.in create mode 100644 multimedia/tvheadend/Makefile create mode 100644 multimedia/tvheadend/files/tvheadend.config create mode 100644 multimedia/tvheadend/files/tvheadend.init create mode 100644 multimedia/v4l2rtspserver/Makefile create mode 100644 multimedia/v4l2rtspserver/files/config.openwrt create mode 100644 multimedia/v4l2rtspserver/files/v4l2rtspserver.config create mode 100644 multimedia/v4l2rtspserver/files/v4l2rtspserver.init create mode 100644 multimedia/xupnpd/Makefile create mode 100644 multimedia/xupnpd/files/xupnpd.init create mode 100644 multimedia/xupnpd/patches/100-default_config.patch create mode 100644 multimedia/xupnpd/patches/101-root_dir_param.patch create mode 100644 multimedia/youtube-dl/Makefile create mode 100644 net/acme/Makefile create mode 100644 net/acme/files/acme-cbi.lua create mode 100644 net/acme/files/acme-controller.lua create mode 100644 net/acme/files/acme.config create mode 100644 net/acme/files/acme.init create mode 100644 net/acme/files/run.sh create mode 100644 net/acme/files/uci-defaults-acme create mode 100644 net/adblock/Makefile create mode 100644 net/adblock/files/README.md create mode 100644 net/adblock/files/adblock.blacklist create mode 100644 net/adblock/files/adblock.conf create mode 100755 net/adblock/files/adblock.init create mode 100644 net/adblock/files/adblock.notify create mode 100755 net/adblock/files/adblock.sh create mode 100644 net/adblock/files/adblock.whitelist create mode 100644 net/addrwatch/Makefile create mode 100644 net/addrwatch/files/addrwatch.config create mode 100644 net/addrwatch/files/addrwatch.init create mode 100644 net/addrwatch/patches/001-fix-sys_siglist.patch create mode 100644 net/addrwatch/patches/002-fix-uclibc-sysconf.patch create mode 100644 net/aggregate/Makefile create mode 100644 net/aircrack-ng/Makefile create mode 100644 net/announce/Makefile create mode 100644 net/apache/Config.in create mode 100644 net/apache/Makefile create mode 100644 net/apache/patches/001-Makefile_in.patch create mode 100644 net/apache/patches/002-test_char_h.patch create mode 100644 net/apache/patches/003-logdir_fix.patch create mode 100644 net/apache/patches/004-pidfile_fix.patch create mode 100644 net/apache/patches/005-httpd_conf.patch create mode 100644 net/apache/patches/010-reproducible-builds.patch create mode 100644 net/apcupsd/Makefile create mode 100644 net/apcupsd/files/apccontrol create mode 100644 net/apcupsd/files/apcupsd.conf create mode 100644 net/apcupsd/files/apcupsd.css create mode 100644 net/apcupsd/files/apcupsd.init create mode 100644 net/apcupsd/files/apcupsd_mail.conf create mode 100644 net/apcupsd/files/changeme create mode 100644 net/apcupsd/files/commfailure create mode 100644 net/apcupsd/files/commok create mode 100644 net/apcupsd/files/hosts.conf create mode 100644 net/apcupsd/files/multimon.conf create mode 100644 net/apcupsd/files/offbattery create mode 100644 net/apcupsd/files/onbattery create mode 100644 net/apcupsd/patches/010-fix-usb.patch create mode 100644 net/apinger/Makefile create mode 100644 net/apinger/files/apinger.init create mode 100644 net/apinger/patches/001-autoreconf.patch create mode 100644 net/apinger/patches/002-run_as_user.patch create mode 100644 net/apinger/patches/003-no_docs.patch create mode 100644 net/aria2/Config.in create mode 100644 net/aria2/Makefile create mode 100644 net/aria2/files/aria2.conf create mode 100755 net/aria2/files/aria2.init create mode 100644 net/ariang/Makefile create mode 100644 net/arp-scan/Makefile create mode 100644 net/arp-scan/patches/001-cross_compile.patch create mode 100644 net/atftp/Makefile create mode 100644 net/atftp/patches/01-missing-u_char-type-patch.patch create mode 100644 net/atftp/patches/02-fix-invalid-read-in-tftp_send_request.patch create mode 100644 net/atftp/patches/03-Fix-undefined-reference-linker-errors.patch create mode 100644 net/autossh/Makefile create mode 100644 net/autossh/files/autossh.config create mode 100644 net/autossh/files/autossh.hotplug create mode 100644 net/autossh/files/autossh.init create mode 100644 net/bcp38/Makefile create mode 100644 net/bcp38/files/bcp38.config create mode 100644 net/bcp38/files/bcp38.defaults create mode 100755 net/bcp38/files/bcp38.init create mode 100755 net/bcp38/files/run.sh create mode 100644 net/beanstalkd/Makefile create mode 100644 net/beanstalkd/files/beanstalkd.init create mode 100644 net/beanstalkd/patches/900-makefile.patch create mode 100644 net/beanstalkd/patches/901-fix-headers.patch create mode 100644 net/beanstalkd/patches/902-replace-posix_fallocate.patch create mode 100644 net/bind/Config.in create mode 100644 net/bind/Makefile create mode 100644 net/bind/files/bind/db.0 create mode 100644 net/bind/files/bind/db.127 create mode 100644 net/bind/files/bind/db.255 create mode 100644 net/bind/files/bind/db.local create mode 100644 net/bind/files/bind/db.root create mode 100644 net/bind/files/bind/named.conf.example create mode 100644 net/bind/files/named.init create mode 100644 net/bind/patches/001-no-tests.patch create mode 100644 net/bind/patches/002-autoconf-ar-fix.patch create mode 100644 net/bitlbee/Makefile create mode 100644 net/bmon/Makefile create mode 100644 net/bridge-utils/Makefile create mode 100644 net/bridge-utils/patches/001-libbridge_cflags.patch create mode 100644 net/bridge-utils/patches/010-fix_struct_in6_addr_usage.patch create mode 100644 net/bridge-utils/patches/100-musl-compat.patch create mode 100644 net/bwm-ng/Config.in create mode 100644 net/bwm-ng/Makefile create mode 100644 net/bwm-ng/patches/001-Use-static-inline-instead-of-inline.patch create mode 100644 net/cgi-io/Makefile create mode 100644 net/cgi-io/src/CMakeLists.txt create mode 100644 net/cgi-io/src/main.c create mode 100644 net/cgi-io/src/multipart_parser.c create mode 100644 net/cgi-io/src/multipart_parser.h create mode 100644 net/chaosvpn/Makefile create mode 100755 net/chaosvpn/files/chaosvpn.hotplug create mode 100755 net/chaosvpn/files/chaosvpn.init create mode 100644 net/chrony/Makefile create mode 100644 net/chrony/files/chrony.conf create mode 100644 net/chrony/files/chrony.config create mode 100644 net/chrony/files/chrony.hotplug create mode 100644 net/chrony/files/chronyd.init create mode 100644 net/chrony/patches/001-freebind_uclibc.patch create mode 100644 net/cifs-utils/Makefile create mode 100644 net/cifs-utils/patches/010-no-libtalloc.patch create mode 100644 net/clamav/Makefile create mode 100644 net/clamav/files/bytecode.cvd create mode 100644 net/clamav/files/clamav.config create mode 100644 net/clamav/files/clamav.init create mode 100644 net/clamav/files/freshclam.config create mode 100644 net/clamav/files/freshclam.init create mode 100644 net/clamav/patches/001-compile.patch create mode 100644 net/conserver/Makefile create mode 100644 net/conserver/files/conserver.cf create mode 100644 net/conserver/files/conserver.init create mode 100644 net/conserver/files/console.cf create mode 100644 net/conserver/patches/001-remove-strip.patch create mode 100644 net/coova-chilli/Config.in create mode 100644 net/coova-chilli/Makefile create mode 100644 net/coova-chilli/files/chilli.config create mode 100644 net/coova-chilli/files/chilli.firewall create mode 100644 net/coova-chilli/files/chilli.hotplug create mode 100644 net/coova-chilli/files/chilli.init create mode 100644 net/coova-chilli/patches/100-fix-sysinfo-redeclaration.patch create mode 100644 net/coova-chilli/patches/200-fix_compile_kmod.patch create mode 100644 net/coova-chilli/patches/201-fix_dereferencing_pointers.patch create mode 100644 net/coova-chilli/patches/300-fix-compile-with-cyassl.patch create mode 100644 net/coova-chilli/patches/400-fix-compile-with-musl.patch create mode 100644 net/coova-chilli/patches/401-fix-compile-misleading-indentation.patch create mode 100644 net/cshark/Makefile create mode 100644 net/daemonlogger/Makefile create mode 100644 net/danish/Makefile create mode 100644 net/darkstat/Makefile create mode 100644 net/darkstat/files/darkstat.config create mode 100755 net/darkstat/files/darkstat.init create mode 100644 net/darkstat/patches/100-do-not-use-NI_IDN.patch create mode 100644 net/davfs2/Makefile create mode 100644 net/davfs2/files/davfs2.conf create mode 100644 net/davfs2/patches/010-main_code_fix.patch create mode 100644 net/davfs2/patches/100-musl-compat.patch create mode 100644 net/davfs2/patches/200-davfs2-1.5.4-no-forced-stack-protector.patch create mode 100644 net/davfs2/patches/300-have_iconv_h.patch create mode 100755 net/ddns-scripts/Makefile create mode 100644 net/ddns-scripts/files/ddns.config create mode 100755 net/ddns-scripts/files/ddns.defaults create mode 100755 net/ddns-scripts/files/ddns.hotplug create mode 100755 net/ddns-scripts/files/ddns.init create mode 100755 net/ddns-scripts/files/dynamic_dns_functions.sh create mode 100755 net/ddns-scripts/files/dynamic_dns_lucihelper.sh create mode 100755 net/ddns-scripts/files/dynamic_dns_updater.sh create mode 100644 net/ddns-scripts/files/services create mode 100644 net/ddns-scripts/files/services_ipv6 create mode 100755 net/ddns-scripts/files/update_cloudflare_com_v4.sh create mode 100755 net/ddns-scripts/files/update_freedns_42_pl.sh create mode 100755 net/ddns-scripts/files/update_godaddy_com_v1.sh create mode 100755 net/ddns-scripts/files/update_no-ip_com.sh create mode 100755 net/ddns-scripts/files/update_nsupdate.sh create mode 100644 net/ddns-scripts/files/update_route53_v1.sh create mode 100644 net/ddns-scripts/samples/ddns.config_sample create mode 100755 net/ddns-scripts/samples/getlocalip_sample.sh create mode 100644 net/ddns-scripts/samples/update_sample.sh create mode 100644 net/dhcp-forwarder/Makefile create mode 100644 net/dhcp-forwarder/files/dhcp-fwd.init create mode 100644 net/dhcpcd/Makefile create mode 100755 net/dhcpcd/files/dhcpcd.init create mode 100644 net/dmapd/Makefile create mode 100644 net/dmapd/files/dmapd.init create mode 100644 net/dmapd/patches/001-dmapd_conf.patch create mode 100644 net/dmapd/patches/002-make_unit_test_optionnal.patch create mode 100755 net/dnscrypt-proxy/Config.in create mode 100644 net/dnscrypt-proxy/Makefile create mode 100644 net/dnscrypt-proxy/files/dnscrypt-proxy.config create mode 100644 net/dnscrypt-proxy/files/dnscrypt-proxy.init create mode 100644 net/dnscrypt-proxy/files/dnscrypt-resolvers.csv create mode 100644 net/dynapoint/Makefile create mode 100644 net/dynapoint/src/dynapoint.config create mode 100644 net/dynapoint/src/dynapoint.init create mode 100644 net/dynapoint/src/dynapoint.lua create mode 100644 net/e2guardian/Makefile create mode 100644 net/e2guardian/files/e2guardian.config create mode 100644 net/e2guardian/files/e2guardian.init create mode 100644 net/e2guardian/files/e2guardianf1.conf create mode 100644 net/esniper/Makefile create mode 100644 net/etherwake/Makefile create mode 100644 net/etherwake/files/etherwake.config create mode 100644 net/etherwake/files/etherwake.init create mode 100644 net/etherwake/patches/100-no_ether_hostton.patch create mode 100644 net/etherwake/patches/110-format_security_fix.patch create mode 100644 net/etherwake/patches/120-musl-compat.patch create mode 100644 net/fakeidentd/Makefile create mode 100644 net/fakeidentd/files/fakeidentd.init create mode 100644 net/fastd/Config.in create mode 100644 net/fastd/Makefile create mode 100644 net/fastd/files/fastd.upgrade create mode 100644 net/foolsm/Makefile create mode 100644 net/foolsm/files/connections.conf create mode 100644 net/foolsm/files/foolsm.conf create mode 100644 net/foolsm/files/foolsm.init create mode 100644 net/foolsm/files/foolsm_script create mode 100644 net/foolsm/patches/100-plugin-export-dir.patch create mode 100644 net/foolsm/patches/110-missing-WAIT_ANY.patch create mode 100644 net/fossil/Makefile create mode 100644 net/fossil/files/fossil.config create mode 100644 net/fossil/files/fossil.init create mode 100644 net/fossil/patches/001-no_https.patch create mode 100644 net/fping/Makefile create mode 100644 net/freeradius3/Config.in create mode 100644 net/freeradius3/Makefile create mode 100644 net/freeradius3/files/radiusd.init create mode 100644 net/freeradius3/patches/001-fix-cert-expiry.patch create mode 100644 net/freeradius3/patches/002-disable-session-cache-CVE-2017-9148.patch create mode 100644 net/fwknop/Config.in create mode 100644 net/fwknop/Makefile create mode 100644 net/fwknop/files/fwknopd create mode 100644 net/fwknop/files/fwknopd.init create mode 100644 net/git/Makefile create mode 100644 net/git/patches/100-configure_for_crosscompiling.patch create mode 100644 net/git/patches/200-imapsend_without_curl.patch create mode 100644 net/gitolite/Makefile create mode 100644 net/gitolite/patches/100-fix-missing-hooks-dir.patch create mode 100644 net/gnunet/Makefile create mode 100644 net/gnunet/files/gnunet-dhtcache-heap.defaults create mode 100644 net/gnunet/files/gnunet-dhtcache-pgsql.defaults create mode 100644 net/gnunet/files/gnunet-dhtcache-sqlite.defaults create mode 100644 net/gnunet/files/gnunet-fs-heap.defaults create mode 100644 net/gnunet/files/gnunet-fs-pgsql.defaults create mode 100644 net/gnunet/files/gnunet-fs-sqlite.defaults create mode 100644 net/gnunet/files/gnunet-gns-flat.defaults create mode 100644 net/gnunet/files/gnunet-gns-pgsql.defaults create mode 100644 net/gnunet/files/gnunet-gns-sqlite.defaults create mode 100644 net/gnunet/files/gnunet-gns.defaults create mode 100644 net/gnunet/files/gnunet-peerstore-flat.defaults create mode 100644 net/gnunet/files/gnunet-peerstore-sqlite.defaults create mode 100644 net/gnunet/files/gnunet-pgsql.defaults create mode 100644 net/gnunet/files/gnunet-proto.sh create mode 100644 net/gnunet/files/gnunet-social-pgsql.defaults create mode 100644 net/gnunet/files/gnunet-social-sqlite.defaults create mode 100644 net/gnunet/files/gnunet-vpn.defaults create mode 100644 net/gnunet/files/gnunet.defaults create mode 100755 net/gnunet/files/gnunet.init create mode 100644 net/gnunet/files/gnunet.upgrade create mode 100644 net/gnurl/Makefile create mode 100644 net/haproxy/Makefile create mode 100644 net/haproxy/files/haproxy.cfg create mode 100644 net/haproxy/files/haproxy.hotplug create mode 100644 net/haproxy/files/haproxy.init create mode 100644 net/haproxy/patches/0001-BUG-MEDIUM-ssl-Dont-always-treat-SSL_ERROR_SYSCALL-as-unrecovarable.patch create mode 100644 net/haproxy/patches/0002-BUG-MEDIUM-ssl-Shutdown-the-connection-for-reading-on-SSL_ERROR_SYSCALL.patch create mode 100644 net/haproxy/patches/0003-BUG-MEDIUM-http-Switch-the-HTTP-response-in-tunnel-mode-as-earlier-as-possible.patch create mode 100644 net/haproxy/patches/0004-BUG-MEDIUM-ssl-sample-ssl_bc_-fetch-keywords-are-broken.patch create mode 100644 net/horst/Makefile create mode 100644 net/horst/horst.config create mode 100755 net/horst/horst.init create mode 100644 net/horst/patches/0001-reproducible-builds.patch create mode 100644 net/htpdate/Makefile create mode 100644 net/htpdate/files/htpdate.conf create mode 100644 net/htpdate/files/htpdate.init create mode 100644 net/htpdate/patches/100-adjtimex.patch create mode 100644 net/htpdate/patches/101-daemon-run-in-foreground.patch create mode 100644 net/httping/Makefile create mode 100644 net/httping/patches/001-no_strip.patch create mode 100644 net/httping/patches/002-fix_compile_warnings.patch create mode 100644 net/httping/patches/003-fix_response_time.patch create mode 100644 net/httping/patches/004-minimize.patch create mode 100644 net/https-dns-proxy/Makefile create mode 100644 net/https-dns-proxy/files/https_dns_proxy.config create mode 100644 net/https-dns-proxy/files/https_dns_proxy.init create mode 100644 net/i2pd/Makefile create mode 100755 net/i2pd/files/i2pd.init create mode 100644 net/ibrdtn-tools/Makefile create mode 100644 net/ibrdtnd/Makefile create mode 100644 net/ibrdtnd/files/build-config.sh create mode 100644 net/ibrdtnd/files/ibrdtn.init create mode 100644 net/ibrdtnd/files/ibrdtn.uci create mode 100644 net/ibrdtnd/files/mkcontainer.sh create mode 100644 net/ibrdtnd/files/mountcontainer.sh create mode 100644 net/ibrdtnd/files/safety-wrapper.sh create mode 100644 net/ibrdtnd/files/systemcheck.sh create mode 100644 net/ifstat/Makefile create mode 100644 net/inadyn/Makefile create mode 100644 net/iodine/Makefile create mode 100644 net/iodine/files/iodined.config create mode 100644 net/iodine/files/iodined.init create mode 100644 net/iodine/patches/010-cross-compile.patch create mode 100644 net/iodine/patches/100-musl-compatibility.patch create mode 100644 net/iodine/patches/101-musl-workaround-incomplete-nameser-h.patch create mode 100644 net/iotivity/Makefile create mode 100644 net/iotivity/files/etc/iotivity/ReadMe.txt create mode 100644 net/iotivity/files/etc/iotivity/oic_svr_db.cbor create mode 100644 net/iotivity/files/etc/iotivity/oic_svr_db.json create mode 100644 net/iotivity/patches/001-no_unit_test.patch create mode 100644 net/iotivity/patches/002-do-not-chck-for-boost.patch create mode 100644 net/iotivity/patches/020-linux-Add-more-architectures.patch create mode 100644 net/iotivity/patches/021-build-do-not-set-TARGET_ARCH-to-default.patch create mode 100644 net/iotivity/patches/022-build-restrict-compiler-options-to-supported-archite.patch create mode 100644 net/iotivity/patches/023-build-take-compiler-options-from-environment.patch create mode 100644 net/iotivity/patches/030-remove-check-for-curl.patch create mode 100644 net/iotivity/patches/040-linux-Use-system-sqlite3.patch create mode 100644 net/iotivity/patches/050-csdk-move-OCEntityHandlerResponse-from-stack-to-heap.patch create mode 100644 net/iotivity/patches/051-csdk-move-OCClientResponse-from-stack-to-heap.patch create mode 100644 net/iotivity/patches/053-src-move-OCClientResponse-from-stack-to-heap.patch create mode 100644 net/iotivity/patches/070-ssl-fix-compilation-against-non-debug-mbedtls.patch create mode 100644 net/iotivity/patches/071-ssl-call-mbedtls_version_get_string-only-if-availabl.patch create mode 100644 net/iotivity/patches/072-ssl-call-mbedtls_ssl_conf_renegotiation-only-if-avai.patch create mode 100644 net/iotivity/patches/075-ssl-enable-usage-of-patched-mbed-functions-condition.patch create mode 100644 net/iotivity/patches/078-use-system-mbedtls.patch create mode 100644 net/iotivity/patches/080-zigbee_wrapper-do-not-check-for-floating-point.patch create mode 100644 net/iotivity/patches/140-remove-glib2.patch create mode 100644 net/iotivity/patches/200-examples-OICMiddle-try-to-load-security-configuratio.patch create mode 100644 net/ipsec-tools/Makefile create mode 100644 net/ipsec-tools/files/functions.sh create mode 100644 net/ipsec-tools/files/p1client-down create mode 100644 net/ipsec-tools/files/p1client-up create mode 100644 net/ipsec-tools/files/racoon create mode 100644 net/ipsec-tools/files/racoon.init create mode 100644 net/ipsec-tools/files/vpnctl create mode 100644 net/ipsec-tools/patches/001-ipsec-tools-def-psk.patch create mode 100644 net/ipsec-tools/patches/001-no_libfl.patch create mode 100644 net/ipsec-tools/patches/002-patch8-utmp.patch create mode 100644 net/ipsec-tools/patches/003-microsoft-fqdn-in-main.patch create mode 100644 net/ipsec-tools/patches/005-isakmp-fix.patch create mode 100644 net/ipsec-tools/patches/006-linux-3.7-compat.patch create mode 100644 net/ipsec-tools/patches/007-force_have_policy_fwd.patch create mode 100644 net/ipsec-tools/patches/008-racoon-fix_dereference_crash.patch create mode 100644 net/ipsec-tools/patches/009-musl-compat.patch create mode 100644 net/ipsec-tools/patches/010-CVE-2016-10396.patch create mode 100644 net/iptraf-ng/Makefile create mode 100644 net/irssi/Makefile create mode 100644 net/isc-dhcp/Makefile create mode 100644 net/isc-dhcp/files/dhclient-script create mode 100644 net/isc-dhcp/files/dhclient.init create mode 100644 net/isc-dhcp/files/dhclient6.conf create mode 100644 net/isc-dhcp/files/dhclient6.init create mode 100644 net/isc-dhcp/files/dhcpd.defaults create mode 100644 net/isc-dhcp/files/dhcpd.init create mode 100644 net/isc-dhcp/files/dhcpd6.conf create mode 100644 net/isc-dhcp/files/dhcpd6.init create mode 100644 net/isc-dhcp/files/dhcrelay.conf create mode 100644 net/isc-dhcp/files/dhcrelay4.init create mode 100644 net/isc-dhcp/files/dhcrelay6.init create mode 100644 net/isc-dhcp/patches/000-compile.patch create mode 100644 net/isc-dhcp/patches/510-bind-CC.patch create mode 100644 net/jool/Makefile create mode 100644 net/kadnode/Config.in create mode 100644 net/kadnode/Makefile create mode 100755 net/kadnode/files/kadnode.config create mode 100755 net/kadnode/files/kadnode.init create mode 100644 net/kadnode/files/kadnode.postinst create mode 100644 net/kadnode/patches/0001-LFLAGS-LDFLAGS.patch create mode 100644 net/keepalived/Makefile create mode 100644 net/keepalived/files/hotplug-user create mode 100644 net/keepalived/files/keepalived.config create mode 100644 net/keepalived/files/keepalived.init create mode 100644 net/keepalived/files/keepalived.user create mode 100644 net/kismet/Makefile create mode 100644 net/kismet/files/kismet.conf create mode 100644 net/kismet/files/kismet_drone.conf create mode 100644 net/kismet/files/kismet_drone.config create mode 100755 net/kismet/files/kismet_drone.init create mode 100644 net/kismet/files/kismet_server.config create mode 100755 net/kismet/files/kismet_server.init create mode 100644 net/kismet/patches/010-dont-add-host-include-paths.patch create mode 100644 net/kismet/patches/020-musl-include-fixes.patch create mode 100644 net/knot/Makefile create mode 100644 net/knot/files/knotd.init create mode 100644 net/knot/files/runtests.sh create mode 100644 net/knot/patches/01_zscanner_tests.patch create mode 100644 net/knot/patches/02_knot.conf.patch create mode 100644 net/knxd/Makefile create mode 100644 net/knxd/files/knxd.config create mode 100644 net/knxd/files/knxd.ini create mode 100644 net/knxd/files/knxd.init create mode 100644 net/knxd/patches/0099-openwrt.patch create mode 100644 net/kplex/Makefile create mode 100644 net/kplex/files/kplex.init create mode 100644 net/krb5/Makefile create mode 100644 net/krb5/files/krb5kdc create mode 100644 net/krb5/patches/001-fix-uninitialized-warning-errors.patch create mode 100644 net/lcdringer/Makefile create mode 100644 net/lcdringer/files/lcdringer.init create mode 100644 net/lftp/Makefile create mode 100644 net/lighttpd/Makefile create mode 100644 net/lighttpd/files/lighttpd.conf create mode 100644 net/lighttpd/files/lighttpd.init create mode 100644 net/lighttpd/patches/0001-core-fix-base64-decode-when-char-is-unsigned-fixes-2.patch create mode 100644 net/linknx/Makefile create mode 100644 net/linknx/files/linknx.config create mode 100644 net/linknx/files/linknx.init create mode 100644 net/linknx/files/linknx.xml.dist create mode 100644 net/linuxptp/Makefile create mode 100644 net/lispmob/Makefile create mode 100644 net/lispmob/patches/001-fix-musl-build.patch create mode 100644 net/lksctp-tools/Makefile create mode 100644 net/mac-telnet/Makefile create mode 100644 net/mac-telnet/files/mactelnet.config create mode 100755 net/mac-telnet/files/mactelnet.init create mode 100644 net/mdnsresponder/Makefile create mode 100644 net/mdnsresponder/files/mDNSResponder.conf create mode 100644 net/mdnsresponder/files/mDNSResponder.init create mode 100755 net/mdnsresponder/files/mdnsd.init create mode 100644 net/mdnsresponder/patches/001-cross_compile.patch create mode 100644 net/mdnsresponder/patches/100-linux_fixes.patch create mode 100644 net/mdnsresponder/patches/114-fix_posix_build.patch create mode 100644 net/mdnsresponder/patches/120-reproducible-builds.patch create mode 100644 net/memcached/Makefile create mode 100644 net/memcached/files/memcached.config create mode 100644 net/memcached/files/memcached.init create mode 100644 net/memcached/patches/100-fix_iov_max.patch create mode 100644 net/mii-tool/Makefile create mode 100644 net/mii-tool/patches/001-mii-tool-4.9-compatibility.patch create mode 100644 net/mikrotik-btest/Makefile create mode 100644 net/mini_snmpd/Makefile create mode 100644 net/mini_snmpd/files/mini_snmpd.config create mode 100644 net/mini_snmpd/files/mini_snmpd.init create mode 100644 net/miniupnpc/Makefile create mode 100644 net/miniupnpc/patches/100-no_minixml_test.patch create mode 100644 net/miniupnpc/patches/200-miniupnpc_desc.patch create mode 100644 net/miniupnpd/Makefile create mode 100644 net/miniupnpd/files/firewall.include create mode 100644 net/miniupnpd/files/miniupnpd.defaults create mode 100644 net/miniupnpd/files/miniupnpd.hotplug create mode 100644 net/miniupnpd/files/miniupnpd.init create mode 100644 net/miniupnpd/files/upnpd.config create mode 100644 net/miniupnpd/patches/100-build-on-OpenWrt.patch create mode 100644 net/mosquitto/Config.in create mode 100644 net/mosquitto/Makefile create mode 100644 net/mosquitto/files/etc/config/mosquitto create mode 100755 net/mosquitto/files/etc/init.d/mosquitto create mode 100644 net/mtr/Makefile create mode 100644 net/mtr/patches/100-disabled-ipv6-fix.patch create mode 100644 net/mwan3/Makefile create mode 100644 net/mwan3/files/etc/config/mwan3 create mode 100644 net/mwan3/files/etc/hotplug.d/iface/14-mwan3 create mode 100644 net/mwan3/files/etc/hotplug.d/iface/15-mwan3 create mode 100644 net/mwan3/files/etc/hotplug.d/iface/16-mwan3-user create mode 100755 net/mwan3/files/etc/init.d/mwan3 create mode 100644 net/mwan3/files/etc/mwan3.user create mode 100644 net/mwan3/files/lib/mwan3/common.sh create mode 100644 net/mwan3/files/lib/mwan3/mwan3.sh create mode 100755 net/mwan3/files/usr/libexec/rpcd/mwan3 create mode 100755 net/mwan3/files/usr/sbin/mwan3 create mode 100755 net/mwan3/files/usr/sbin/mwan3track create mode 100644 net/nbd/Makefile create mode 100644 net/nbd/files/nbd-client.conf create mode 100644 net/nbd/files/nbd-client.init create mode 100644 net/nbd/files/nbd-server.conf create mode 100644 net/nbd/files/nbd-server.init create mode 100644 net/nbd/patches/100-make-gnutls-test-optional.patch create mode 100644 net/nbd/patches/101-fix-build-without-gnutls.patch create mode 100644 net/ncp/Makefile create mode 100644 net/net-snmp/Makefile create mode 100644 net/net-snmp/files/snmpd.conf create mode 100644 net/net-snmp/files/snmpd.init create mode 100644 net/net-snmp/files/snmptrapd.init create mode 100644 net/net-snmp/patches/000-cross-compile.patch create mode 100644 net/net-snmp/patches/100-debian-statistics.patch create mode 100644 net/net-snmp/patches/110-debian-makefiles.patch create mode 100644 net/net-snmp/patches/120-debian-searchdirs.patch create mode 100644 net/net-snmp/patches/130-debian-extramibs.patch create mode 100644 net/net-snmp/patches/160-no_ldconfig.patch create mode 100644 net/net-snmp/patches/170-ldflags.patch create mode 100644 net/net-snmp/patches/750-ieee802dot11.patch create mode 100644 net/net-snmp/patches/900-musl-compat.patch create mode 100644 net/netatalk/Makefile create mode 100644 net/netatalk/files/afpd.init create mode 100644 net/netatalk/patches/001-automake-compat.patch create mode 100644 net/netatalk/patches/002-ld_library_path.patch create mode 100644 net/netcat/Makefile create mode 100644 net/netcat/patches/001-netcat_flag_count.patch create mode 100644 net/netdiscover/Makefile create mode 100644 net/netopeer2/Config_keystored.in create mode 100644 net/netopeer2/Makefile create mode 100644 net/netopeer2/files/netopeer2-keystored-keygen.default create mode 100644 net/netopeer2/files/netopeer2-keystored.default create mode 100644 net/netopeer2/files/netopeer2-server.default create mode 100644 net/netopeer2/files/netopeer2-server.init create mode 100644 net/netopeer2/files/stock_config.xml create mode 100644 net/netopeer2/patches/001-remove-sysrepoctl-commands-from-cmake create mode 100644 net/netopeer2/patches/002-fix-for-cmake-build create mode 100644 net/netperf/Makefile create mode 100644 net/netperf/files/netserver.init create mode 100644 net/nfs-kernel-server/Makefile create mode 100644 net/nfs-kernel-server/files/nfsd.exports create mode 100644 net/nfs-kernel-server/files/nfsd.init create mode 100644 net/nfs-kernel-server/patches/100-no_malloc_h.patch create mode 100644 net/nfs-kernel-server/patches/101-musl-getservbyport.patch create mode 100644 net/nfs-kernel-server/patches/102-limits.patch create mode 100644 net/nginx/Config.in create mode 100644 net/nginx/Makefile create mode 100644 net/nginx/files/nginx.init create mode 100644 net/nginx/patches-lua-nginx/100-no_by_lua_block.patch create mode 100644 net/nginx/patches/101-feature_test_fix.patch create mode 100644 net/nginx/patches/102-sizeof_test_fix.patch create mode 100644 net/nginx/patches/103-sys_nerr.patch create mode 100644 net/nginx/patches/200-config.patch create mode 100644 net/nginx/patches/300-max-processes.patch create mode 100644 net/ngircd/Makefile create mode 100644 net/ngircd/files/ngircd.init create mode 100644 net/nlbwmon/Makefile create mode 100644 net/nlbwmon/files/nlbwmon.config create mode 100755 net/nlbwmon/files/nlbwmon.init create mode 100644 net/nmap/Makefile create mode 100644 net/noddos/Makefile create mode 100644 net/nsd/Makefile create mode 100644 net/nsd/files/nsd.init create mode 100644 net/ntpclient/Makefile create mode 100644 net/ntpclient/files/ntpclient.config create mode 100644 net/ntpclient/files/ntpclient.hotplug create mode 100644 net/ntpclient/patches/100-daemon.patch create mode 100644 net/ntpd/Makefile create mode 100644 net/ntpd/README.md create mode 100644 net/ntpd/files/ntpd.hotplug create mode 100644 net/ntpd/files/ntpd.hotplug-helper create mode 100644 net/ntpd/files/ntpd.init create mode 100644 net/ntpd/files/ntpdate.init create mode 100644 net/ntripcaster/Makefile create mode 100644 net/ntripclient/Makefile create mode 100644 net/ntripclient/patches/100-musl-compat.patch create mode 100644 net/ntripserver/Makefile create mode 100644 net/nut/Config.in create mode 100644 net/nut/Makefile create mode 100644 net/nut/files/add_nut_httpd_conf create mode 100755 net/nut/files/nut-cgi.init create mode 100755 net/nut/files/nut-monitor.init create mode 100644 net/nut/files/nut-sched.default create mode 100755 net/nut/files/nut-sendmail-notify create mode 100644 net/nut/files/nut-sendmail-notify.default create mode 100755 net/nut/files/nut-server.init create mode 100644 net/nut/files/nut.service create mode 100644 net/nut/files/nut_cgi create mode 100644 net/nut/files/nut_monitor create mode 100644 net/nut/files/nut_server create mode 100644 net/nut/patches/0001-Add-compatibility-with-openssl-1.1.0.patch create mode 100644 net/nut/patches/0002-Fix-check-for-empty-string.patch create mode 100644 net/obfsproxy/Makefile create mode 100644 net/obfsproxy/files/obfsproxy.conf create mode 100644 net/obfsproxy/files/obfsproxy.init create mode 100644 net/obfsproxy/patches/001-exclude-tests.patch create mode 100644 net/obfsproxy/patches/002-fix-python-path.patch create mode 100644 net/obfsproxy/patches/003-remove-argparse-dependency-test.patch create mode 100644 net/obfsproxy/patches/004-add-syslog-support.patch create mode 100644 net/ocserv/Config.in create mode 100644 net/ocserv/Makefile create mode 100644 net/ocserv/README create mode 100644 net/ocserv/files/config create mode 100644 net/ocserv/files/ocserv.conf.template create mode 100755 net/ocserv/files/ocserv.init create mode 100644 net/ocserv/files/ocserv.upgrade create mode 100644 net/ola/Makefile create mode 100644 net/ola/files/olad.init create mode 100644 net/ola/patches/001-Eliminate-protobuf-AddDescriptors-call.patch create mode 100644 net/ola/patches/002-remove-visibility-inlines-hidden-flag.patch create mode 100644 net/ola/patches/050-always-force-gnu++11.patch create mode 100644 net/openconnect/Config.in create mode 100644 net/openconnect/Makefile create mode 100644 net/openconnect/README create mode 100755 net/openconnect/files/openconnect-wrapper create mode 100755 net/openconnect/files/openconnect.sh create mode 100644 net/openconnect/files/openconnect.upgrade create mode 100644 net/openconnect/patches/0001-Fix-compilation-with-libp11-version-0.4.7.patch create mode 100644 net/opennhrp/Makefile create mode 100644 net/opennhrp/files/opennhrp.init create mode 100644 net/opennhrp/patches/100-musl-compat.patch create mode 100644 net/openssh/Makefile create mode 100644 net/openssh/files/sftp-ssh.service create mode 100644 net/openssh/files/sshd.init create mode 100644 net/openssh/files/sshd.pam create mode 100644 net/openssh/files/sshd.pam-access create mode 100644 net/openssh/patches/100-dscp-qos.patch create mode 100644 net/opentracker/Makefile create mode 100755 net/opentracker/files/opentracker.init create mode 100755 net/opentracker/files/opentracker6.init create mode 100644 net/opentracker/patches/100-makefile.patch create mode 100644 net/openvswitch/Makefile create mode 100644 net/openvswitch/files/etc/init.d/openvswitch.init create mode 100644 net/openvswitch/patches/0001-musl-compatibility.patch create mode 100644 net/openvswitch/patches/0100-netdev-linux-Use-unsigned-int-for-ifi_flags.patch create mode 100644 net/openvswitch/patches/0101-netdev-linux-Let-interface-flag-survive-internal-por.patch create mode 100644 net/openvswitch/patches/0102-python-separate-host-target-python-for-cross-compile.patch create mode 100644 net/openvswitch/patches/0103-ovs-ctl-fix-setting-hostname.patch create mode 100644 net/openvswitch/patches/0104-ovs-lib-fix-install_dir.patch create mode 100644 net/p910nd/Makefile create mode 100644 net/p910nd/files/p910nd.config create mode 100644 net/p910nd/files/p910nd.init create mode 100644 net/pagekitec/Makefile create mode 100644 net/pagekitec/files/etc/config/pagekitec create mode 100755 net/pagekitec/files/etc/init.d/pagekitec create mode 100644 net/pen/Makefile create mode 100644 net/pingcheck/Makefile create mode 100755 net/pingcheck/pingcheck.init create mode 100644 net/pixiewps/Makefile create mode 100644 net/polipo/Makefile create mode 100644 net/polipo/files/polipo.config create mode 100644 net/polipo/files/polipo.init create mode 100644 net/port-mirroring/Makefile create mode 100644 net/portmap/Makefile create mode 100644 net/portmap/files/portmap.init create mode 100644 net/portmap/patches/101-no_pie.patch create mode 100644 net/pppossh/Makefile create mode 100644 net/pppossh/README.md create mode 100644 net/pppossh/files/pppossh.sh create mode 100644 net/pptpd/Makefile create mode 100644 net/pptpd/files/options.pptpd create mode 100644 net/pptpd/files/pptpd.conf create mode 100644 net/pptpd/files/pptpd.config create mode 100644 net/pptpd/files/pptpd.init create mode 100644 net/pptpd/patches/001-bad_pqueue_debug.patch create mode 100644 net/pptpd/patches/002-makefile_fix.patch create mode 100644 net/pptpd/patches/003-opt_flags.patch create mode 100644 net/pptpd/patches/100-musl-compat.patch create mode 100644 net/privoxy/Config.in create mode 100644 net/privoxy/Makefile create mode 100644 net/privoxy/files/privoxy.config create mode 100644 net/privoxy/files/privoxy.hotplug create mode 100644 net/privoxy/files/privoxy.init create mode 100644 net/privoxy/files/privoxy.upgrade create mode 100644 net/prosody/Makefile create mode 100644 net/prosody/files/prosody.cfg.lua create mode 100644 net/prosody/files/prosody.init create mode 100644 net/quassel-irssi/Makefile create mode 100644 net/quassel-irssi/patches/001-respect-cflags.patch create mode 100644 net/quassel-irssi/patches/002-use-cc-var.patch create mode 100644 net/quassel-irssi/patches/003-use-pkgconfig-ldflags-quasselc.patch create mode 100644 net/radicale/Makefile create mode 100644 net/radicale/files/config.template create mode 100644 net/radicale/files/logging.template create mode 100644 net/radicale/files/radicale.config create mode 100644 net/radicale/files/radicale.hotplug create mode 100755 net/radicale/files/radicale.init create mode 100644 net/radicale/files/radicale.rights create mode 100644 net/radicale/files/radicale.upgrade create mode 100644 net/radicale/files/radicale.users create mode 100644 net/radicale/patches/010-Run-as-user-group-radicale-radicale.patch create mode 100644 net/radsecproxy/Makefile create mode 100644 net/radsecproxy/files/radsecproxy.conf create mode 100644 net/radsecproxy/files/radsecproxy.init create mode 100644 net/radsecproxy/patches/100-missing-return.patch create mode 100644 net/radsecproxy/patches/200-logdest-on-foreground.patch create mode 100644 net/reaver/Makefile create mode 100644 net/redsocks/Makefile create mode 100644 net/redsocks/files/redsocks.conf create mode 100644 net/redsocks/files/redsocks.init create mode 100644 net/redsocks/patches/0006-fix_default_config_location.patch create mode 100644 net/remserial/Makefile create mode 100644 net/rp-pppoe/Makefile create mode 100644 net/rp-pppoe/files/ppp/options create mode 100644 net/rp-pppoe/files/ppp/pap-secrets create mode 100644 net/rp-pppoe/files/ppp/pppoe-server-options create mode 100644 net/rp-pppoe/files/ppp_defs.h create mode 100644 net/rp-pppoe/files/pppoe-relay.default create mode 100755 net/rp-pppoe/files/pppoe-relay.init create mode 100644 net/rp-pppoe/files/pppoe-server.default create mode 100755 net/rp-pppoe/files/pppoe-server.init create mode 100644 net/rp-pppoe/files/pppoe.config create mode 100644 net/rp-pppoe/patches/100-configure.patch create mode 100644 net/rp-pppoe/patches/110-Makefile.patch create mode 100644 net/rp-pppoe/patches/120-use-linux-ether-not-netinet.patch create mode 100644 net/rp-pppoe/patches/130-static-lib-fix.patch create mode 100644 net/rsync/Config.in create mode 100644 net/rsync/Makefile create mode 100644 net/rsync/files/rsyncd.conf create mode 100644 net/rsync/files/rsyncd.init create mode 100644 net/rsyslog/Makefile create mode 100644 net/rsyslog/files/rsyslog.conf create mode 100644 net/rsyslog/files/rsyslog.init create mode 100644 net/rtorrent/Makefile create mode 100644 net/rtorrent/patches/100-fix-cross_compile.patch create mode 100644 net/rtorrent/patches/120-fix-ncurses.patch create mode 100644 net/scapy/Makefile create mode 100644 net/seafile-ccnet/Makefile create mode 100644 net/seafile-ccnet/patches/010-Makefile.patch create mode 100644 net/seafile-seahub/Makefile create mode 100644 net/seafile-seahub/patches/010-default-config.patch create mode 100644 net/seafile-seahub/patches/020-Makefile-fixes.patch create mode 100644 net/seafile-server/Config.in create mode 100644 net/seafile-server/Makefile create mode 100644 net/seafile-server/files/seafile.conf create mode 100755 net/seafile-server/files/seafile.init create mode 100755 net/seafile-server/files/seahub.init create mode 100644 net/seafile-server/patches/020-script-patches.patch create mode 100644 net/seafile-server/patches/030-pidfiles-in-same-directory.patch create mode 100644 net/seafile-server/patches/040-seafile-admin.patch create mode 100644 net/seafile-server/patches/050-libseafile-makefile-fixes.patch create mode 100644 net/seafile-server/patches/060-timestamps-as-int64.patch create mode 100644 net/seafile-server/patches/070-fuse-mount.patch create mode 100644 net/ser2net/Makefile create mode 100644 net/ser2net/files/ser2net.conf create mode 100644 net/ser2net/files/ser2net.config create mode 100644 net/ser2net/files/ser2net.init create mode 100644 net/shadowsocks-client/Makefile create mode 100644 net/shadowsocks-client/files/sslocal.config create mode 100755 net/shadowsocks-client/files/sslocal.init create mode 100644 net/shadowsocks-libev/Makefile create mode 100644 net/shadowsocks-libev/README.md create mode 100644 net/shadowsocks-libev/files/firewall.ss-rules create mode 100644 net/shadowsocks-libev/files/shadowsocks-libev.config create mode 100644 net/shadowsocks-libev/files/shadowsocks-libev.init create mode 100755 net/shadowsocks-libev/files/ss-rules create mode 100755 net/shadowsocks-libev/files/ss-rules.defaults create mode 100644 net/shorewall-core/Makefile create mode 100644 net/shorewall-core/patches/110-lib.common.patch create mode 100644 net/shorewall-lite/Makefile create mode 100644 net/shorewall-lite/files/hostname create mode 100644 net/shorewall-lite/files/hotplug_iface create mode 100644 net/shorewall-lite/files/shorewall-lite.init create mode 100644 net/shorewall-lite/files/vardir create mode 100644 net/shorewall-lite/patches/010-install_cp.patch create mode 100644 net/shorewall-lite/patches/020-set-PATH.patch create mode 100644 net/shorewall-lite/patches/120-logfile.patch create mode 100644 net/shorewall/Makefile create mode 100644 net/shorewall/files/hostname create mode 100644 net/shorewall/files/hotplug_iface create mode 100644 net/shorewall/files/shorewall.init create mode 100644 net/shorewall/files/vardir create mode 100644 net/shorewall/patches/120-logfile.patch create mode 100644 net/shorewall/patches/130-set-path.patch create mode 100644 net/shorewall6-lite/Makefile create mode 100644 net/shorewall6-lite/files/hostname create mode 100644 net/shorewall6-lite/files/hotplug_iface create mode 100644 net/shorewall6-lite/files/shorewall6-lite.init create mode 100644 net/shorewall6-lite/files/vardir create mode 100644 net/shorewall6-lite/patches/010-install_cp.patch create mode 100644 net/shorewall6-lite/patches/020-set-PATH.patch create mode 100644 net/shorewall6-lite/patches/120-logfile.patch create mode 100644 net/shorewall6/Makefile create mode 100644 net/shorewall6/files/hostname create mode 100644 net/shorewall6/files/hotplug_iface create mode 100644 net/shorewall6/files/shorewall6.init create mode 100644 net/shorewall6/files/vardir create mode 100644 net/shorewall6/patches/120-logfile.patch create mode 100644 net/shorewall6/patches/130-set-path.patch create mode 100644 net/siit/Makefile create mode 100644 net/siit/src/Makefile create mode 100644 net/siit/src/siit.c create mode 100644 net/siit/src/siit.h create mode 100644 net/simple-adblock/Makefile create mode 100644 net/simple-adblock/files/README.md create mode 100644 net/simple-adblock/files/simple-adblock.conf create mode 100644 net/simple-adblock/files/simple-adblock.hotplug create mode 100644 net/simple-adblock/files/simple-adblock.init create mode 100644 net/smartsnmpd/Makefile create mode 100644 net/smartsnmpd/files/mibs/dummy.lua create mode 100644 net/smartsnmpd/files/mibs/interfaces.lua create mode 100644 net/smartsnmpd/files/mibs/system.lua create mode 100644 net/smartsnmpd/files/smartsnmpd.conf create mode 100755 net/smartsnmpd/files/smartsnmpd.init create mode 100644 net/snort/Config.in create mode 100644 net/snort/Makefile create mode 100644 net/snort/files/snort.config create mode 100644 net/snort/files/snort.init create mode 100644 net/snort/patches/001-compile.patch create mode 100644 net/socat/Makefile create mode 100644 net/socat/files/socat.config create mode 100644 net/socat/files/socat.init create mode 100644 net/socat/patches/100-musl-compat.patch create mode 100644 net/softethervpn/Makefile create mode 100644 net/softethervpn/files/dummy create mode 100755 net/softethervpn/files/launcher.sh create mode 100644 net/softethervpn/files/vpnbridge.init create mode 100644 net/softethervpn/files/vpnclient.init create mode 100644 net/softethervpn/files/vpnserver.init create mode 100644 net/softethervpn/patches/103-noeucjp.patch create mode 100644 net/softethervpn/patches/105-nossl3.patch create mode 100644 net/softflowd/Makefile create mode 100644 net/softflowd/files/softflowd.config create mode 100755 net/softflowd/files/softflowd.init create mode 100644 net/spawn-fcgi/Makefile create mode 100644 net/sqm-scripts-extra/Makefile create mode 100644 net/sqm-scripts-extra/src/test_LAN_dual-isolate__piece_of_cake.qos create mode 100644 net/sqm-scripts-extra/src/test_LAN_dual-isolate__piece_of_cake.qos.help create mode 100644 net/sqm-scripts-extra/src/test_LAN_triple-isolate__piece_of_cake.qos create mode 100644 net/sqm-scripts-extra/src/test_LAN_triple-isolate__piece_of_cake.qos.help create mode 100644 net/sqm-scripts-extra/src/test_WAN_dual-isolate__piece_of_cake.qos create mode 100644 net/sqm-scripts-extra/src/test_WAN_dual-isolate__piece_of_cake.qos.help create mode 100644 net/sqm-scripts-extra/src/test_WAN_triple-isolate__piece_of_cake.qos create mode 100644 net/sqm-scripts-extra/src/test_WAN_triple-isolate__piece_of_cake.qos.help create mode 100644 net/sqm-scripts-extra/src/test_triple_isolated_llt_cake.qos create mode 100644 net/sqm-scripts-extra/src/test_triple_isolated_llt_cake.qos.help create mode 100644 net/sqm-scripts/Makefile create mode 100644 net/squid/Makefile create mode 100644 net/squid/files/squid.conf create mode 100644 net/squid/files/squid.config create mode 100644 net/squid/files/squid.init create mode 100644 net/squid/patches/001-cross_compile.patch create mode 100644 net/sshfs/Makefile create mode 100644 net/sshtunnel/Makefile create mode 100644 net/sshtunnel/files/sshtunnel.init create mode 100644 net/sshtunnel/files/uci_sshtunnel create mode 100644 net/sslh/Makefile create mode 100644 net/sslh/files/sslh.config create mode 100644 net/sslh/files/sslh.init create mode 100644 net/sslh/patches/001-no_sslh_select.patch create mode 100644 net/sslh/patches/002-configfile-fix.patch create mode 100644 net/sstp-client/Makefile create mode 100644 net/sstp-client/files/etc/ppp/chap-secrets create mode 100644 net/sstp-client/files/etc/ppp/peers/peer-sstp-example-nopty.txt create mode 100644 net/sstp-client/files/etc/ppp/peers/peer-sstp-example.txt create mode 100644 net/sstp-client/patches/100-musl-compat.patch create mode 100644 net/strongswan/Config.in create mode 100644 net/strongswan/Makefile create mode 100644 net/strongswan/files/etc/hotplug.d/ipsec/01-user create mode 100644 net/strongswan/files/ipsec.init create mode 100644 net/strongswan/files/ipsec.secrets create mode 100644 net/strongswan/files/ipsec.user create mode 100644 net/strongswan/patches/101-musl-fixes.patch create mode 100644 net/strongswan/patches/201-kmodloader.patch create mode 100644 net/strongswan/patches/203-uci.patch create mode 100644 net/strongswan/patches/210-sleep.patch create mode 100644 net/strongswan/patches/300-include-ipsec-hotplug.patch create mode 100644 net/strongswan/patches/305-minimal_dh_plugin.patch create mode 100644 net/stubby/Makefile create mode 100644 net/stubby/files/README.md create mode 100644 net/stubby/files/stubby.init create mode 100644 net/stubby/files/stubby.yml create mode 100644 net/stunnel/Makefile create mode 100644 net/stunnel/files/stunnel.conf create mode 100644 net/stunnel/files/stunnel.init create mode 100644 net/stunnel/files/stunnel.uci create mode 100644 net/subversion/Makefile create mode 100644 net/subversion/files/subversion.config create mode 100644 net/subversion/files/subversion.init create mode 100644 net/subversion/patches/301-cross-compilation-macos.patch create mode 100644 net/sysrepo/Config_libsysrepo.in create mode 100644 net/sysrepo/Makefile create mode 100644 net/sysrepo/files/libsysrepo.default create mode 100644 net/sysrepo/files/sysrepo.init create mode 100644 net/sysrepo/patches/001-protobuf-remove-protoc-command-from-cmake-file create mode 100644 net/sysrepo/patches/002-remove-buildtime-module-install create mode 100644 net/sysrepo/patches/003-missing-time-header create mode 100644 net/sysrepo/patches/004-disable-sysrepod-autostart create mode 100644 net/sysrepo/patches/005-fix-struct-ucred-define create mode 100644 net/tcpproxy/Makefile create mode 100644 net/tcpproxy/files/tcpproxy.config create mode 100644 net/tcpproxy/files/tcpproxy.init create mode 100644 net/tcpproxy/patches/001-ragel_generated.patch create mode 100644 net/tcpproxy/patches/100-remove-build-timestamps-build-hostname.patch create mode 100644 net/tcpreplay/Makefile create mode 100644 net/tgt/Makefile create mode 100644 net/tgt/files/etc/config/tgt create mode 100755 net/tgt/files/etc/init.d/tgt create mode 100644 net/tgt/patches/020-usr_Makefile.patch create mode 100644 net/tgt/patches/030-Makefile.patch create mode 100644 net/tgt/patches/100-musl-compat.patch create mode 100644 net/tinc/Makefile create mode 100644 net/tinc/files/tinc.config create mode 100644 net/tinc/files/tinc.init create mode 100644 net/tinc/files/tinc.upgrade create mode 100644 net/tinyproxy/Makefile create mode 100644 net/tinyproxy/files/tinyproxy.config create mode 100644 net/tinyproxy/files/tinyproxy.init create mode 100644 net/tinyproxy/patches/010-no-docs-and-tests.patch create mode 100644 net/tinyproxy/patches/020-config_and_pid-path.patch create mode 100644 net/tinyproxy/patches/030-allow_bind_in_transparent_mode.patch create mode 100644 net/tinyproxy/patches/120-fix_INET6.patch create mode 100644 net/tinyproxy/patches/CVE-2012-3505-tiniproxy-randomized-hashmaps.patch create mode 100644 net/tinyproxy/patches/CVE-2012-3505-tinyproxy-limit-headers.patch create mode 100644 net/tor/Makefile create mode 100644 net/tor/files/tor.init create mode 100644 net/tor/patches/001-torrc.patch create mode 100644 net/transmission/Makefile create mode 100644 net/transmission/files/transmission.config create mode 100644 net/transmission/files/transmission.init create mode 100644 net/transmission/files/transmission.sysctl create mode 100644 net/transmission/patches/010-add-mbedtls-support.patch create mode 100644 net/transmission/patches/020-fix-external-miniupnpc.patch create mode 100644 net/transmission/patches/030-fix-port-test.patch create mode 100644 net/transmission/patches/040-https-portcheck.patch create mode 100644 net/transmission/patches/050-fix-safari.patch create mode 100644 net/travelmate/Makefile create mode 100644 net/travelmate/files/README.md create mode 100644 net/travelmate/files/travelmate.conf create mode 100755 net/travelmate/files/travelmate.init create mode 100755 net/travelmate/files/travelmate.sh create mode 100644 net/u2pnpd/Makefile create mode 100644 net/u2pnpd/files/u2pnpd.config create mode 100644 net/u2pnpd/files/u2pnpd.defaults create mode 100644 net/u2pnpd/files/u2pnpd.init create mode 100644 net/uanytun/Makefile create mode 100644 net/uanytun/files/uanytun-nocrypt.config create mode 100644 net/uanytun/files/uanytun.config create mode 100644 net/uanytun/files/uanytun.init create mode 100644 net/uanytun/patches/100-reproducible-builds.patch create mode 100644 net/udpxy/Makefile create mode 100644 net/udpxy/files/udpxy.conf create mode 100644 net/udpxy/files/udpxy.init create mode 100644 net/ulogd/Makefile create mode 100644 net/ulogd/files/ulogd.init create mode 100644 net/ulogd/patches/100-musl-compat.patch create mode 100644 net/ulogd/patches/101-ulogd-use-strncpy-instead-of-memcpy.patch create mode 100644 net/umurmur/Makefile create mode 100644 net/umurmur/patches/010-mbedtls_fix_includes.patch create mode 100644 net/unbound/Makefile create mode 100644 net/unbound/files/README.md create mode 100644 net/unbound/files/defaults.sh create mode 100644 net/unbound/files/dnsmasq.sh create mode 100644 net/unbound/files/iptools.sh create mode 100644 net/unbound/files/odhcpd.awk create mode 100644 net/unbound/files/odhcpd.sh create mode 100644 net/unbound/files/root.key create mode 100644 net/unbound/files/rootzone.sh create mode 100755 net/unbound/files/unbound.init create mode 100755 net/unbound/files/unbound.ntpd create mode 100644 net/unbound/files/unbound.sh create mode 100644 net/unbound/files/unbound.uci create mode 100644 net/unbound/files/unbound_ext.conf create mode 100644 net/unbound/files/unbound_srv.conf create mode 100644 net/unbound/patches/100-example-conf-in.patch create mode 100644 net/usbip/Makefile create mode 100644 net/vallumd/Makefile create mode 100644 net/vallumd/files/vallumd.conf create mode 100644 net/vallumd/files/vallumd.init create mode 100644 net/vncrepeater/Makefile create mode 100644 net/vncrepeater/patches/001-uclibcxx_linking.patch create mode 100644 net/vncrepeater/patches/002-cfg-path.patch create mode 100644 net/vnstat/Makefile create mode 100644 net/vnstat/files/vnstat.config create mode 100644 net/vnstat/files/vnstat.defaults create mode 100644 net/vnstat/files/vnstat.init create mode 100644 net/vnstat/patches/990-adjust-configuration-defaults.patch create mode 100644 net/vpnbypass/Makefile create mode 100644 net/vpnbypass/files/README.md create mode 100644 net/vpnbypass/files/vpnbypass.conf create mode 100644 net/vpnbypass/files/vpnbypass.hotplug create mode 100644 net/vpnbypass/files/vpnbypass.init create mode 100644 net/vpnc-scripts/Makefile create mode 100755 net/vpnc-scripts/files/vpnc-script create mode 100644 net/vpnc/Config.in create mode 100644 net/vpnc/Makefile create mode 100644 net/vpnc/README create mode 100755 net/vpnc/files/vpnc.sh create mode 100644 net/vpnc/files/vpnc.upgrade create mode 100644 net/vpnc/patches/001-cross.patch create mode 100644 net/vpnc/patches/100-musl-compat.patch create mode 100644 net/vsftpd/Makefile create mode 100644 net/vsftpd/files/vsftpd.conf create mode 100644 net/vsftpd/files/vsftpd.init create mode 100644 net/vsftpd/patches/001-destdir.patch create mode 100644 net/vsftpd/patches/002-find_libs.patch create mode 100644 net/vsftpd/patches/003-chroot.patch create mode 100644 net/vsftpd/patches/004-disable-capabilities.patch create mode 100644 net/vsftpd/patches/005-disable-pam.patch create mode 100644 net/vsftpd/patches/006-musl-compatibility.patch create mode 100644 net/vsftpd/patches/007-CVE-2015-1419.patch create mode 100644 net/wakeonlan/Makefile create mode 100644 net/wavemon/Makefile create mode 100644 net/webui-aria2/Makefile create mode 100644 net/webui-aria2/patches/001-simplify-flag-icon-css.patch create mode 100644 net/wget/Makefile create mode 100644 net/wifidog-ng/Makefile create mode 100644 net/wifidog-ng/files/wifidog-ng.config create mode 100644 net/wifidog-ng/files/wifidog-ng.crt create mode 100644 net/wifidog-ng/files/wifidog-ng.hotplug create mode 100644 net/wifidog-ng/files/wifidog-ng.init create mode 100644 net/wifidog-ng/files/wifidog-ng.key create mode 100644 net/wifidog/Makefile create mode 100644 net/wifidog/files/wifidog.init create mode 100644 net/wifischedule/LICENSE create mode 100644 net/wifischedule/Makefile create mode 100644 net/wifischedule/README.md create mode 100644 net/wifischedule/net/etc/config/wifi_schedule create mode 100755 net/wifischedule/net/usr/bin/wifi_schedule.sh create mode 100644 net/xinetd/Makefile create mode 100644 net/xinetd/files/xinetd.conf create mode 100644 net/xinetd/files/xinetd.init create mode 100644 net/xinetd/patches/001-ar.patch create mode 100644 net/xinetd/patches/002-destdir.patch create mode 100644 net/xinetd/patches/003-rpc_fix.patch create mode 100644 net/xinetd/patches/004-ident-bind.patch create mode 100644 net/xl2tpd/Makefile create mode 100644 net/xl2tpd/README.md create mode 100644 net/xl2tpd/files/l2tp.sh create mode 100644 net/xl2tpd/files/options.xl2tpd create mode 100644 net/xl2tpd/files/xl2tp-secrets create mode 100644 net/xl2tpd/files/xl2tpd.conf create mode 100644 net/xl2tpd/files/xl2tpd.conf.sample create mode 100644 net/xl2tpd/files/xl2tpd.init create mode 100644 net/xtables-addons/Makefile create mode 100644 net/xtables-addons/patches/002-fix-kernel-version-detection.patch create mode 100644 net/xtables-addons/patches/100-add-rtsp-conntrack.patch create mode 100644 net/xtables-addons/patches/200-add-lua-packetscript.patch create mode 100644 net/xtables-addons/patches/201-fix-lua-packetscript.patch create mode 100644 net/xtables-addons/patches/300-geoip-endian-detection.patch create mode 100644 net/yaaw/Makefile create mode 100644 net/zerotier/Config.in create mode 100644 net/zerotier/Makefile create mode 100644 net/zerotier/files/zerotier.config create mode 100644 net/zerotier/files/zerotier.init create mode 100644 net/zerotier/patches/0001-find-miniupnpc.h-in-staging-directory.patch create mode 100644 net/zerotier/patches/0002-remove-pie.patch create mode 100644 net/zerotier/patches/0003-remove-march-armv5.patch create mode 100644 net/zerotier/patches/0004-accept-external-linker-flags.patch create mode 100644 net/znc/Config.in create mode 100644 net/znc/Makefile create mode 100644 net/znc/files/znc.conf create mode 100644 net/znc/files/znc.init create mode 100644 net/znc/patches/100-move_rootcheck_after_config.patch create mode 100644 net/znc/patches/101-Reduce_rebuild_time.patch create mode 100644 net/znc/patches/104-disable-empty-modules-check.patch create mode 100644 net/znc/patches/110-add-playback-module.patch create mode 100644 sound/alsa-utils/Makefile create mode 100644 sound/alsa-utils/patches/100-uClibc-compat.patch create mode 100644 sound/alsa-utils/patches/101-disable-libsamplerate.patch create mode 100644 sound/espeak/Makefile create mode 100644 sound/espeak/patches/101-portaudio.patch create mode 100644 sound/fdk-aac/Config.in create mode 100644 sound/fdk-aac/Makefile create mode 100644 sound/forked-daapd/Makefile create mode 100644 sound/forked-daapd/files/forked-daapd.conf create mode 100644 sound/forked-daapd/files/forked-daapd.init create mode 100644 sound/forked-daapd/patches/010-use_a_wrapper_for_dmap_find_field.patch create mode 100644 sound/lame/Config.in create mode 100644 sound/lame/Makefile create mode 100644 sound/madplay/Makefile create mode 100644 sound/madplay/patches/0001-switch-to-new-alsa-api.patch create mode 100644 sound/madplay/patches/010-use_correct_shell.patch create mode 100644 sound/mocp/Makefile create mode 100644 sound/mpc/Makefile create mode 100644 sound/mpc/files/pls-handler.sh create mode 100644 sound/mpd/Makefile create mode 100644 sound/mpd/files/mpd.init create mode 100644 sound/mpd/files/mpd.service create mode 100644 sound/mpd/patches/210-support_raw_pcm_streams.patch create mode 100644 sound/mpd/patches/220-handle_slow_server_stream_startup.patch create mode 100644 sound/mpg123/Makefile create mode 100644 sound/opus-tools/Makefile create mode 100644 sound/pianod/Makefile create mode 100644 sound/pianod/files/pianod.init create mode 100644 sound/portaudio/Makefile create mode 100644 sound/pulseaudio/Makefile create mode 100644 sound/pulseaudio/files/pulseaudio.init create mode 100644 sound/pulseaudio/patches/001-no_default_64mb_alloc.patch create mode 100644 sound/shairplay/Makefile create mode 100644 sound/shairplay/files/shairplay.config create mode 100644 sound/shairplay/files/shairplay.init create mode 100644 sound/shairplay/patches/001-key_file_dir.patch create mode 100644 sound/shairplay/patches/002-libavahi-compat-dnssd.patch create mode 100644 sound/shairplay/patches/003-fix_big-endian.patch create mode 100644 sound/shairport-sync/Makefile create mode 100644 sound/shairport-sync/files/shairport-sync.config create mode 100644 sound/shairport-sync/files/shairport-sync.init create mode 100644 sound/shine/Makefile create mode 100644 sound/shine/patches/001-fix_mips64_bswap.patch create mode 100644 sound/shine/patches/002-fix-name-collision-with-ffmpeg.patch create mode 100644 sound/sox/Makefile create mode 100644 sound/sox/patches/001-cross_compile.patch create mode 100644 sound/sox/patches/010-fix_uclibc_build_issue.patch create mode 100644 sound/sox/patches/020-reproducible-builds.patch create mode 100644 sound/squeezelite/Makefile create mode 100644 sound/squeezelite/files/squeezelite.conf create mode 100644 sound/squeezelite/files/squeezelite.init create mode 100644 sound/squeezelite/patches/005-respect_LDFLAGS.patch create mode 100644 sound/squeezelite/patches/010-select_broadcast_interface.patch create mode 100644 sound/squeezelite/patches/020-no_libmad.patch create mode 100644 sound/squeezelite/patches/030-fix_musl_compatibilty.patch create mode 100644 sound/squeezelite/patches/040-clear_dynlink_errors.patch create mode 100644 sound/svox/Makefile create mode 100644 sound/svox/patches/0001-autoconf-building-of-library-using-libtool.patch create mode 100644 sound/svox/patches/0002-gitignore-for-autotools-files.patch create mode 100644 sound/svox/patches/0003-pico2wave-Convert-text-to-.wav-using-svox-text-to-sp.patch create mode 100644 sound/svox/patches/0004-add-header-files.patch create mode 100644 sound/svox/patches/0005-Install-lang-files.patch create mode 100644 sound/svox/patches/0006-Set-picolangdir.patch create mode 100644 sound/svox/patches/0008-64bits.patch create mode 100644 sound/svox/patches/0009-Fix-link-order.patch create mode 100644 sound/svox/patches/0010-platform.patch create mode 100644 sound/svox/patches/0011-subdir.patch create mode 100644 sound/svox/patches/0012-no-headers.patch create mode 100644 sound/upmpdcli/Config.in create mode 100644 sound/upmpdcli/Makefile create mode 100644 sound/upmpdcli/files/upmpdcli.config create mode 100644 sound/upmpdcli/files/upmpdcli.init create mode 100644 sound/upmpdcli/files/upmpdcli.png create mode 100644 sound/upmpdcli/patches/010-Add_icon_config.patch create mode 100644 utils/acl/Makefile create mode 100644 utils/acl/patches/100-no-gettext_configure.patch create mode 100644 utils/acl/patches/101-no-gettext_autogen.patch create mode 100644 utils/acl/patches/102-no-gettext_Makefile.patch create mode 100644 utils/acpica-unix/Makefile create mode 100644 utils/acpid/Makefile create mode 100644 utils/acpid/files/acpid.hotplug create mode 100644 utils/acpid/files/acpid.init create mode 100644 utils/acpid/files/default create mode 100644 utils/acpid/patches/002-dont-use-isfdtype.patch create mode 100644 utils/ap51-flash/Makefile create mode 100644 utils/ap51-flash/files/ap51-flash.config create mode 100644 utils/ap51-flash/files/ap51-flash.init create mode 100755 utils/ap51-flash/files/ap51-flash.sh create mode 100644 utils/at/Makefile create mode 100755 utils/at/files/atd.init create mode 100644 utils/at/patches/100-remove-glibc-assumption.patch create mode 100644 utils/at/patches/110-getloadavg.patch create mode 100644 utils/attendedsysupgrade-common/Makefile create mode 100644 utils/attendedsysupgrade-common/files/attendedsysupgrade.defaults create mode 100644 utils/attr/Makefile create mode 100644 utils/attr/patches/100-no-gettext_configure.patch create mode 100644 utils/attr/patches/101-no-gettext_autogen.patch create mode 100644 utils/attr/patches/102-no-gettext_Makefile.patch create mode 100644 utils/auc/Makefile create mode 100644 utils/auc/src/CMakeLists.txt create mode 100644 utils/auc/src/auc.c create mode 100644 utils/avrdude/Makefile create mode 100644 utils/avrdude/patches/010-configure-fixups.patch create mode 100644 utils/avrdude/patches/020-no-cpp-timestamps.patch create mode 100644 utils/avrdude/patches/100-musl-compat.patch create mode 100644 utils/bandwidthd/Makefile create mode 100644 utils/bandwidthd/files/bandwidthd-pgsql.config create mode 100644 utils/bandwidthd/files/bandwidthd-php.config create mode 100755 utils/bandwidthd/files/bandwidthd-php.init create mode 100644 utils/bandwidthd/files/bandwidthd-sqlite.config create mode 100755 utils/bandwidthd/files/bandwidthd-sqlite.init create mode 100644 utils/bandwidthd/files/bandwidthd.config create mode 100755 utils/bandwidthd/files/bandwidthd.init create mode 100644 utils/bandwidthd/files/logo-openwrt.gif create mode 100644 utils/bandwidthd/files/phphtdocs-sqlite/details.php create mode 100644 utils/bandwidthd/files/phphtdocs-sqlite/footer.php create mode 100644 utils/bandwidthd/files/phphtdocs-sqlite/graph.php create mode 100644 utils/bandwidthd/files/phphtdocs-sqlite/include.php create mode 100644 utils/bandwidthd/files/phphtdocs-sqlite/index.php create mode 100644 utils/bandwidthd/files/phphtdocs/details.php create mode 100644 utils/bandwidthd/files/phphtdocs/footer.php create mode 100644 utils/bandwidthd/files/phphtdocs/graph.php create mode 100644 utils/bandwidthd/files/phphtdocs/include.php create mode 100644 utils/bandwidthd/files/phphtdocs/index.php create mode 100644 utils/bandwidthd/patches/010-dont-add-host-paths-in-config.in.patch create mode 100644 utils/bandwidthd/patches/020-change-p2p-to-smtp.patch create mode 100644 utils/banhosts/Makefile create mode 100644 utils/banhosts/files/updatebanhost create mode 100644 utils/bash/Makefile create mode 100644 utils/bash/patches/100-fix-jobs.patch create mode 100644 utils/bash/patches/900-no_doc.patch create mode 100644 utils/bc/Makefile create mode 100644 utils/bc/patches/001-disable-doc.patch create mode 100644 utils/beep/Makefile create mode 100644 utils/bluelog/Makefile create mode 100644 utils/bluelog/files/bluelog.init create mode 100644 utils/bluelog/patches/100-gen-oui-fix-tempfile-use-mirror.patch create mode 100644 utils/bluez/Makefile create mode 100644 utils/bluez/files/bluetooth.config create mode 100644 utils/bluez/files/bluetoothd.init create mode 100644 utils/bluez/files/givepin create mode 100644 utils/bluez/patches/001-bcm43xx-Add-bcm43xx-3wire-variant.patch create mode 100644 utils/bluez/patches/002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch create mode 100644 utils/bluez/patches/003-Increase-firmware-load-timeout-to-30s.patch create mode 100644 utils/bluez/patches/004-Move-the-43xx-firmware-into-lib-firmware.patch create mode 100644 utils/bluez/patches/201-readline.patch create mode 100644 utils/bluez/patches/202-fix-endianness.patch create mode 100644 utils/bluez/patches/203-obexd_without_systemd.patch create mode 100644 utils/bmx7-dnsupdate/Makefile create mode 100755 utils/bmx7-dnsupdate/files/etc/init.d/bmx7-dnsupdate create mode 100755 utils/bmx7-dnsupdate/files/usr/bin/bmx7-dnsupdate create mode 100644 utils/bonnie++/Makefile create mode 100644 utils/bonnie++/patches/001-cross_compile_fix.patch create mode 100644 utils/bonnie++/patches/002-add-verbose-error-messages.patch create mode 100644 utils/btrfs-progs/Makefile create mode 100644 utils/btrfs-progs/files/btrfs-scan.init create mode 100644 utils/canutils/Makefile create mode 100644 utils/ccid/Makefile create mode 100644 utils/ccrypt/Makefile create mode 100644 utils/ccrypt/patches/001-no-intl.patch create mode 100644 utils/cmdpad/Makefile create mode 100644 utils/cmdpad/files/cmdpad.init create mode 100644 utils/cmdpad/patches/100-Makefile.patch create mode 100644 utils/cmdpad/patches/120-kernel26-compat.patch create mode 100644 utils/cmdpad/patches/130-no_zombie.patch create mode 100644 utils/cmdpad/patches/140-compile_fix.patch create mode 100644 utils/collectd/Makefile create mode 100644 utils/collectd/files/collectd.conf create mode 100644 utils/collectd/files/collectd.init create mode 100644 utils/collectd/patches/001-undefined-AM_PATH_LIBGCRYPT.patch create mode 100644 utils/collectd/patches/050-backport-modbus-little-endian.patch create mode 100644 utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch create mode 100644 utils/collectd/patches/140-fix-fqdnlookup.patch create mode 100644 utils/collectd/patches/300-delay-first-read-cycle.patch create mode 100644 utils/collectd/patches/400-fix-olsrd-get-all.patch create mode 100644 utils/collectd/patches/600-fix-libmodbus-detection.patch create mode 100644 utils/collectd/patches/700-disable-sys-capability-check.patch create mode 100644 utils/collectd/patches/900-add-iwinfo-plugin.patch create mode 100644 utils/collectd/patches/920-fix-ping-droprate.patch create mode 100644 utils/coreutils/Makefile create mode 100644 utils/coreutils/patches/001-no_docs_man_tests.patch create mode 100644 utils/coreutils/patches/002-fix_compile_with_uclibc.patch create mode 100644 utils/crconf/Makefile create mode 100644 utils/crelay/Makefile create mode 100644 utils/crelay/files/crelay.init create mode 100644 utils/crelay/patches/010-link_with_ftdi1.patch create mode 100644 utils/cryptodev-linux/Makefile create mode 100644 utils/cryptsetup/Makefile create mode 100644 utils/dbus/Makefile create mode 100644 utils/dbus/files/dbus-launch create mode 100644 utils/dbus/files/dbus.init create mode 100644 utils/dbus/patches/100-fix-poll-select.patch create mode 100644 utils/dfu-programmer/Makefile create mode 100644 utils/dfu-util/Makefile create mode 100644 utils/digitemp/Makefile create mode 100644 utils/digitemp/patches/0001_add_missing_includes.patch create mode 100644 utils/dmidecode/Makefile create mode 100644 utils/domoticz/Makefile create mode 100644 utils/domoticz/files/domoticz.config create mode 100644 utils/domoticz/files/domoticz.hotplug create mode 100644 utils/domoticz/files/domoticz.init create mode 100644 utils/dosfstools/Makefile create mode 100644 utils/dosfstools/patches/0002-Switch-to-AC_CHECK_LIB-for-iconv-library-linking.patch create mode 100644 utils/dump1090/Makefile create mode 100644 utils/dump1090/files/dump1090.config create mode 100644 utils/dump1090/files/dump1090.default create mode 100644 utils/dump1090/files/dump1090.init create mode 100644 utils/dvtm/Makefile create mode 100644 utils/ecdsautils/Makefile create mode 100644 utils/evtest/Makefile create mode 100644 utils/findutils/Makefile create mode 100644 utils/flashrom/Makefile create mode 100644 utils/flashrom/flashrom.mk create mode 100644 utils/flashrom/patches/0001-fix_internal_bitbang.patch create mode 100644 utils/flashrom/patches/0002-fix-io-h-include.patch create mode 100644 utils/flashrom/patches/0003-ch341a_spi-avoid-deprecated-libusb-functions.patch create mode 100644 utils/flent-tools/Makefile create mode 100644 utils/fontconfig/Makefile create mode 100644 utils/gammu/Makefile create mode 100644 utils/gammu/files/gammu create mode 100755 utils/gammu/files/gammu.init create mode 100644 utils/gammu/patches/001-iconv-disabling-option.patch create mode 100644 utils/gammu/patches/002-no-fstack-protector.patch create mode 100644 utils/gammu/patches/003-cmake-cross-toolchain.patch create mode 100644 utils/gammu/patches/004-cmake_libdbi_optional.patch create mode 100644 utils/gammu/patches/010-utils-shell-fix.patch create mode 100644 utils/gawk/Makefile create mode 100644 utils/gkermit/Makefile create mode 100644 utils/gnupg/Makefile create mode 100644 utils/gpsd/Makefile create mode 100644 utils/gpsd/files/gpsd.config create mode 100644 utils/gpsd/files/gpsd.init create mode 100644 utils/gpsd/patches/0002-ncurses6_detection.patch create mode 100644 utils/gptfdisk/Makefile create mode 100644 utils/grep/Makefile create mode 100644 utils/gzip/Makefile create mode 100644 utils/hamlib/Makefile create mode 100644 utils/haserl/Config.in create mode 100644 utils/haserl/Makefile create mode 100644 utils/haserl/patches/100-replace-lua2c-with-sed.patch create mode 100644 utils/haserl/patches/101-adjust-script-size.patch create mode 100644 utils/haveged/Makefile create mode 100644 utils/haveged/files/haveged.init create mode 100644 utils/hd-idle/Makefile create mode 100644 utils/hd-idle/files/hd-idle.config create mode 100644 utils/hd-idle/files/hd-idle.init create mode 100644 utils/hdparm/Makefile create mode 100644 utils/hfsprogs/Makefile create mode 100644 utils/hfsprogs/files/hfsfsck.sh create mode 100644 utils/hfsprogs/patches/0001-Create-short-Makefiles-for-Debian.patch create mode 100644 utils/hfsprogs/patches/0002-Add-exclude-Darwin-specific-code.patch create mode 100644 utils/hfsprogs/patches/0003-Add-helper-include-files-absent-from-the-upstream-pa.patch create mode 100644 utils/hfsprogs/patches/0004-Fix-compilation-on-64-bit-arches.patch create mode 100644 utils/hfsprogs/patches/0005-Remove-Apple-specific-p-from-strings.patch create mode 100644 utils/hfsprogs/patches/0006-Adjust-types-for-printing.patch create mode 100644 utils/hfsprogs/patches/0007-Fix-path-for-HFS-wrapper-block.patch create mode 100644 utils/hfsprogs/patches/0008-Provide-command-line-option-a.patch create mode 100644 utils/hfsprogs/patches/0009-Rename-dprintf-to-dbg_printf.patch create mode 100644 utils/hfsprogs/patches/0010-Rename-custom-macro-nil-with-NULL.patch create mode 100644 utils/hfsprogs/patches/0011-Fix-types.patch create mode 100644 utils/hfsprogs/patches/0012-Fix-mkfs-not-creating-UUIDs-for-new-filesystems.patch create mode 100644 utils/hfsprogs/patches/0013-Fix-manpages.patch create mode 100644 utils/hfsprogs/patches/0014-uClibc_no_loadavg.patch create mode 100644 utils/hfsprogs/patches/0015-sysctl-only-on-glibc.patch create mode 100644 utils/hub-ctrl/Makefile create mode 100644 utils/i2c-tools/Makefile create mode 100644 utils/inotify-tools/Makefile create mode 100644 utils/io/Makefile create mode 100644 utils/io/src/io.c create mode 100644 utils/irqbalance/Makefile create mode 100644 utils/irqbalance/patches/100-disable-ui-compilation.patch create mode 100644 utils/irqbalance/patches/200-avoid-glib.patch create mode 100644 utils/irqbalance/patches/300-upstream-fix-for-AARCH64.patch create mode 100644 utils/joe/Makefile create mode 100644 utils/joe/files/joerc create mode 100644 utils/jq/Makefile create mode 100644 utils/jq/patches/001-stack-exhaustion.patch create mode 100644 utils/jq/patches/002-heap-buffer-overflow.patch create mode 100644 utils/klish/Makefile create mode 100644 utils/klish/patches/010-shell_execute_fix.patch create mode 100644 utils/kmod/Makefile create mode 100644 utils/kmod/patches/001-fix_pkgconfig_file.patch create mode 100644 utils/lcd4linux/Config.in create mode 100644 utils/lcd4linux/Makefile create mode 100644 utils/lcd4linux/files/lcd4linux.init create mode 100644 utils/lcd4linux/patches/100-drv_RouterBoard.patch create mode 100644 utils/lcd4linux/patches/110-uclibc-logarithm-fix.patch create mode 100644 utils/lcd4linux/patches/120-remove-as-needed-linker-option.patch create mode 100644 utils/lcd4linux/patches/140-no_repnop_T6963.patch create mode 100644 utils/lcd4linux/patches/150-addlibmpdclient.patch create mode 100644 utils/lcd4linux/patches/160-uinput_defs.patch create mode 100644 utils/lcd4linux/patches/170-add-generic-spidev-driver.patch create mode 100644 utils/lcd4linux/patches/171-allow-to-specify-drv_generic_graphic_real_clear.patch create mode 100644 utils/lcd4linux/patches/172-add-TEW673GRU-driver.patch create mode 100644 utils/lcd4linux/patches/173-glcd2usb-bigendian-fix.patch create mode 100644 utils/lcdproc/Makefile create mode 100755 utils/lcdproc/files/LCDd create mode 100755 utils/lcdproc/files/lcdexec create mode 100755 utils/lcdproc/files/lcdproc create mode 100755 utils/lcdproc/files/lcdvc create mode 100644 utils/lcdproc/patches/100-remove-build-timestamp.patch create mode 100644 utils/less/Makefile create mode 100644 utils/lm-sensors/Makefile create mode 100644 utils/lm-sensors/files/lm-sensors.init create mode 100644 utils/lm-sensors/files/sensors.conf create mode 100644 utils/lm-sensors/patches/100-musl-compat.patch create mode 100644 utils/logrotate/Makefile create mode 100644 utils/logrotate/files/logrotate.conf create mode 100644 utils/lrzsz/Makefile create mode 100644 utils/lrzsz/patches/100-install_delete_fix.patch create mode 100644 utils/lsof/Makefile create mode 100644 utils/lsof/patches/001-lsof_makefile.patch create mode 100644 utils/lsof/patches/002-lsof_noportmap.patch create mode 100644 utils/lsof/patches/003-lsof_selinux.patch create mode 100644 utils/lsof/patches/004-lsof_ccv.patch create mode 100644 utils/lsof/patches/005-reproducable-build.patch create mode 100644 utils/lvm2/Makefile create mode 100644 utils/lvm2/files/lvm2.init create mode 100644 utils/lvm2/patches/000-compile.patch create mode 100644 utils/lvm2/patches/001-include_fix.patch create mode 100644 utils/lvm2/patches/002-const-stdio.patch create mode 100644 utils/lvm2/patches/003-no-mallinfo.patch create mode 100644 utils/lvm2/patches/004-device-include-goto-lable-as-well.patch create mode 100644 utils/lxc/Config.in create mode 100644 utils/lxc/Makefile create mode 100644 utils/lxc/files/lxc-auto.config create mode 100755 utils/lxc/files/lxc-auto.init create mode 100644 utils/lxc/files/lxc-unprivileged.defaults create mode 100644 utils/lxc/files/lxc.conf create mode 100644 utils/lxc/patches/001-nl-avoid-NULL-pointer-dereference.patch create mode 100644 utils/lxc/patches/002-compile.patch create mode 100644 utils/lxc/patches/003-compile.patch create mode 100644 utils/lxc/patches/010-compile.patch create mode 100644 utils/lxc/patches/015-getline.patch create mode 100644 utils/lxc/patches/020-lxc-checkconfig.patch create mode 100644 utils/lxc/patches/025-remove-unsupported-option.patch create mode 100644 utils/macchanger/Makefile create mode 100644 utils/macchanger/patches/0001-fix-build-with-musl.patch create mode 100644 utils/mariadb/Makefile create mode 100644 utils/mariadb/conf/my.cnf create mode 100644 utils/mariadb/conf/mysqld.default create mode 100644 utils/mariadb/files/mysqld.init create mode 100644 utils/mariadb/patches/100-fix_hostname.patch create mode 100644 utils/mariadb/patches/110-pcre.cmake.patch create mode 100644 utils/mariadb/patches/120-fix-ucontext-check.patch create mode 100644 utils/mariadb/patches/130-c11_atomics.patch create mode 100644 utils/mariadb/patches/140-mips-connect-unaligned.patch create mode 100644 utils/mariadb/patches/150-mips-innobase-atomic.patch create mode 100644 utils/mariadb/patches/160-mips-machine.patch create mode 100644 utils/mariadb/patches/170-ppc-remove-glibc-dep.patch create mode 100644 utils/mbtools/Makefile create mode 100644 utils/mbtools/patches/100-fix-unit-test-server-return-value.patch create mode 100644 utils/mc/Config.in create mode 100644 utils/mc/Makefile create mode 100644 utils/mc/patches/010-subshell.patch create mode 100644 utils/minicom/Makefile create mode 100644 utils/minicom/patches/100-fix_iconv_include.patch create mode 100644 utils/minicom/patches/101-fix_music_includes.patch create mode 100644 utils/minicom/patches/102-fix_musl_compatibility.patch create mode 100644 utils/minicom/patches/110-reproducible-builds.patch create mode 100644 utils/mksh/Makefile create mode 100644 utils/mksh/patches/100-dot_mkshrc create mode 100644 utils/mktorrent/Makefile create mode 100644 utils/mmc-utils/Makefile create mode 100644 utils/mmc-utils/patches/001-properly-set-fortify-source-in-makefile.patch create mode 100644 utils/moreutils/Makefile create mode 100644 utils/moreutils/patches/001_disable-manuals.patch create mode 100644 utils/moreutils/patches/002_no-install-strip.patch create mode 100644 utils/mpack/Makefile create mode 100644 utils/mpack/patches/001-use-stdlib.patch create mode 100644 utils/mt-st/Makefile create mode 100644 utils/nano/Makefile create mode 100644 utils/nano/patches/001-upstream-fix-for-3.1-tiny-compilation.patch create mode 100644 utils/ncdu/Makefile create mode 100644 utils/netwhere/Makefile create mode 100644 utils/ntfs-3g/Makefile create mode 100644 utils/ntfs-3g/patches/001-fuseint-fix-path-mounted-on-musl.patch create mode 100644 utils/oath-toolkit/Makefile create mode 100644 utils/open-plc-utils/Makefile create mode 100644 utils/open-plc-utils/patches/100-remove-build-timestamp.patch create mode 100644 utils/open2300/Makefile create mode 100644 utils/open2300/files/open2300.conf create mode 100644 utils/open2300/patches/001-crosscompile.patch create mode 100644 utils/openobex/Makefile create mode 100644 utils/openobex/patches/001-cxx.patch create mode 100644 utils/openocd/Makefile create mode 100644 utils/opensc/Makefile create mode 100644 utils/openzwave/Makefile create mode 100644 utils/openzwave/patches/001-unix-fix-compilation-against-musl-libc-1127.patch create mode 100644 utils/openzwave/patches/900_fix-build.patch create mode 100644 utils/openzwave/patches/901_no-hidcontroller.patch create mode 100644 utils/openzwave/patches/902_no-udev.patch create mode 100644 utils/openzwave/patches/904-fix-lib-include-path.patch create mode 100644 utils/owfs/Config.in create mode 100644 utils/owfs/Makefile create mode 100644 utils/owfs/files/owfs.conf create mode 100644 utils/owfs/files/owfs.init create mode 100644 utils/owfs/files/owftpd.conf create mode 100644 utils/owfs/files/owftpd.init create mode 100644 utils/owfs/files/owhttpd.conf create mode 100644 utils/owfs/files/owhttpd.init create mode 100644 utils/owfs/files/owserver.conf create mode 100644 utils/owfs/files/owserver.init create mode 100644 utils/owfs/patches/100-fix-netlink-w1-status-message-detection.patch create mode 100644 utils/owfs/patches/101-fix-no-reset-routine-segfault.patch create mode 100644 utils/pciutils/Makefile create mode 100644 utils/pciutils/patches/100-remove-no-timestamping.patch create mode 100644 utils/pciutils/patches/101-no-strip.patch create mode 100644 utils/pciutils/patches/102-compressed-ids.patch create mode 100644 utils/pciutils/patches/103-relative-path-ids.patch create mode 100644 utils/pciutils/patches/104-resolv.patch create mode 100644 utils/pciutils/patches/105-fix-host.patch create mode 100644 utils/pcmciautils/Makefile create mode 100644 utils/pcmciautils/files/etc/hotplug.d/pcmcia/pcmcia.agent create mode 100644 utils/pcmciautils/files/etc/hotplug.d/pcmcia_socket/pcmcia_socket.agent create mode 100755 utils/pcmciautils/files/etc/init.d/pcmcia create mode 100755 utils/pcmciautils/files/etc/init.d/pcmcia_socket create mode 100644 utils/pcmciautils/patches/001-switch_unsigned.patch create mode 100644 utils/pcmciautils/patches/002-disable_yywrap.patch create mode 100644 utils/pcsc-lite/Makefile create mode 100644 utils/pcsc-lite/files/pcscd.init create mode 100644 utils/pcsc-tools/Makefile create mode 100644 utils/pcsc-tools/patches/001-disable-atr.patch create mode 100644 utils/picocom/Makefile create mode 100644 utils/picocom/patches/100-musl-compat.patch create mode 100644 utils/pps-tools/Makefile create mode 100644 utils/procps-ng/Makefile create mode 100644 utils/procps-ng/patches/100-no-tests-docs.patch create mode 100644 utils/progress/Makefile create mode 100644 utils/progress/patches/001_set-ncurses-lib.patch create mode 100644 utils/prometheus-node-exporter-lua/Makefile create mode 100644 utils/prometheus-node-exporter-lua/files/etc/config/prometheus-node-exporter-lua create mode 100644 utils/prometheus-node-exporter-lua/files/etc/init.d/prometheus-node-exporter-lua create mode 100755 utils/prometheus-node-exporter-lua/files/usr/bin/prometheus-node-exporter-lua create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/bmx6.lua create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/bmx7.lua create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/conntrack.lua create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/cpu.lua create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/filefd.lua create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/loadavg.lua create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/meminfo.lua create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/nat_traffic.lua create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/netdev.lua create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/netstat.lua create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/openwrt.lua create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/textfile.lua create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/time.lua create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/uname.lua create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/wifi.lua create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/wifi_stations.lua create mode 100644 utils/pv/Makefile create mode 100644 utils/qemu/Makefile create mode 100755 utils/qemu/files/00-virtio-ports.hotplug create mode 100755 utils/qemu/files/10-qemu-ga.hotplug create mode 100644 utils/qemu/files/bridge.conf create mode 100755 utils/qemu/files/qemu-ga.init create mode 100644 utils/qemu/patches/0001-configure-allow-disable-fortify_source.patch create mode 100644 utils/qemu/patches/0002-disas-fix-compilation-failure-when-isnan-is-a-macro.patch create mode 100644 utils/qemu/patches/0003-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch create mode 100644 utils/relayctl/Makefile create mode 100644 utils/relayctl/patches/0001-ftdi1.patch create mode 100644 utils/rng-tools/Makefile create mode 100644 utils/rng-tools/files/rngd.init create mode 100644 utils/rng-tools/files/rngd.uci_defaults create mode 100644 utils/rng-tools/patches/100-message-no-newline.patch create mode 100644 utils/rpcd-mod-lxc/Makefile create mode 100644 utils/rpcd-mod-lxc/files/CMakeLists.txt create mode 100644 utils/rpcd-mod-lxc/files/lxc.c create mode 100644 utils/rrdtool1/Makefile create mode 100644 utils/rrdtool1/patches/001-no_ordering_cd_joke.patch create mode 100644 utils/rrdtool1/patches/002-no_timezone.patch create mode 100644 utils/rrdtool1/patches/020-x86-float-cast.patch create mode 100644 utils/rrdtool1/patches/030-pod2man-stderr.patch create mode 100644 utils/rtklib/Makefile create mode 100644 utils/rtl-ais/Makefile create mode 100644 utils/rtl-ais/files/rtl_ais.init create mode 100644 utils/rtl-ais/files/uci_rtl_ais create mode 100644 utils/rtl-sdr/Makefile create mode 100644 utils/rtl-sdr/files/rtl_tcp.config create mode 100755 utils/rtl-sdr/files/rtl_tcp.init create mode 100644 utils/rtl-sdr/patches/101-fix-inlines.patch create mode 100644 utils/rtl_433/Makefile create mode 100755 utils/rtty/Makefile create mode 100644 utils/rtty/files/rtty.config create mode 100644 utils/rtty/files/rtty.init create mode 100644 utils/sane-backends/Makefile create mode 100644 utils/sane-backends/files/xinet.d_sane-port create mode 100644 utils/sane-backends/patches/002-remove-uneeded.patch create mode 100644 utils/sane-backends/patches/031-fix_uclibc.patch create mode 100644 utils/sane-backends/patches/050-remove_linked_libs_for_unused_preload.patch create mode 100644 utils/screen/Makefile create mode 100644 utils/screen/files/etc/screenrc create mode 100644 utils/screen/patches/100-cross_compile_fix.patch create mode 100644 utils/screen/patches/110-do_not_add_srcdir_to_include_path.patch create mode 100644 utils/screen/patches/200-musl-compat.patch create mode 100644 utils/serialconsole/Makefile create mode 100644 utils/setserial/Makefile create mode 100644 utils/shadow/Makefile create mode 100644 utils/shadow/patches/001-busybox_ash.patch create mode 100644 utils/shadow/patches/002-disable-ruser-lookup.patch create mode 100644 utils/shadow/patches/003-Check-size-of-uid_t-and-gid_t-using-AC_CHECK_SIZEOF.patch create mode 100644 utils/shadow/patches/004-fix-su-controoling-term.patch create mode 100644 utils/sispmctl/Makefile create mode 100644 utils/sispmctl/patches/001-fix-includes.patch create mode 100644 utils/slide-switch/Makefile create mode 100644 utils/smartmontools/Makefile create mode 100644 utils/smartmontools/files/smartd.conf create mode 100644 utils/smartmontools/files/smartd.init create mode 100644 utils/smartmontools/patches/001-musl-compat-realpath.patch create mode 100644 utils/smstools3/Makefile create mode 100644 utils/smstools3/files/smstools3.conf create mode 100644 utils/smstools3/files/smstools3.init create mode 100644 utils/smstools3/patches/002-Makefile.patch create mode 100644 utils/smstools3/patches/003-bash-ash.patch create mode 100644 utils/smstools3/patches/004-modem-processes.patch create mode 100644 utils/sockread/Makefile create mode 100644 utils/sockread/src/Makefile create mode 100644 utils/sockread/src/main.c create mode 100644 utils/spi-tools/Makefile create mode 100644 utils/squashfs-tools/Config.in create mode 100644 utils/squashfs-tools/Makefile create mode 100644 utils/squashfs-tools/patches/0003-mksquashfs.c-get-inline-functions-work-with-C99.patch create mode 100644 utils/squashfs-tools/patches/0004-vla-to-malloc.patch create mode 100644 utils/stm32flash/Makefile create mode 100644 utils/stoken/Makefile create mode 100644 utils/stress/Makefile create mode 100644 utils/sumo/Makefile create mode 100644 utils/sumo/files/sumo.sh create mode 100644 utils/sumo/patches/100-configure_fix.patch create mode 100644 utils/swig/Makefile create mode 100644 utils/swig/patches/0001-Add-Node-7.x-aka-V8-5.2-support.patch create mode 100644 utils/sysstat/Makefile create mode 100644 utils/sysstat/files/sysstat.config create mode 100755 utils/sysstat/files/sysstat.init create mode 100644 utils/sysstat/patches/100-musl-compat.patch create mode 100644 utils/sysstat/patches/110-remove-sccsid.patch create mode 100644 utils/tar/Makefile create mode 100644 utils/taskwarrior/Makefile create mode 100644 utils/tcsh/Makefile create mode 100644 utils/tcsh/patches/001-sysmalloc.patch create mode 100644 utils/tio/Makefile create mode 100644 utils/tmux/Makefile create mode 100644 utils/tracertools/Makefile create mode 100644 utils/tree/Makefile create mode 100644 utils/triggerhappy/Makefile create mode 100644 utils/triggerhappy/files/triggerhappy-example.conf create mode 100644 utils/triggerhappy/files/triggerhappy.hotplug create mode 100644 utils/triggerhappy/files/triggerhappy.init create mode 100644 utils/ttyd/Makefile create mode 100644 utils/uledd/Makefile create mode 100644 utils/uledd/files/uledd.init create mode 100644 utils/unrar/Makefile create mode 100644 utils/unrar/patches/100-makefile_fixes.patch create mode 100644 utils/unzip/Makefile create mode 100644 utils/unzip/patches/001-CVE-2014-8139-crc-overflow.patch create mode 100644 utils/unzip/patches/002-CVE-2014-8140-test-compr-eb.patch create mode 100644 utils/unzip/patches/003-CVE-2014-8141-getzip64data.patch create mode 100644 utils/unzip/patches/004-CVE-2014-9636-test-compr-eb.patch create mode 100644 utils/unzip/patches/005-CVE-2015-7696-heap-overflow.patch create mode 100644 utils/unzip/patches/006-CVE-2015-7697-infinite-loop.patch create mode 100644 utils/unzip/patches/007-integer-underflow-csiz_decrypted.patch create mode 100644 utils/unzip/patches/008-cve-2014-9913-unzip-buffer-overflow.patch create mode 100644 utils/unzip/patches/009-cve-2016-9844-zipinfo-buffer-overflow.patch create mode 100644 utils/unzip/patches/010-remove-build-date.patch create mode 100644 utils/usbmuxd/Makefile create mode 100644 utils/uvcdynctrl/Makefile create mode 100644 utils/vim/Makefile create mode 100644 utils/vim/files/vimrc create mode 100644 utils/vim/files/vimrc.full create mode 100644 utils/vim/patches/001-support-defining-compilation-date-in-SOURCE_DATE_EPOCH.patch create mode 100644 utils/vim/patches/002-remove_helptags_generation.patch create mode 100644 utils/watchcat/Makefile create mode 100644 utils/watchcat/files/initd_watchcat create mode 100644 utils/watchcat/files/uci_defaults_watchcat create mode 100644 utils/watchcat/files/watchcat.sh create mode 100644 utils/wifitoggle/Makefile create mode 100755 utils/wifitoggle/files/wifitoggle.config create mode 100755 utils/wifitoggle/files/wifitoggle.hotplug create mode 100644 utils/xz/Makefile create mode 100644 utils/yara/Config.in create mode 100644 utils/yara/Makefile create mode 100644 utils/yunbridge/Makefile create mode 100644 utils/yunbridge/files/etc/config/yunbridge create mode 100755 utils/yunbridge/files/etc/init.d/yunbridge create mode 100755 utils/yunbridge/files/sbin/yunbridge create mode 100755 utils/yunbridge/files/usr/bin/pretty-wifi-info.lua create mode 100644 utils/yunbridge/files/usr/lib/lua/luci/controller/arduino/index.lua create mode 100644 utils/yunbridge/files/usr/lib/lua/luci/sha256.lua create mode 100644 utils/yunbridge/patches/000-scripts.patch create mode 100644 utils/zile/Makefile create mode 100644 utils/zile/patches/010-remove_gets_definition_warning.patch create mode 100644 utils/zip/Makefile create mode 100644 utils/zip/patches/001-unix-configure-borrow-the-LFS-test-from-autotools.patch create mode 100644 utils/zip/patches/010-remove-build-date.patch create mode 100644 utils/zoneinfo/Makefile create mode 100644 utils/zsh/Makefile diff --git a/.github/issue_template b/.github/issue_template new file mode 100644 index 00000000..73602ae6 --- /dev/null +++ b/.github/issue_template @@ -0,0 +1,17 @@ +Please make sure that the issue subject starts with `: ` + +This repo here is only for packages maintained in this repo. For base packages residing in the same repo as the build system and maintained by core devs, please consider opening tickets there for more timely responses + + - OpenWrt base system: https://bugs.openwrt.org + - Most LuCI packages: https://github.com/openwrt/luci/issues + +# Issue template (remove lines from top till here) + +Maintainer: @\ (find it by checking history of the package Makefile) +Environment: (put here arch, model, OpenWrt version) + +Description: + +``` +Formating code blocks by wrapping them with pairs of ``` +``` diff --git a/.github/pull_request_template b/.github/pull_request_template new file mode 100644 index 00000000..4bc4af61 --- /dev/null +++ b/.github/pull_request_template @@ -0,0 +1,5 @@ +Maintainer: me / @\ (find it by checking history of the package Makefile) +Compile tested: (put here arch, model, OpenWrt version) +Run tested: (put here arch, model, OpenWrt version, tests done) + +Description: diff --git a/.keys/626471F1.asc b/.keys/626471F1.asc new file mode 100644 index 00000000..3a968957 --- /dev/null +++ b/.keys/626471F1.asc @@ -0,0 +1,64 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Comment: LEDE GnuPG key for unattended build jobs + +mQINBFeXZ7wBEAC3QZ+jhWrdj2XW9AdZpZrgHETZCW7lXxI3pJ2kS4UXNq+40KR2 +GJOdsXDnLb7ZiHNn6yio6qKLXFD/bimxK+22HSJlc3LSF2kKzNrgKoFR2rIKbL3c +Us7GpWY8VqGTrfwR6OQNcoWqa1n5/tK9xuqKhfpoA2Eci8K+w5YCzCmnOz2vzbgS +ptuFshTKYI2Z/DLQZyP+OQkEYPfCdani2KsISn4DTx8xFjmW/sb/zf0isemTwWyK +Oh76FTa0tYdjTtAv3JHqyr2XkddM/oUSc09baCOfhUdo7Ep5rUqKw7BQsjreBYoZ +WcL/hmlIksUrFlqo/HRpoBgCZpSjsF/Z9otZpSugMHVVlRCnAKQiWxWAd+V+y2FG +q79myPgiMkbkaIrCelrUhDFRQ5wTnfAppFolw+xtT9bwdkwxZDNBe6PCYuLqD8wg +jtDtt3q5UaUOMGJrMDKZ0Wi6ycdl/sM59kLfyBV4ybmYkwOLTlMvOATiyUZeJJZO +2bTKBvD+izsx3Ea4VLPWYSFmk6QwaOMtj6tcXwBgtljzqMJ0S9Gubmopy3WAkP/m +/6ETJpuIupqEtvbRTX4O/+qnBgY40aQX7B4NgJi2SypP/WML5v2B2amLlhTcN+we +ULWyH9KvfKny5mrtG5C9xq1eAgKtB2QEDEbRyz34DWVWGpqIY1mscaNv8wARAQAB +tFtMRURFIEJ1aWxkIFN5c3RlbSAoTEVERSBHbnVQRyBrZXkgZm9yIHVuYXR0ZW5k +ZWQgYnVpbGQgam9icykgPGxlZGUtYWRtQGxpc3RzLmluZnJhZGVhZC5vcmc+iQI4 +BBMBAgAiBQJXl2e8AhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRDNhLzt +YmRx8aJ2D/9eRQWekaeX8eAcAgzguFS12ODlg23lJx00d0zLhZcA6LycYJRmFN+M +0tsVDZ6y7bLy1/h0YFYvYlJk4ZE+6sb4I/GSkMyqeZAy8whELYfEphXVYx0/wgyn +d57wE0lDo8/zmt3rK1eD0zJioN7cL3A/t3L++al4gwmqtTfUIl96AXc3YBe/rwXS +i7ShENVKYjTaMugP5BJ9kUZuaIjmXZWvREbURgBMWR7uR56XKJBwDBQMtHq2AoZs +2iNR3dG8r70Sb/cMSgAqhwDZfeV71r7+Pd+asvxYb0JeNNgZ2ss/BA5yapUKZLgu +hV6y7JSfHdb7q1t1j/wfqgYtQJB5K31JGxj+yaRxcF8LbvGZBNhaIJV+s4HmTeq4 +yI20pCRNd8lLY80XAISTk8DPwgTLOvMPKbDYW4+/FC8J6qoD9DByQxDduUWn5uD4 +LbVZ96v9+Ltf9LJzaxFVSE/dSsvgFNjo6u29ueG6aTxUIOc4Wi3mC0qNhqoyAbg6 +Xg922EF/sd6hf3aQU9rpcPbcsNognGgrKfyREvMlBsQ9U3pRcKPlG05bfUcayXkh +59qIVU4kKCaW6LBy1fkBYyY3Nj5eoCAe9fm9ivi58FdI+7sKc2A1fMuVS83B370s +qAsu6v2rvqYz6nS5VFIWYJmL8kbUmf5FWwbucH7/jr9s3bB0wUHcI7kCDQRXl2h/ +ARAAztMdT5ig5MKM02TFsmGvdc0SQVHPJymPTh6i/XwAbSeaTErvGLP3ke+2cdCj +MOes4steII5MU6aD57i1zU/6xhZ2Zr8sZ4fCOzfqoI4AOIeeuiO+I5by2P+M+vj2 +v/U7KMWeixFjTkotWcvGGriP1jcRY1FHMrTfq/5lZYNHHzz/2zvszq02/WP+b/Gh +1Rf1yfr5DlXKw6Q+7fkCg8BWfLichTtHiR0OcO0mtD6ECxz+iqDElbSAeE9Q02fO +FTF4snHwCJvykHQ4EKudEoXcIEOR8TyH2tKorD821E/DSV9OA9XIBpDHavFQ3GCs +29GQcqci46nOLn/LWqgTB86sgH4mnQrGsceVYzf8avM8c8TyxkufBd/k01lPn1sK +/573AWdFRXVmOCMmlxPcI8k1+iGH1C7z0aX43NvhEI3xfbgTK8E/7Klrn/5xXUu2 +UBYov0gKaZRy3LpGF/ySR1pvnHZmUP58my2LDfWDHdHrGmkjLaqyk/+qC9NKwUQB +S7jV7Mm15B0bkR7grLx+vN5lXVeGwyDL2dbRT0+cH8loHb+lBOR8AbDm4SJXdaRd +DtPyq85KN+jm+9NToRz+oydL9rmguU5zRcIDtaFiYr7ZtkLJU3U02rp0uf/DdytF +tzS/YEbpgg2Ui37q55ml707zJL2DvBffy/F2kiNpVfZ4u5cAEQEAAYkEPgQYAQIA +CQUCV5dofwIbAgIpCRDNhLztYmRx8cFdIAQZAQIABgUCV5dofwAKCRD5NSWoi2mQ +KQ/PD/9c/snQ2iok9H9PFinYmuOA6tf4Nbn0yX9oOTslDJ8ot6SB4OXGXGeT0lvq +ytbYVeAlifBElYRVFYZt76dbjhqmsmDMZsYHbaXIYLZSPuTETVE3pZrpWhm9Qkhb +eEyihAofgWleBmJcd8VXnrzsNkJGNokA6gqZ/ldqJtzMwkeHM58DHo/gFNNNlxe8 +M83PHA0rN48F6DU4tZeEvz+/QGrnn4DWcBhmWo+2ZLvTLI4cB9389j8ks7FFFXLi +1gnWigWr29uGv8iZpAneY6414cZW3G79wTIwAATRvIvrI9pcvriUrMdOycTcwXOa +d9eXq/mJdg8dEpKiIA8Vc9UNdT93aZt8r610LbORmdq+wFjEhWvh7xKu9hFm/3UM +QUaVl3jsIlqZT4G8es+RLHnKVOzLMRovqRKRbsCsXxIxsVqxzhKQ5+wLCpisVNfH +51WCTSLoAz7s0jKLCSzueUIbhV2vNBM5lFLNCl35UgN1aYuRusI7GyqkPT/A8VWj +xVxn7o2SBIwyu4hZ4jFsq3qHOygIuRtdOHRX1vREmp7FA3+fVnx0CJUilfnGjhf/ +oydfEC6GuWUn9kTEf2eJsONwQ9gPQ9QC9cFGRFRrVwQcejr7V+DBZSdzY8YLvn7R +qR3MmlXdpWijqj7noi2C+kbVqbLiX/LWe2axgKE+UTB7lGdl7v25D/99uFIzJmqA +dhEAEQgb17L7kOV0MOBwFtZ6fElJaQEQV49JiQmgTzALDgXD0ACpT5qoQYCBTwuz +m2D93ekfMnzxF8PmwW6a2czrG1KoRir2EayhgEoOJuWHLneb5nUc7X3krGNSJ3my ++lMw2QA3wIX7EAS6JJUnZFp7wawecdCekRF9ZE1Z/ZBiUZR17DkbAoYjEYZFxiXA +cG6sFEM9uTG+y91RcQPq8tY+jw2d76ZjHSnoKjnP2VxsmtiWQ7yLj/5tjrVzQftI +bbQQTK4V4O4aV2Y1wgkDbNPNJ6t0biQkHQv+4vaLMonOfMgGdWdYJ4hE9nlt61Aq +GidOnyMxOb+2XpVypOoOPcTyTqe8BUjCcvHQwukZLk3XE7OQoR0wZBFhOr4JCYzT +xIz9XYrSykZgkZMp8O4zbP+j1ZTXtJEvvPHjOS1HkL1O1H+W98dnl+oQMNQhHvvE +6UfWEolfuWvBpfP12pUnRQAAyCBql4JAFeoCJEdJGkz8oFOFxv0kCpd7JM1gWEs2 +u0w61+5MelmliHImWiyhgV4XyKW6jeKWIpe9E5L7b8SPI5HHdT7opy3G7aD1XI3k +jdaIiMnJbq0nSvc5VqRE7Uv0EEcepvFeiuYHYydluxRyNf/ts2JskfEnsOc1JiS+ +GPeIoGmFL85qtFOzc4sqYQGhLj9iMRfmNw== +=W2Tk +-----END PGP PUBLIC KEY BLOCK----- diff --git a/.keys/D52BBB6B.asc b/.keys/D52BBB6B.asc new file mode 100644 index 00000000..7a001d88 --- /dev/null +++ b/.keys/D52BBB6B.asc @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Comment: LEDE 17.01 "Reboot" public key + +mQINBFh9DQ8BEACmjR9z4mEXjTWBTcqHI8U38III55qStU4zX4mtYEm8KjaNyBu0 +F8ghe22IAPQcHuvQh0lzr2AoTYi+ZAUlHrLb3s+YdJJD2KoSD1nXW8PgtoT92tai +utJjSKsB2ZWJc4nskAYXTkDmhTuuHBEg9hvljhXkrPxmcEDN/v1f5fv82U8JLYwt +g1mGJmW7SsdKtkJbAmEMCi/MFFA2fxLNV33qGhzm4UeAsUrLIGBjbCtU/BK8Im28 +eAF9VP08OUK/QX7te6K6qumvuEIIc/GG4yatdbxltS1SjWYMS0vpqXm4v50CoMaB +/XCcdq1zlIyIxQW9UF6xJDLhsHv/3iOginR/vRDbdRWk/YPwlx/d9h9GK309YhXu +GUK/lrBHIZwZ4VEowYjK76isXmRuU9ZeTK9SeKdIyLzYg5NIXW9cvGR+4NKIqfmE +xxbVupm7Vc+3n4KUdS2t9SLXdkG+YYmyDabftyuACU2+xeHyKcUBn4yxbrcBp5Rs +5RgOIn/2BtiEQNSc8AagU1ie57VGErrwrpdW/Cmxrs+KG7Io8Pwv+nG9M53DqPwb +Zuun75iuni9wAR5IVUsUWdIoalb/I4ht58FDOt2iS/KdVwi8yyCHS8gH1J3MzZWP +Yy9k0pgup54CTXGv/KzDOAsPZzkwNiziWIVE0N49bZFkO0CXgAufOAEtewARAQAB +tFNMRURFIFJlbGVhc2UgQnVpbGRlciAoMTcuMDEgIlJlYm9vdCIgU2lnbmluZyBL +ZXkpIDxsZWRlLWRldkBsaXN0cy5sZWRlLXByb2plY3Qub3JnPokCPgQTAQIAKAUC +WH0NDwIbAwUJA8JnAAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQgzxgENUr +u2tMaA//aRvfrOoMTVtjw+Pru+hBC7IhkusJ70x8gUxSPmHZX0+KvIvILyAeVEho +TW5lMwwo6b66GcBmP53qu/rech8HyunyyDUYFEvdE/ym3uO6NpE/3N/Z69TJiC+k +1imElx5njTZkH/qZSClqN8j6ehspywnSKWNfSOM/9K1G7qtWgiqIaDYa+sdtRHjx +oh4dtKiauUced0C1i7V1vT1ko8iZKWFiwj9GJSaoVxyUwI2fG3iV2qdcinPCL0nU +BfVIhU5cXMZ6VtVg5Ly6NqUbrhZzVVl8DMnu5z4MOLZWseob4LhK5W0v+DUTezJS +Cvei+woJ3SIy0CLXe6eDKwbCS5kCaoNbExeTnSz7/Mg14NjREhtWkq79rnHrH9MV +QAXyjmd3q0D5sDLzk8nQ3fGaH1Zg+o+VECkwEwz4ypctXqRAcHyIkYHmv8rFYlQY +dJlfs1NgZzk9EWfZ0/RLUdqNx6beKm27r2W1j+gcaM01sk5q9TPZeuNHh8psFlCD +b5mq6XBstA9NwN9pg5zS+UkfjjMU5FiBIEVv4Lt/dblNkjID/+XUBkHpSAz13GDW +k0ElkSBgBvz8TSm68EUGTfTVhK21x+1x15/8AUoV8V+4txncMhnJNmrEcKolnMeF +96xgcoHpPszlHxjiwS6hrFPDyhfYwU9plDI7ojcIleqK98XjRHY= +=aN5O +-----END PGP PUBLIC KEY BLOCK----- diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..e6668f93 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +git: + depth: 10 + quiet: true + +language: c +dist: trusty +sudo: false +cache: + directories: + - $HOME/sdk + +before_script: + - ./.travis_do.sh download_sdk + +script: + - ./.travis_do.sh test_packages diff --git a/.travis_do.sh b/.travis_do.sh new file mode 100755 index 00000000..63cd1d77 --- /dev/null +++ b/.travis_do.sh @@ -0,0 +1,241 @@ +#!/bin/bash +# +# MIT Alexander Couzens + +set -e + +SDK_HOME="$HOME/sdk" +SDK_PATH=https://downloads.lede-project.org/snapshots/targets/ar71xx/generic/ +SDK=-sdk-ar71xx-generic_ +PACKAGES_DIR="$PWD" + +echo_red() { printf "\033[1;31m$*\033[m\n"; } +echo_green() { printf "\033[1;32m$*\033[m\n"; } +echo_blue() { printf "\033[1;34m$*\033[m\n"; } + +exec_status() { + PATTERN="$1" + shift + while :;do sleep 590;echo "still running (please don't kill me Travis)";done & + ("$@" 2>&1) | tee logoutput + R=${PIPESTATUS[0]} + kill $! && wait $! 2>/dev/null + if [ $R -ne 0 ]; then + echo_red "=> '$*' failed (return code $R)" + return 1 + fi + if grep -qE "$PATTERN" logoutput; then + echo_red "=> '$*' failed (log matched '$PATTERN')" + return 1 + fi + + echo_green "=> '$*' successful" + return 0 +} + +get_sdk_file() { + if [ -e "$SDK_HOME/sha256sums" ] ; then + grep -- "$SDK" "$SDK_HOME/sha256sums" | awk '{print $2}' | sed 's/*//g' + else + false + fi +} + +# download will run on the `before_script` step +# The travis cache will be used (all files under $HOME/sdk/). Meaning +# We don't have to download the file again +download_sdk() { + mkdir -p "$SDK_HOME" + cd "$SDK_HOME" + + echo_blue "=== download SDK" + wget "$SDK_PATH/sha256sums" -O sha256sums + wget "$SDK_PATH/sha256sums.gpg" -O sha256sums.asc + + # LEDE Build System (LEDE GnuPG key for unattended build jobs) + gpg --import $PACKAGES_DIR/.keys/626471F1.asc + echo '54CC74307A2C6DC9CE618269CD84BCED626471F1:6:' | gpg --import-ownertrust + # LEDE Release Builder (17.01 "Reboot" Signing Key) + gpg --import $PACKAGES_DIR/.keys/D52BBB6B.asc + echo 'B09BE781AE8A0CD4702FDCD3833C6010D52BBB6B:6:' | gpg --import-ownertrust + + echo_blue "=== Verifying sha256sums signature" + gpg --verify sha256sums.asc + echo_blue "=== Verified sha256sums signature." + if ! grep -- "$SDK" sha256sums > sha256sums.small ; then + echo_red "=== Can not find $SDK file in sha256sums." + echo_red "=== Is \$SDK out of date?" + false + fi + + # if missing, outdated or invalid, download again + if ! sha256sum -c ./sha256sums.small ; then + local sdk_file + sdk_file="$(get_sdk_file)" + echo_blue "=== sha256 doesn't match or SDK file wasn't downloaded yet." + echo_blue "=== Downloading a fresh version" + wget "$SDK_PATH/$sdk_file" -O "$sdk_file" + fi + + # check again and fail here if the file is still bad + echo_blue "Checking sha256sum a second time" + if ! sha256sum -c ./sha256sums.small ; then + echo_red "=== SDK can not be verified!" + false + fi + echo_blue "=== SDK is up-to-date" +} + +# test_package will run on the `script` step. +# test_package call make download check for very new/modified package +test_packages2() { + local commit_range=$TRAVIS_COMMIT_RANGE + if [ -z "$TRAVIS_PULL_REQUEST_SHA" ]; then + echo_blue "Using only the latest commit, since we're not in a Pull Request" + commit_range=HEAD~1 + fi + + # search for new or modified packages. PKGS will hold a list of package like 'admin/muninlite admin/monit ...' + PKGS=$(git diff --diff-filter=d --name-only "$commit_range" | grep 'Makefile$' | grep -v '/files/' | awk -F'/Makefile' '{ print $1 }') + + if [ -z "$PKGS" ] ; then + echo_blue "No new or modified packages found!" + return 0 + fi + + echo_blue "=== Found new/modified packages:" + for pkg in $PKGS ; do + echo "===+ $pkg" + done + + echo_blue "=== Setting up SDK" + tmp_path=$(mktemp -d) + cd "$tmp_path" + tar Jxf "$SDK_HOME/$(get_sdk_file)" --strip=1 + + # use github mirrors to spare lede servers + cat > feeds.conf < /dev/null + ./scripts/feeds install -a > /dev/null + make defconfig > /dev/null + echo_blue "=== Setting up SDK done" + + RET=0 + # E.g: pkg_dir => admin/muninlite + # pkg_name => muninlite + for pkg_dir in $PKGS ; do + pkg_name=$(echo "$pkg_dir" | awk -F/ '{ print $NF }') + echo_blue "=== $pkg_name: Starting quick tests" + + exec_status '^ERROR' make "package/$pkg_name/download" V=s || RET=1 + exec_status '^ERROR' make "package/$pkg_name/check" V=s || RET=1 + + echo_blue "=== $pkg_name: quick tests done" + done + + [ $RET -ne 0 ] && return $RET + + for pkg_dir in $PKGS ; do + pkg_name=$(echo "$pkg_dir" | awk -F/ '{ print $NF }') + echo_blue "=== $pkg_name: Starting compile test" + + # we can't enable verbose built else we often hit Travis limits + # on log size and the job get killed + exec_status '^ERROR' make "package/$pkg_name/compile" -j3 || RET=1 + + echo_blue "=== $pkg_name: compile test done" + + echo_blue "=== $pkg_name: begin compile logs" + for f in $(find logs/package/feeds/packages/$pkg_name/ -type f); do + echo_blue "Printing last 200 lines of $f" + tail -n200 "$f" + done + echo_blue "=== $pkg_name: end compile logs" + + echo_blue "=== $pkg_name: begin packages sizes" + du -ba bin/ + echo_blue "=== $pkg_name: end packages sizes" + done + + return $RET +} + +test_commits() { + RET=0 + if [ -z "$TRAVIS_PULL_REQUEST_SHA" ]; then + echo_blue "Skipping commits tests (not in a Pull Request)" + return 0 + fi + for commit in $(git rev-list ${TRAVIS_COMMIT_RANGE/.../..}); do + echo_blue "=== Checking commit '$commit'" + if git show --format='%P' -s $commit | grep -qF ' '; then + echo_red "Pull request should not include merge commits" + RET=1 + fi + + author="$(git show -s --format=%aN $commit)" + if echo $author | grep -q '\S\+\s\+\S\+'; then + echo_green "Author name ($author) seems ok" + else + echo_red "Author name ($author) need to be your real name 'firstname lastname'" + RET=1 + fi + + subject="$(git show -s --format=%s $commit)" + if echo "$subject" | grep -q -e '^[0-9A-Za-z,/_-]\+: ' -e '^Revert '; then + echo_green "Commit subject line seems ok ($subject)" + else + echo_red "Commit subject line MUST start with ': ' ($subject)" + RET=1 + fi + + body="$(git show -s --format=%b $commit)" + sob="$(git show -s --format='Signed-off-by: %aN <%aE>' $commit)" + if echo "$body" | grep -qF "$sob"; then + echo_green "Signed-off-by match author" + else + echo_red "Signed-off-by is missing or doesn't match author (should be '$sob')" + RET=1 + fi + done + + return $RET +} + +test_packages() { + test_commits && test_packages2 || return 1 +} + +echo_blue "=== Travis ENV" +env +echo_blue "=== Travis ENV" + +if [ -n "$TRAVIS_PULL_REQUEST_SHA" ]; then + while true; do + # if clone depth is too small, git rev-list / diff return incorrect or empty results + C="$(git rev-list ${TRAVIS_COMMIT_RANGE/.../..} | tail -n1)" 2>/dev/null + [ -n "$C" -a "$C" != "a22de9b74cf9579d1ce7e6cf1845b4afa4277b00" ] && break + echo_blue "Fetching 50 commits more" + git fetch origin --deepen=50 + done +fi + +if [ $# -ne 1 ] ; then + cat < for overall format and construction) + + +### Basic guidelines + +All packages you commit or submit by pull-request should follow these simple guidelines: +* Package a version which is still maintained by the upstream author. +* Will be updated regularly to maintained and supported versions. +* Have no dependencies outside the OpenWrt core packages or this repository feed. +* Have been tested to compile with the correct includes and dependencies. Please also test with "Compile with full language support" found under "General Build Settings" set if language support is relevant to your package. +* Do NOT use a rolling source file (e.g. foo-latest.tar.gz) or the head of a branch as source for the package since that would create unpredictable builds which change over time. +* 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 `) +* 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_FILES tag including the filenames of the license-files in the source-package. + (E.g.: PKG_LICENSE_FILES:=COPYING) +* PKG_RELEASE should be initially set to 1 or reset to 1 if the software version is changed. You should increment it if the package itself has changed. For example, modifying a support script, changing configure options like --disable* or --enable* switches, or if you changed something in the package which causes the resulting binaries to be different. Changes like correcting md5sums, changing mirror URLs, adding a maintainer field or updating a comment or copyright year in a Makefile do not require a change to PKG_RELEASE. +* Avoid reuse of PKG_NAME in call, define and eval lines to improve readability. + +#### Commits in your pull-requests should: + +* Have a useful description prefixed with the package name + (E.g.: "foopkg: Add libzot dependency") +* Include Signed-off-by in the comment + (See ) + +### Advice on pull requests: + +Pull requests are the easiest way to contribute changes to git repos at Github. They are the preferred contribution method, as they offer a nice way for commenting and amending the proposed changes. + +* You need a local "fork" of the Github repo. +* Use a "feature branch" for your changes. That separates the changes in the pull request from your other changes and makes it easy to edit/amend commits in the pull request. Workflow using "feature_x" as the example: + - Update your local git fork to the tip (of the master, usually) + - Create the feature branch with `git checkout -b feature_x` + - Edit changes and commit them locally + - Push them to your Github fork by `git push -u origin feature_x`. That creates the "feature_x" branch at your Github fork and sets it as the remote of this branch + - When you now visit Github, you should see a proposal to create a pull request + +* If you later need to add new commits to the pull request, you can simply commit the changes to the local branch and then use `git push` to automatically update the pull request. + +* If you need to change something in the existing pull request (e.g. to add a missing signed-off-by line to the commit message), you can use `git push -f` to overwrite the original commits. That is easy and safe when using a feature branch. Example workflow: + - Checkout the feature branch by `git checkout feature_x` + - Edit changes and commit them locally. If you are just updating the commit message in the last commit, you can use `git commit --amend` to do that + - If you added several new commits or made other changes that require cleaning up, you can use `git rebase -i HEAD~X` (X = number of commits to edit) to possibly squash some commits + - Push the changed commits to Github with `git push -f` to overwrite the original commits in the "feature_x" branch with the new ones. The pull request gets automatically updated + +### 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: ) + +| 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| diff --git a/LICENSE b/LICENSE index f288702d..d60c31a9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,626 +1,285 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to this License. - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. - 13. Use with the GNU Affero General Public License. +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. - 14. Revised Versions of this License. +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. + NO WARRANTY - 15. Disclaimer of Warranty. + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -628,15 +287,15 @@ free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least +convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) - This program is free software: you can redistribute it and/or modify + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or + the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -645,30 +304,37 @@ the "copyright" line and a pointer to where the full notice is found. GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Also add information on how to contact you by electronic and paper mail. - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/README.md b/README.md index 958aa13c..d908a86a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,26 @@ -# packages -Community maintained packages for OpenWrt. +# OpenWrt packages feed + +## Description + +This is the OpenWrt "packages"-feed containing community-maintained build scripts, options and patches for applications, modules and libraries used within OpenWrt. + +Installation of pre-built packages is handled directly by the **opkg** utility within your running OpenWrt system or by using the [OpenWrt SDK](http://wiki.openwrt.org/doc/howto/obtain.firmware.sdk) on a build system. + +## Usage + +This repository is intended to be layered on-top of an OpenWrt buildroot. If you do not have an OpenWrt buildroot installed, see the documentation at: [OpenWrt Buildroot – Installation](http://wiki.openwrt.org/doc/howto/buildroot.exigence) on the OpenWrt support site. + +This feed is enabled by default. To install all its package definitions, run: +``` +./scripts/feeds update packages +./scripts/feeds install -a -p packages +``` + +## License + +See [LICENSE](LICENSE) file. + +## Package Guidelines + +See [CONTRIBUTING.md](CONTRIBUTING.md) file. + diff --git a/admin/debootstrap/Makefile b/admin/debootstrap/Makefile new file mode 100644 index 00000000..f16cab3f --- /dev/null +++ b/admin/debootstrap/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2010 Gianluigi Tiesi +# Copyright (C) 2011-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:=debootstrap +PKG_VERSION:=1.0.92 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Daniel Golle + +PKG_SOURCE:=$(PKG_NAME)-udeb_$(PKG_VERSION)_all.udeb +PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/d/debootstrap +PKG_HASH:=fa58c00529912d2cc187aa5434962376bd5ec00d3e7e9693f505a27b8848fdcf +PKG_LICENSE:=Unique +PKG_LICENSE_FILES:=debian/copyright + +UNPACK_CMD=ar -p "$(DL_DIR)/$(PKG_SOURCE)" data.tar.xz | xzcat | tar -C $(1) -xf - + +include $(INCLUDE_DIR)/package.mk + +define Package/debootstrap + SECTION:=admin + CATEGORY:=Administration + TITLE:=Bootstrap a basic Debian system + URL:=http://wiki.debian.org/Debootstrap + DEPENDS:= +coreutils +coreutils-chroot +coreutils-sha1sum +ar +xz +endef + +define Package/debootstrap/description + debootstrap is used to create a Debian base system from scratch, without + requiring the availability of dpkg or apt. It does this by downloading .deb + files from a mirror site, and carefully unpacking them into a directory which + can eventually be chrooted into. +endef + +define Build/Compile +# file pkgdetails.c was imported from debian package base-installer version 1.130 + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) ./files/pkgdetails.c -o $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails +endef + +define Package/debootstrap/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/sbin/$(PKG_NAME) $(1)/usr/sbin + $(INSTALL_DIR) $(1)/usr/share/debootstrap + $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails $(1)/usr/share/debootstrap + $(INSTALL_DATA) $(PKG_BUILD_DIR)/usr/share/debootstrap/functions $(1)/usr/share/debootstrap + $(INSTALL_DIR) $(1)/usr/share/debootstrap/scripts + $(CP) $(PKG_BUILD_DIR)/usr/share/debootstrap/scripts/* $(1)/usr/share/debootstrap/scripts +endef + +$(eval $(call BuildPackage,debootstrap)) diff --git a/admin/debootstrap/files/pkgdetails.c b/admin/debootstrap/files/pkgdetails.c new file mode 100644 index 00000000..99ee1900 --- /dev/null +++ b/admin/debootstrap/files/pkgdetails.c @@ -0,0 +1,347 @@ +#include +#include +#include +#include +#include +#include + +#define MAX_LINE 1000 +#define MAX_PKGS 100 + +char *checksum_field=NULL; + +static void oom_die(void) +{ + fputs("Out of memory!\n", stderr); + exit(1); +} + +static char *xvasprintf(const char *fmt, va_list ap) { + char *ret; + + if (vasprintf (&ret, fmt, ap) < 0) { + if (errno == ENOMEM) + oom_die(); + return NULL; + } + return ret; +} + +static char *xasprintf(const char *fmt, ...) { + va_list ap; + char *ret; + + va_start(ap, fmt); + ret = xvasprintf(fmt, ap); + va_end(ap); + return ret; +} + +static char *fieldcpy(char *dst, char *fld) { + while (*fld && *fld != ':') + fld++; + if (!*(fld++)) + return NULL; + while (isspace(*fld)) fld++; + return strcpy(dst, fld); +} + +static void outputdeps(char *deps) { + char *pch = deps; + + while (1) { + while (isspace(*pch)) pch++; + if (!*pch) break; + + while (*pch && *pch != '(' && *pch != '|' && *pch != ',' + && !isspace(*pch)) + { + fputc(*pch++, stdout); + } + fputc('\n', stdout); + while (*pch && *pch++ != ',') (void)NULL; + } +} + +static void dogetdeps(char *pkgsfile, char **in_pkgs, int pkgc) { + char buf[MAX_LINE]; + char cur_pkg[MAX_LINE]; + char cur_deps[MAX_LINE]; + char cur_predeps[MAX_LINE]; + char prev_pkg[MAX_LINE]; + char *pkgs[MAX_PKGS]; + int i; + int skip; + FILE *f; + int output_pkg = -1; + + cur_pkg[0] = cur_deps[0] = cur_predeps[0] = prev_pkg[0] = '\0'; + + for (i = 0; i < pkgc; i++) pkgs[i] = in_pkgs[i]; + + f = fopen(pkgsfile, "r"); + if (f == NULL) { + perror(pkgsfile); + exit(1); + } + + skip = 1; + while (fgets(buf, sizeof(buf), f)) { + if (*buf && buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0'; + if (strncasecmp(buf, "Package:", 8) == 0) { + int any = 0; + skip = 1; + fieldcpy(cur_pkg, buf); + if (strcmp(cur_pkg, prev_pkg) != 0) { + if (output_pkg != -1) + pkgs[output_pkg] = NULL; + if (cur_deps[0]) + outputdeps(cur_deps); + if (cur_predeps[0]) + outputdeps(cur_predeps); + strcpy(prev_pkg, cur_pkg); + } + cur_deps[0] = cur_predeps[0] = '\0'; + output_pkg = -1; + for (i = 0; i < pkgc; i++) { + if (!pkgs[i]) continue; + any = 1; + if (strcmp(cur_pkg, pkgs[i]) == 0) { + skip = 0; + output_pkg = i; + break; + } + } + if (!any) break; + } else if (!skip && strncasecmp(buf, "Depends:", 8) == 0) + fieldcpy(cur_deps, buf); + else if (!skip && strncasecmp(buf, "Pre-Depends:", 12) == 0) + fieldcpy(cur_predeps, buf); + } + if (cur_deps[0]) + outputdeps(cur_deps); + if (cur_predeps[0]) + outputdeps(cur_predeps); + fclose(f); +} + +static void dopkgmirrorpkgs(int uniq, char *mirror, char *pkgsfile, + char *fieldname, char **in_pkgs, int pkgc) +{ + char buf[MAX_LINE]; + char cur_field[MAX_LINE]; + char cur_pkg[MAX_LINE]; + char cur_ver[MAX_LINE]; + char cur_arch[MAX_LINE]; + char cur_size[MAX_LINE]; + char cur_checksum[MAX_LINE]; + char cur_filename[MAX_LINE]; + char prev_pkg[MAX_LINE]; + char *pkgs[MAX_PKGS]; + int i; + FILE *f; + char *output = NULL; + int output_pkg = -1; + + cur_field[0] = cur_pkg[0] = cur_ver[0] = cur_arch[0] = cur_filename[0] = prev_pkg[0] = '\0'; + + for (i = 0; i < pkgc; i++) pkgs[i] = in_pkgs[i]; + + f = fopen(pkgsfile, "r"); + if (f == NULL) { + perror(pkgsfile); + exit(1); + } + while (fgets(buf, sizeof(buf), f)) { + if (*buf && buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0'; + if (strncasecmp(buf, fieldname, strlen(fieldname)) == 0) { + fieldcpy(cur_field, buf); + } + if (strncasecmp(buf, "Package:", 8) == 0) { + fieldcpy(cur_pkg, buf); + if (strcmp(cur_pkg, prev_pkg) != 0) { + if (output) + fputs(output, stdout); + if (uniq && output_pkg != -1) + pkgs[output_pkg] = NULL; + strcpy(prev_pkg, cur_pkg); + } + free(output); + output = NULL; + output_pkg = -1; + } else if (strncasecmp(buf, "Version:", 8) == 0) { + fieldcpy(cur_ver, buf); + } else if (strncasecmp(buf, "Architecture:", 13) == 0) { + fieldcpy(cur_arch, buf); + } else if (strncasecmp(buf, "Size:", 5) == 0) { + fieldcpy(cur_size, buf); + } else if (strncasecmp(buf, checksum_field, strlen(checksum_field)) == 0 + && buf[strlen(checksum_field)] == ':') { + fieldcpy(cur_checksum, buf); + } else if (strncasecmp(buf, "Filename:", 9) == 0) { + fieldcpy(cur_filename, buf); + } else if (!*buf) { + int any = 0; + for (i = 0; i < pkgc; i++) { + if (!pkgs[i]) continue; + any = 1; + if (strcmp(cur_field, pkgs[i]) == 0) { + free(output); + output = xasprintf("%s %s %s %s %s %s %s\n", cur_pkg, cur_ver, cur_arch, mirror, cur_filename, cur_checksum, cur_size); + output_pkg = i; + break; + } + } + if (!any) break; + cur_field[0] = '\0'; + } + } + if (output) + fputs(output, stdout); + if (uniq && output_pkg != -1) + pkgs[output_pkg] = NULL; + fclose(f); + + /* any that weren't found are returned as "pkg -" */ + if (uniq) { + for (i = 0; i < pkgc; i++) { + if (pkgs[i]) { + printf("%s -\n", pkgs[i]); + } + } + } +} + +static void dopkgstanzas(char *pkgsfile, char **pkgs, int pkgc) +{ + char buf[MAX_LINE]; + char *accum; + size_t accum_size = 0, accum_alloc = MAX_LINE * 2; + char cur_pkg[MAX_LINE]; + FILE *f; + + accum = malloc(accum_alloc); + if (!accum) + oom_die(); + + f = fopen(pkgsfile, "r"); + if (f == NULL) { + perror(pkgsfile); + free(accum); + exit(1); + } + while (fgets(buf, sizeof(buf), f)) { + if (*buf) { + size_t len = strlen(buf); + if (accum_size + len + 1 > accum_alloc) { + accum_alloc = (accum_size + len + 1) * 2; + accum = realloc(accum, accum_alloc); + if (!accum) + oom_die(); + } + strcpy(accum + accum_size, buf); + accum_size += len; + } + if (*buf && buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0'; + if (strncasecmp(buf, "Package:", 8) == 0) { + fieldcpy(cur_pkg, buf); + } else if (!*buf) { + int i; + for (i = 0; i < pkgc; i++) { + if (!pkgs[i]) continue; + if (strcmp(cur_pkg, pkgs[i]) == 0) { + fputs(accum, stdout); + if (accum[accum_size - 1] != '\n') + fputs("\n\n", stdout); + else if (accum[accum_size - 2] != '\n') + fputc('\n', stdout); + break; + } + } + *accum = '\0'; + accum_size = 0; + } + } + fclose(f); + + free(accum); +} + +static int dotranslatewgetpercent(int low, int high, int end, char *str) { + int ch; + int val, lastval; + + /* print out anything that looks like a % on its own line, appropriately + * scaled */ + + lastval = val = 0; + while ( (ch = getchar()) != EOF ) { + if (isdigit(ch)) { + val *= 10; val += ch - '0'; + } else if (ch == '%') { + float f = (float) val / 100.0 * (high - low) + low; + if (str) { + printf("P: %d %d %s\n", (int) f, end, str); + } else { + printf("P: %d %d\n", (int) f, end); + } + lastval = val; + } else { + val = 0; + } + } + return lastval == 100; +} + +int main(int argc, char *argv[]) { + checksum_field=getenv("DEBOOTSTRAP_CHECKSUM_FIELD"); + if (checksum_field == NULL) { + checksum_field="MD5sum"; + } + + if ((argc == 6 || argc == 5) && strcmp(argv[1], "WGET%") == 0) { + if (dotranslatewgetpercent(atoi(argv[2]), atoi(argv[3]), + atoi(argv[4]), argc == 6 ? argv[5] : NULL)) + { + exit(0); + } else { + exit(1); + } + } else if (argc >= 4 && strcmp(argv[1], "GETDEPS") == 0) { + int i; + for (i = 3; argc - i > MAX_PKGS; i += MAX_PKGS) { + dogetdeps(argv[2], argv+i, MAX_PKGS); + } + dogetdeps(argv[2], argv+i, argc-i); + exit(0); + } else if (argc >= 5 && strcmp(argv[1], "PKGS") == 0) { + int i; + for (i = 4; argc - i > MAX_PKGS; i += MAX_PKGS) { + dopkgmirrorpkgs(1, argv[2], argv[3], "Package:", argv+i, MAX_PKGS); + } + dopkgmirrorpkgs(1, argv[2], argv[3], "Package:", argv+i, argc-i); + exit(0); + } else if (argc >= 6 && strcmp(argv[1], "FIELD") == 0) { + int i; + for (i = 5; argc - i > MAX_PKGS; i += MAX_PKGS) { + dopkgmirrorpkgs(0, argv[3], argv[4], argv[2], argv+i, MAX_PKGS); + } + dopkgmirrorpkgs(0, argv[3], argv[4], argv[2], argv+i, argc-i); + exit(0); + } else if (argc >= 4 && strcmp(argv[1], "STANZAS") == 0) { + int i; + for (i = 3; argc - i > MAX_PKGS; i += MAX_PKGS) { + dopkgstanzas(argv[2], argv+i, MAX_PKGS); + } + dopkgstanzas(argv[2], argv+i, argc-i); + exit(0); + } else { + fprintf(stderr, "usage: %s PKGS mirror packagesfile pkgs..\n", argv[0]); + fprintf(stderr, " or: %s FIELD field mirror packagesfile pkgs..\n", + argv[0]); + fprintf(stderr, " or: %s GETDEPS packagesfile pkgs..\n", argv[0]); + fprintf(stderr, " or: %s STANZAS packagesfile pkgs..\n", argv[0]); + fprintf(stderr, " or: %s WGET%% low high end reason\n", argv[0]); + exit(1); + } +} diff --git a/admin/htop/Makefile b/admin/htop/Makefile new file mode 100644 index 00000000..1d6a2dc4 --- /dev/null +++ b/admin/htop/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2007-2016 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:=htop +PKG_VERSION:=2.2.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://hisham.hm/htop/releases/$(PKG_VERSION)/ +PKG_HASH:=d9d6826f10ce3887950d709b53ee1d8c1849a70fa38e91d5896ad8cbc6ba3c57 + +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=COPYING + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/htop + SECTION:=admin + CATEGORY:=Administration + TITLE:=Interactive processes viewer + DEPENDS:=+libncurses + URL:=http://htop.sourceforge.net/ + MAINTAINER:=Etienne CHAMPETIER +endef + +define Package/htop/description + Htop is an ncursed-based process viewer similar to top, but + it allows to scroll the list vertically and horizontally to + see all processes and their full command lines. +endef + +CONFIGURE_ARGS += \ + --disable-unicode \ + --disable-hwloc + +CONFIGURE_VARS += \ + ac_cv_file__proc_stat=yes \ + ac_cv_file__proc_meminfo=yes + +define Package/htop/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,htop)) diff --git a/admin/ipmitool/Makefile b/admin/ipmitool/Makefile new file mode 100644 index 00000000..6c7ead7e --- /dev/null +++ b/admin/ipmitool/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2017 Alexander Couzens +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ipmitool +PKG_VERSION:=1.8.18 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_HASH:=0c1ba3b1555edefb7c32ae8cd6a3e04322056bc087918f07189eeedfc8b81e01 +PKG_LICENSE:=BSD-3-clause +PKG_LICENSE_FILES:=COPYING + +include $(INCLUDE_DIR)/package.mk + +define Package/ipmitool + SECTION:=admin + CATEGORY:=Administration + DEPENDS:=+libopenssl +libncurses +libreadline + TITLE:=Command-line interface to IPMI-enabled devices + URL:=http://sourceforge.net/projects/ipmitool/ + MAINTAINER:=Alexander Couzens +endef + +define Package/ipmitool/Default/description + Command-line interface to IPMI-enabled devices +endef + +define Package/ipmitool/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ipmievd $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ipmitool $(1)/usr/sbin/ +endef + +define Package/ipmitool/conffiles +endef + +CONFIGURE_ARGS += \ + --enable-intf-lan \ + --enable-intf-lanplus \ + --enable-intf-serial \ + --enable-intf-free \ + --enable-intf-open \ + --enable-intf-imb \ + --enable-ipmishell + +$(eval $(call BuildPackage,ipmitool)) diff --git a/admin/monit/Makefile b/admin/monit/Makefile new file mode 100644 index 00000000..3c6bf635 --- /dev/null +++ b/admin/monit/Makefile @@ -0,0 +1,95 @@ +# +# 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:=monit +PKG_VERSION:=5.24.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=754d1f0e165e5a26d4639a6a83f44ccf839e381f2622e0946d5302fa1f2d2414 +PKG_SOURCE_URL:=https://mmonit.com/monit/dist + +PKG_LICENSE:=AGPL-3.0 +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/monit/Default + SECTION:=admin + CATEGORY:=Administration + DEPENDS:= +libpthread +zlib + TITLE:=System services monitoring utility + URL:=https://mmonit.com/monit/ + MAINTAINER:=Etienne CHAMPETIER +endef + +define Package/monit/Default/description + An utility for monitoring services on a Unix system +endef + +define Package/monit +$(call Package/monit/Default) + DEPENDS+= +libopenssl + TITLE+= (with SSL support) + VARIANT:=ssl +endef + +define Package/monit/description +$(call Package/monit/Default/description) + This package is built with SSL support. +endef + +define Package/monit-nossl +$(call Package/monit/Default) + TITLE+= (without SSL support) + VARIANT:=nossl +endef + +define Package/monit-nossl/description +$(call Package/monit/Default/description) + This package is built without SSL support. +endef + +CONFIGURE_ARGS += \ + --without-pam \ + libmonit_cv_setjmp_available=yes \ + libmonit_cv_vsnprintf_c99_conformant=yes + +ifeq ($(BUILD_VARIANT),ssl) + CONFIGURE_ARGS += \ + --with-ssl \ + --with-ssl-dir="$(STAGING_DIR)/usr" +endif + +ifeq ($(BUILD_VARIANT),nossl) + CONFIGURE_ARGS += \ + --without-ssl +endif + +define Package/monit/conffiles +/etc/monitrc +endef + +define Package/monit/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/monitrc $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/monit.init $(1)/etc/init.d/monit + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/monit $(1)/usr/bin/ +endef + +Package/monit-nossl/conffiles = $(Package/monit/conffiles) +Package/monit-nossl/install = $(Package/monit/install) + +$(eval $(call BuildPackage,monit)) +$(eval $(call BuildPackage,monit-nossl)) diff --git a/admin/monit/files/monit.init b/admin/monit/files/monit.init new file mode 100644 index 00000000..2bb36092 --- /dev/null +++ b/admin/monit/files/monit.init @@ -0,0 +1,15 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2014 OpenWrt.org + +START=60 +USE_PROCD=1 +PROG=/usr/bin/monit + +start_service() { + [ -f /etc/monitrc ] || { echo "monit: /etc/monitrc is missing"; return 1; } + chmod 0600 /etc/monitrc + procd_open_instance + # -I runs in foreground, as procd requires + procd_set_param command "$PROG" -I + procd_close_instance +} diff --git a/admin/monit/patches/001-fix-default-piddir.patch b/admin/monit/patches/001-fix-default-piddir.patch new file mode 100644 index 00000000..6382f6f4 --- /dev/null +++ b/admin/monit/patches/001-fix-default-piddir.patch @@ -0,0 +1,18 @@ +--- a/configure ++++ b/configure +@@ -13852,14 +13852,7 @@ fi + # Find the right directory to put the root-mode PID file in + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pid file location" >&5 + $as_echo_n "checking pid file location... " >&6; } +-if test -d "/run" +-then +- piddir="/run" +-elif test -d "/var/run"; then +- piddir="/var/run" +-elif test -d "/etc"; then +- piddir="/etc" +-fi ++piddir="/var/run" + + + cat >>confdefs.h <<_ACEOF diff --git a/admin/muninlite/Makefile b/admin/muninlite/Makefile new file mode 100644 index 00000000..022da018 --- /dev/null +++ b/admin/muninlite/Makefile @@ -0,0 +1,54 @@ +# +# 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:=muninlite +PKG_VERSION:=1.0.4 +PKG_RELEASE:=8 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_HASH:=736482dd6d6849d014d975b1f5794f20dda6e123dbba2d8c2f169c8e787e6f7e +PKG_LICENSE:=GPL-2.0+ +PKG_LICENSE_FILES:=LICENSE + +include $(INCLUDE_DIR)/package.mk + +define Package/muninlite + SECTION:=admin + CATEGORY:=Administration + DEPENDS:=+xinetd + TITLE:=Munin node implemented in shell + URL:=http://sourceforge.net/projects/muninlite/ + PKG_MAINTAINER:=Jonathan McCrohan +endef + +define Package/muninlite/Default/description + Munin node implemented in shell. + Munin is a monitoring system for Unix networks. +endef + +define Package/muninlite/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/munin-node $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/xinetd.d + $(INSTALL_DATA) ./files/etc/xinetd.d/munin $(1)/etc/xinetd.d/ +endef + +define Package/muninlite/conffiles +/etc/xinetd.d/munin +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) +endef + +$(eval $(call BuildPackage,muninlite)) diff --git a/admin/muninlite/files/etc/xinetd.d/munin b/admin/muninlite/files/etc/xinetd.d/munin new file mode 100644 index 00000000..012d71b9 --- /dev/null +++ b/admin/muninlite/files/etc/xinetd.d/munin @@ -0,0 +1,10 @@ +service munin +{ + socket_type = stream + protocol = tcp + wait = no + user = root + group = root + server = /usr/sbin/munin-node + disable = no +} diff --git a/admin/muninlite/patches/001-fix_disks.patch b/admin/muninlite/patches/001-fix_disks.patch new file mode 100644 index 00000000..a2264a8f --- /dev/null +++ b/admin/muninlite/patches/001-fix_disks.patch @@ -0,0 +1,10 @@ +--- a/plugins/df ++++ b/plugins/df +@@ -19,6 +19,6 @@ fetch_df() { + do + PINFO=$(df -P $PART | tail -1); + PNAME=$(echo $PINFO | cut -d\ -f1 | sed 's/[\/.-]/_/g') +- echo "$PNAME.value" $(echo $PINFO | cut -f5 -d\ | sed -e 's/\%//g') ++ echo "$PNAME.value" $(echo $PINFO | sed -e 's/\%//g' -e 's/ */ /g' | cut -f5 -d' ') + done + } diff --git a/admin/muninlite/patches/002-hostname.patch b/admin/muninlite/patches/002-hostname.patch new file mode 100644 index 00000000..5d871683 --- /dev/null +++ b/admin/muninlite/patches/002-hostname.patch @@ -0,0 +1,11 @@ +--- a/munin-node.in ++++ b/munin-node.in +@@ -113,7 +113,7 @@ PLUGINS=$RES + + # ===== MAIN LOOP ===== + FUNCTIONS="list nodes config fetch version quit" +-HOSTNAME=$(hostname -f 2>/dev/null || hostname) ++HOSTNAME=$(/sbin/uci get "system.@system[0].hostname" 2>/dev/null || cat /proc/sys/kernel/hostname) + echo "# munin node at $HOSTNAME" + while read arg0 arg1 + do diff --git a/admin/muninlite/patches/100-fix-no-ethtool.patch b/admin/muninlite/patches/100-fix-no-ethtool.patch new file mode 100644 index 00000000..88f7e305 --- /dev/null +++ b/admin/muninlite/patches/100-fix-no-ethtool.patch @@ -0,0 +1,21 @@ +--- a/plugins/if_ ++++ b/plugins/if_ +@@ -15,10 +15,14 @@ config_if() { + echo "up.min 0" + echo "up.negative down" + echo "up.cdef up,8,*" +- if ethtool $1 | grep -q Speed; then +- MAX=$(($(ethtool $1 | grep Speed | sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/^ //' -e 's/M.*//' | cut -d\ -f2) * 1000000)) +- echo "up.max $MAX" +- echo "down.max $MAX" ++ if [ -n "$(which ethtool)" ]; then ++ if [ -x "$(which ethtool)" ]; then ++ if ethtool $1 | grep -q Speed; then ++ MAX=$(($(ethtool $1 | grep Speed | sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/^ //' -e 's/M.*//' | cut -d\ -f2) * 1000000)) ++ echo "up.max $MAX" ++ echo "down.max $MAX" ++ fi ++ fi + fi + } + fetch_if() { diff --git a/admin/muninlite/patches/110-fix-uptime-days.patch b/admin/muninlite/patches/110-fix-uptime-days.patch new file mode 100644 index 00000000..d9aa43f4 --- /dev/null +++ b/admin/muninlite/patches/110-fix-uptime-days.patch @@ -0,0 +1,12 @@ +--- a/plugins/uptime ++++ b/plugins/uptime +@@ -4,8 +4,7 @@ config_uptime() { + echo "graph_vlabel uptime in days" + echo "uptime.label uptime" + echo "uptime.draw AREA" +- echo "uptime.cdef uptime,86400,/" + } + fetch_uptime() { +- echo "uptime.value" $(cut -d\ -f1 /proc/uptime) ++ awk '{printf "uptime.value %.2f",$1/86400; print ""}' /proc/uptime + } diff --git a/admin/muninlite/patches/200-add-tap-dev.patch b/admin/muninlite/patches/200-add-tap-dev.patch new file mode 100644 index 00000000..fa46ce6b --- /dev/null +++ b/admin/muninlite/patches/200-add-tap-dev.patch @@ -0,0 +1,20 @@ +--- a/munin-node.in ++++ b/munin-node.in +@@ -72,7 +72,7 @@ RES="" + for PLUG in $PLUGINS + do + if [ "$PLUG" = "if_" ]; then +- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); ++ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); + do + INTERRES=$(echo $INTER | sed 's/\./VLAN/') + RES="$RES if_$INTERRES" +@@ -80,7 +80,7 @@ do + eval "config_if_${INTERRES}() { config_if $INTER $@; };" + done + elif [ "$PLUG" = "if_err_" ]; then +- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); ++ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); + do + INTERRES=$(echo $INTER | sed 's/\./VLAN/') + RES="$RES if_err_$INTERRES" diff --git a/admin/muninlite/patches/210-add-bridge-devs.patch b/admin/muninlite/patches/210-add-bridge-devs.patch new file mode 100644 index 00000000..1a76e971 --- /dev/null +++ b/admin/muninlite/patches/210-add-bridge-devs.patch @@ -0,0 +1,24 @@ +--- a/munin-node.in ++++ b/munin-node.in +@@ -72,17 +72,17 @@ RES="" + for PLUG in $PLUGINS + do + if [ "$PLUG" = "if_" ]; then +- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); ++ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); + do +- INTERRES=$(echo $INTER | sed 's/\./VLAN/') ++ INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/') + RES="$RES if_$INTERRES" + eval "fetch_if_${INTERRES}() { fetch_if $INTER $@; };" + eval "config_if_${INTERRES}() { config_if $INTER $@; };" + done + elif [ "$PLUG" = "if_err_" ]; then +- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); ++ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); + do +- INTERRES=$(echo $INTER | sed 's/\./VLAN/') ++ INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/') + RES="$RES if_err_$INTERRES" + eval "fetch_if_err_${INTERRES}() { fetch_if_err $INTER $@; };" + eval "config_if_err_${INTERRES}() { config_if_err $INTER $@; };" diff --git a/admin/muninlite/patches/220-modify-ifname-parser.patch b/admin/muninlite/patches/220-modify-ifname-parser.patch new file mode 100644 index 00000000..6a2ba236 --- /dev/null +++ b/admin/muninlite/patches/220-modify-ifname-parser.patch @@ -0,0 +1,22 @@ +--- a/plugins/if_ ++++ b/plugins/if_ +@@ -26,7 +26,7 @@ config_if() { + fi + } + fetch_if() { +- IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ / /g') ++ IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ */ /g' -e 's/^[ \t]*//') + echo "down.value" $(echo $IINFO | cut -d\ -f1) + echo "up.value" $(echo $IINFO | cut -d\ -f9) + } +--- a/plugins/if_err_ ++++ b/plugins/if_err_ +@@ -15,7 +15,7 @@ config_if_err() { + echo "trans.warning 1" + } + fetch_if_err() { +- IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ / /g') ++ IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ */ /g' -e 's/^[ \t]*//') + echo "rcvd.value" $(echo $IINFO | cut -d\ -f3) + echo "trans.value" $(echo $IINFO | cut -d\ -f11) + } diff --git a/admin/muninlite/patches/230-fix-available-interface-parsing.patch b/admin/muninlite/patches/230-fix-available-interface-parsing.patch new file mode 100644 index 00000000..2f227e58 --- /dev/null +++ b/admin/muninlite/patches/230-fix-available-interface-parsing.patch @@ -0,0 +1,20 @@ +--- a/munin-node.in ++++ b/munin-node.in +@@ -72,7 +72,7 @@ RES="" + for PLUG in $PLUGINS + do + if [ "$PLUG" = "if_" ]; then +- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); ++ for INTER in $(grep -E '^ *(ppp|eth|wlan|ath|ra|ipsec|tap|br-)[^:]{1,}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); + do + INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/') + RES="$RES if_$INTERRES" +@@ -80,7 +80,7 @@ do + eval "config_if_${INTERRES}() { config_if $INTER $@; };" + done + elif [ "$PLUG" = "if_err_" ]; then +- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); ++ for INTER in $(grep -E '^ *(ppp|eth|wlan|ath|ra|ipsec|tap|br-)[^:]{1,}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); + do + INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/') + RES="$RES if_err_$INTERRES" diff --git a/admin/netdata/Makefile b/admin/netdata/Makefile new file mode 100644 index 00000000..7bff2a37 --- /dev/null +++ b/admin/netdata/Makefile @@ -0,0 +1,71 @@ +# +# Copyright (C) 2008-2016 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:=netdata +PKG_VERSION:=1.10.0 +PKG_RELEASE:=1 +PKG_MAINTAINER:= +PKG_LICENSE:=GPL-3.0 +PKG_LICENSE_FILES:=COPYING + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://github.com/firehol/netdata/releases/download/v$(PKG_VERSION) +PKG_HASH:=0514fc002c5c5fb730156b3fe928965b22327833c6c17e22b7097eda657e77a2 + +PKG_INSTALL:=1 +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk + +define Package/netdata + SECTION:=admin + CATEGORY:=Administration + DEPENDS:=+zlib +libuuid +libmnl + TITLE:=Real-time performance monitoring tool + URL:=https://my-netdata.io/ +endef + +define Package/netdata/description + netdata is a highly optimized Linux daemon providing real-time performance + monitoring for Linux systems, applications and SNMP devices over the web. +endef + +TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) +TARGET_CFLAGS += -ffunction-sections -fdata-sections -O3 +TARGET_LDFLAGS += -Wl,--gc-sections + +CONFIGURE_ARGS += --with-zlib --with-math --disable-x86-sse --disable-lto + +define Package/netdata/conffiles +/etc/netdata/ +endef + +define Package/netdata/install + mkdir -p $(1)/etc/netdata + $(CP) $(PKG_INSTALL_DIR)/etc/netdata $(1)/etc + $(CP) ./files/netdata.conf $(1)/etc/netdata + mkdir -p $(1)/usr/share/netdata + $(CP) $(PKG_INSTALL_DIR)/usr/share/netdata $(1)/usr/share + rm -rf $(1)/usr/share/netdata/web/images + rm -rf $(1)/usr/share/netdata/web/old + rm $(1)/usr/share/netdata/web/demo*html + rm $(1)/usr/share/netdata/web/fonts/*.svg + rm $(1)/usr/share/netdata/web/fonts/*.ttf + rm $(1)/usr/share/netdata/web/fonts/*.woff + mkdir -p $(1)/usr/lib/netdata + $(CP) $(PKG_INSTALL_DIR)/usr/lib/netdata $(1)/usr/lib + rm $(1)/usr/lib/netdata/python.d/python-modules-installer.sh + chmod 4755 $(1)/usr/lib/netdata/plugins.d/apps.plugin + mkdir -p $(1)/etc/init.d + $(INSTALL_BIN) ./files/netdata.init $(1)/etc/init.d/netdata + mkdir -p $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata $(1)/usr/sbin +endef + +$(eval $(call BuildPackage,netdata)) diff --git a/admin/netdata/files/netdata.conf b/admin/netdata/files/netdata.conf new file mode 100644 index 00000000..3026be11 --- /dev/null +++ b/admin/netdata/files/netdata.conf @@ -0,0 +1,121 @@ +# netdata configuration +# +# You can download the latest version of this file, using: +# +# wget -O /etc/netdata/netdata.conf http://localhost:19999/netdata.conf +# or +# curl -o /etc/netdata/netdata.conf http://localhost:19999/netdata.conf +# +# You can uncomment and change any of the options below. +# The value shown in the commented settings, is the default value. +# + +# global netdata configuration + +[global] + # glibc malloc arena max for plugins = 1 + # hostname = LEDE + # history = 4036 + update every = 2 + # config directory = /etc/netdata + # log directory = /var/log/netdata + # web files directory = /usr/share/netdata/web + # cache directory = /var/cache/netdata + # lib directory = /var/lib/netdata + # home directory = /var/cache/netdata + # plugins directory = "/usr/lib/netdata/plugins.d" "/etc/netdata/custom-plugins.d" + # memory mode = save + # host access prefix = + memory deduplication (ksm) = no + # TZ environment variable = :/etc/localtime + # timezone = UTC + # debug flags = 0x0000000000000000 + debug log = syslog + error log = syslog + access log = none + # errors flood protection period = 1200 + # errors to trigger flood protection = 200 + run as user = root + # OOM score = 1000 + # process scheduling policy = idle + # process nice level = 19 + # pthread stack size = 81920 + # cleanup obsolete charts after seconds = 3600 + # gap when lost iterations above = 1 + # cleanup orphan hosts after seconds = 3600 + # delete obsolete charts files = yes + # delete orphan hosts files = yes + +[web] + # mode = static-threaded + # listen backlog = 4096 + # default port = 19999 + # bind to = * + # web files owner = nobody + # web files group = nogroup + # disconnect idle clients after seconds = 60 + # timeout for first request = 60 + # respect do not track policy = no + # x-frame-options response header = + allow connections from = localhost 10.* 192.168.* 172.16.* 172.17.* 172.18.* 172.19.* 172.20.* 172.21.* 172.22.* 172.23.* 172.24.* 172.25.* 172.26.* 172.27.* 172.28.* 172.29.* 172.30.* 172.31.* + allow dashboard from = localhost 10.* 192.168.* 172.16.* 172.17.* 172.18.* 172.19.* 172.20.* 172.21.* 172.22.* 172.23.* 172.24.* 172.25.* 172.26.* 172.27.* 172.28.* 172.29.* 172.30.* 172.31.* + # allow badges from = * + # allow streaming from = * + # allow netdata.conf from = localhost fd* 10.* 192.168.* 172.16.* 172.17.* 172.18.* 172.19.* 172.20.* 172.21.* 172.22.* 172.23.* 172.24.* 172.25.* 172.26.* 172.27.* 172.28.* 172.29.* 172.30.* 172.31.* + # enable gzip compression = yes + # gzip compression strategy = default + # gzip compression level = 3 + # web server threads = 2 + # web server max sockets = 512 + +[plugins] + # PATH environment variable = /usr/sbin:/usr/bin:/sbin:/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin + # PYTHONPATH environment variable = + # proc = yes + # diskspace = yes + # cgroups = yes + # tc = yes + # idlejitter = yes + # enable running new plugins = yes + # check for new plugins every = 60 + apps = no + charts.d = no + fping = no + node.d = no + python.d = no + +[health] + enabled = no + # in memory max health log entries = 1000 + # script to execute on alarm = /usr/lib/netdata/plugins.d/alarm-notify.sh + # health configuration directory = /etc/netdata/health.d + # run at least every seconds = 10 + # postpone alarms during hibernation for seconds = 60 + # rotate log every lines = 2000 + + +[statsd] + enabled = no + # update every (flushInterval) = 1 + # udp messages to process at once = 10 + # create private charts for metrics matching = * + # max private charts allowed = 200 + # max private charts hard limit = 1000 + # private charts memory mode = save + # private charts history = 4036 + # decimal detail = 1000 + # disconnect idle tcp clients after seconds = 600 + # private charts hidden = no + # histograms and timers percentile (percentThreshold) = 95.00000 + # add dimension for number of events received = yes + # gaps on gauges (deleteGauges) = no + # gaps on counters (deleteCounters) = no + # gaps on meters (deleteMeters) = no + # gaps on sets (deleteSets) = no + # gaps on histograms (deleteHistograms) = no + # gaps on timers (deleteTimers) = no + # statsd server max TCP sockets = 256 + # listen backlog = 4096 + # default port = 8125 + # bind to = udp:localhost tcp:localhost + diff --git a/admin/netdata/files/netdata.init b/admin/netdata/files/netdata.init new file mode 100644 index 00000000..d4be0a7c --- /dev/null +++ b/admin/netdata/files/netdata.init @@ -0,0 +1,21 @@ +#!/bin/sh /etc/rc.common + +START=99 +USE_PROCD=1 + +APPBINARY=/usr/sbin/netdata +CONFIGFILE=/etc/netdata/netdata.conf + + start_service() { + mkdir -m 0755 -p /var/cache/netdata + chown nobody /var/cache/netdata + mkdir -m 0755 -p /var/lib/netdata + chown nobody /var/lib/netdata + mkdir -m 0755 -p /var/log/netdata + chown nobody /var/log/netdata + procd_open_instance + procd_set_param command $APPBINARY -nd -c $CONFIGFILE + procd_set_param file $CONFIGFILE + procd_set_param respawn + procd_close_instance + } diff --git a/admin/netdata/patches/001-disable_external_plugins_by_default.patch b/admin/netdata/patches/001-disable_external_plugins_by_default.patch new file mode 100644 index 00000000..62978924 --- /dev/null +++ b/admin/netdata/patches/001-disable_external_plugins_by_default.patch @@ -0,0 +1,22 @@ +--- a/conf.d/charts.d.conf ++++ b/conf.d/charts.d.conf +@@ -30,7 +30,7 @@ + + # the default enable/disable for all charts.d collectors + # the default is "yes" +-# enable_all_charts="yes" ++enable_all_charts="no" + + # BY DEFAULT ENABLED MODULES + # ap=yes +--- a/conf.d/python.d.conf ++++ b/conf.d/python.d.conf +@@ -7,7 +7,7 @@ + # + + # Enable / disable the whole python.d.plugin (all its modules) +-enabled: yes ++enabled: no + + # Prevent log flood + # Define how many log messages can be written to log file in one log_interval diff --git a/admin/openwisp-config/Makefile b/admin/openwisp-config/Makefile new file mode 100644 index 00000000..c2237e32 --- /dev/null +++ b/admin/openwisp-config/Makefile @@ -0,0 +1,113 @@ +# openwisp.org +# +# This is free software, licensed under the GNU General Public License v3. +# See /LICENSE for more information. +include $(TOPDIR)/rules.mk + +PKG_NAME:=openwisp-config +PKG_VERSION:=0.4.5 +PKG_RELEASE:=2 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_PROTO:=git +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://github.com/openwisp/openwisp-config.git +PKG_SOURCE_VERSION:=0.4.5 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) +PKG_MIRROR_HASH:=017a8ed35ebfda2805426e7da02559d5cc2845ee9ded60fdae8e848d377424fb +PKG_LICENSE:=GPL-3.0 +PKGARCH:=all + +include $(INCLUDE_DIR)/package.mk + +define Package/openwisp-config/default + TITLE:=Remote configuration management agent ($(2) variant) + CATEGORY:=Administration + SECTION:=admin + SUBMENU:=openwisp + DEPENDS:=+curl +lua +libuci-lua +luafilesystem $(3) + VARIANT:=$(1) + MAINTAINER:=Federico Capoano + URL:=http://openwisp.org +endef + +Package/openwisp-config-openssl=$(call Package/openwisp-config/default,openssl,OpenSSL,+ca-certificates +libopenssl) +Package/openwisp-config-mbedtls=$(call Package/openwisp-config/default,mbedtls,mbedTLS,+ca-certificates +libmbedtls) +Package/openwisp-config-cyassl=$(call Package/openwisp-config/default,cyassl,CyaSSL,+ca-certificates +libcyassl) +Package/openwisp-config-nossl=$(call Package/openwisp-config/default,nossl,No SSL) + +define Build/Compile +endef + +define Package/openwisp-config-$(BUILD_VARIANT)/conffiles +/etc/config/openwisp +endef + +ifeq ($(BUILD_VARIANT),openssl) +CONFIG_OPENWISP_UCI:=ssl +endif +ifeq ($(BUILD_VARIANT),mbedtls) +CONFIG_OPENWISP_UCI:=ssl +endif +ifeq ($(BUILD_VARIANT),cyassl) +CONFIG_OPENWISP_UCI:=ssl +endif +ifeq ($(BUILD_VARIANT),nossl) +CONFIG_OPENWISP_UCI:=nossl +endif + + +define Package/openwisp-config-$(BUILD_VARIANT)/install + $(INSTALL_DIR) \ + $(1)/usr/sbin \ + $(1)/etc/init.d \ + $(1)/etc/config \ + $(1)/etc/openwisp \ + $(1)/usr/lib/lua/openwisp + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.agent \ + $(1)/usr/sbin/openwisp_config + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.init \ + $(1)/etc/init.d/openwisp_config + + $(INSTALL_CONF) $(PKG_BUILD_DIR)/openwisp-config/files/openwisp-$(CONFIG_OPENWISP_UCI).config \ + $(1)/etc/config/openwisp + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-reload-config \ + $(1)/usr/sbin/openwisp-reload-config + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/lib/openwisp/utils.lua \ + $(1)/usr/lib/lua/openwisp/utils.lua + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-store-unmanaged.lua \ + $(1)/usr/sbin/openwisp-store-unmanaged + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-restore-unmanaged.lua \ + $(1)/usr/sbin/openwisp-restore-unmanaged + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-remove-default-wifi.lua \ + $(1)/usr/sbin/openwisp-remove-default-wifi + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-uci-autoname.lua \ + $(1)/usr/sbin/openwisp-uci-autoname + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-update-config.lua \ + $(1)/usr/sbin/openwisp-update-config + + $(CP) $(PKG_BUILD_DIR)/VERSION $(1)/etc/openwisp/ +endef + +$(eval $(call BuildPackage,openwisp-config-openssl)) +$(eval $(call BuildPackage,openwisp-config-mbedtls)) +$(eval $(call BuildPackage,openwisp-config-cyassl)) +$(eval $(call BuildPackage,openwisp-config-nossl)) diff --git a/admin/sudo/Makefile b/admin/sudo/Makefile new file mode 100644 index 00000000..16779a7b --- /dev/null +++ b/admin/sudo/Makefile @@ -0,0 +1,98 @@ +# +# Copyright (C) 2006-2017 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:=sudo +PKG_VERSION:=1.8.21p2 +PKG_RELEASE:=1 +PKG_LICENSE:=ISC +PKG_LICENSE_FILES:=doc/LICENSE + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.sudo.ws/dist +PKG_HASH:=74c5746cd33a814e2431c39faf0d76f7f8a697379bd073862e3b156cf0d76368 + +PKG_INSTALL:=1 + +PKG_BUILD_DEPENDS:=sudo/host + +include $(INCLUDE_DIR)/package.mk + +define Package/sudo + SECTION:=admin + CATEGORY:=Administration + TITLE:=Delegate authority to run commands + URL:=http://www.sudo.ws/ + MAINTAINER:=Gergely Kiss +endef + +define Package/sudo/description + Sudo (su "do") allows a system administrator to delegate authority to + give certain users (or groups of users) the ability to run some (or + all) commands as root or another user while providing an audit trail of + the commands and their arguments. +endef + +define Package/sudo/conffiles +/etc/sudoers +/etc/sudoers.d/ +endef + +CONFIGURE_ARGS+= \ + --without-pam \ + --disable-pam-session \ + --with-editor=/bin/vi \ + --without-lecture \ + --disable-zlib \ + --with-rundir=/var/lib/sudo \ + --with-vardir=/var/lib/sudo + +CONFIGURE_VARS+= \ + sudo_cv_uid_t_len=10 \ + sudo_cv_func_unsetenv_void=no + +include $(INCLUDE_DIR)/host-build.mk + +define Host/Compile + cd $(HOST_BUILD_DIR)/lib/util; \ + $(MAKE) mksiglist; $(MAKE) mksigname +endef + +define Host/Install + $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin + $(CP) $(HOST_BUILD_DIR)/lib/util/mksig{list,name} $(STAGING_DIR_HOSTPKG)/bin/ +endef + +$(eval $(call HostBuild)) + +define Package/sudo/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/sudo $(1)/usr/bin/ + chmod 4755 $(1)/usr/bin/sudo + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/visudo $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(CP) $(PKG_INSTALL_DIR)/etc/sudoers $(1)/etc/ + chmod 0440 $(1)/etc/sudoers + $(INSTALL_DIR) $(1)/etc/sudoers.d + $(INSTALL_DIR) $(1)/usr/lib/sudo + $(CP) $(PKG_INSTALL_DIR)/usr/lib/sudo/*.so* $(1)/usr/lib/sudo/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/sudo.init $(1)/etc/init.d/sudo +endef + +define Package/sudo/postinst +#!/bin/sh + +[ -n "$$IPKG_INSTROOT" ] || { + /etc/init.d/sudo enable + /etc/init.d/sudo start +} +endef + +$(eval $(call BuildPackage,sudo)) diff --git a/admin/sudo/files/sudo.init b/admin/sudo/files/sudo.init new file mode 100755 index 00000000..705fe841 --- /dev/null +++ b/admin/sudo/files/sudo.init @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2014 OpenWrt.org + +START=99 + +start() { + [ -d /var/lib/sudo ] || { + mkdir -m 0755 -p /var/lib/sudo + chmod 0700 /var/lib/sudo + } +} diff --git a/admin/sudo/patches/010-cross-compile-fixes.patch b/admin/sudo/patches/010-cross-compile-fixes.patch new file mode 100644 index 00000000..b9c1e799 --- /dev/null +++ b/admin/sudo/patches/010-cross-compile-fixes.patch @@ -0,0 +1,16 @@ +diff -rupN sudo-1.8.11p2.orig/lib/util/Makefile.in sudo-1.8.11p2/lib/util/Makefile.in +--- sudo-1.8.11p2.orig/lib/util/Makefile.in 2014-10-07 22:26:20.000000000 +0200 ++++ sudo-1.8.11p2/lib/util/Makefile.in 2014-12-09 21:44:35.610041162 +0100 +@@ -142,10 +142,10 @@ libsudo_util.la: $(LTOBJS) @LT_LDDEP@ + esac + + siglist.c: mksiglist +- ./mksiglist > $@ ++ mksiglist > $@ + + signame.c: mksigname +- ./mksigname > $@ ++ mksigname > $@ + + mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(incdir)/sudo_compat.h $(top_builddir)/config.h + $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@ diff --git a/admin/sudo/patches/020-no-owner-change.patch b/admin/sudo/patches/020-no-owner-change.patch new file mode 100644 index 00000000..417e95de --- /dev/null +++ b/admin/sudo/patches/020-no-owner-change.patch @@ -0,0 +1,12 @@ +diff -rupN sudo-1.8.11p2.orig/Makefile.in sudo-1.8.11p2/Makefile.in +--- sudo-1.8.11p2.orig/Makefile.in 2014-10-07 22:26:20.000000000 +0200 ++++ sudo-1.8.11p2/Makefile.in 2014-12-09 22:00:27.256934143 +0100 +@@ -62,7 +62,7 @@ SHELL = @SHELL@ + SED = @SED@ + + INSTALL = $(SHELL) $(top_srcdir)/install-sh -c +-INSTALL_OWNER = -o $(install_uid) -g $(install_gid) ++INSTALL_OWNER = + + ECHO_N = @ECHO_N@ + ECHO_C = @ECHO_C@ diff --git a/admin/sudo/patches/030-musl-fix-missing-header.patch b/admin/sudo/patches/030-musl-fix-missing-header.patch new file mode 100644 index 00000000..efb7d870 --- /dev/null +++ b/admin/sudo/patches/030-musl-fix-missing-header.patch @@ -0,0 +1,12 @@ +diff -rupN sudo-1.8.14p3.orig/include/sudo_util.h sudo-1.8.14p3/include/sudo_util.h +--- sudo-1.8.14p3.orig/include/sudo_util.h 2015-07-22 14:22:49.000000000 +0200 ++++ sudo-1.8.14p3/include/sudo_util.h 2015-08-30 18:41:24.509814946 +0200 +@@ -23,6 +23,8 @@ + # include "compat/stdbool.h" + #endif /* HAVE_STDBOOL_H */ + ++#include ++ + /* + * Macros for operating on struct timeval. + */ diff --git a/admin/syslog-ng/Makefile b/admin/syslog-ng/Makefile new file mode 100644 index 00000000..e294ff57 --- /dev/null +++ b/admin/syslog-ng/Makefile @@ -0,0 +1,77 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=syslog-ng +PKG_VERSION:=3.9.1 +PKG_RELEASE:=3 + +PKG_MAINTAINER:=W. Michael Petullo + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_HASH:=5678856a550ae790618fabde9d1447f932ce7a9080d55dca8fc5df1202c70a17 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/syslog-ng + SECTION:=admin + CATEGORY:=Administration + DEPENDS:=+libpcre +glib2 +libeventlog +libopenssl +libuuid +libcurl + TITLE:=A powerful syslog daemon + URL:=http://www.balabit.com/network-security/syslog-ng/opensource-logging-system/ +endef + +define Package/syslog-ng/description + syslog-ng reads and logs messages to the system console, log + files, other machines and/or users as specified by its + configuration file. +endef + +define Package/syslog-ng/conffiles +/etc/syslog-ng.conf +/etc/syslog-ng.d/ +endef + +define Build/Configure + $(SED) 's,-I/usr/include,,' $(PKG_BUILD_DIR)/configure + $(Build/Configure/Default) +endef + +CONFIGURE_ARGS += \ + $(call autoconf_bool,CONFIG_IPV6,ipv6) \ + --disable-dependency-tracking \ + --disable-amqp \ + --disable-tcp-wrapper \ + --disable-glibtest \ + --disable-mongodb \ + --disable-java \ + --disable-json \ + --disable-python \ + --disable-spoof-source \ + --disable-sql \ + --disable-linux-caps \ + --disable-smtp \ + --disable-redis \ + --enable-prce \ + +TARGET_CPPFLAGS += \ + -I$(STAGING_DIR)/usr/include/eventlog + +CONFIGURE_VARS += \ + LIBDBI_CFLAGS="-I$(STAGING_DIR)/usr/include" + +define Package/syslog-ng/install + $(INSTALL_DIR) $(1)/usr/lib + $(MAKE) -C $(PKG_BUILD_DIR) \ + install-sbinPROGRAMS install-libLTLIBRARIES \ + install-moduleLTLIBRARIES DESTDIR="$(1)" + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng + $(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc + $(INSTALL_DIR) $(1)/etc/syslog-ng.d/ + $(call libtool_remove_files,$(1)) +endef + +$(eval $(call BuildPackage,syslog-ng)) diff --git a/admin/syslog-ng/files/syslog-ng.conf b/admin/syslog-ng/files/syslog-ng.conf new file mode 100644 index 00000000..cae24a84 --- /dev/null +++ b/admin/syslog-ng/files/syslog-ng.conf @@ -0,0 +1,41 @@ +@version:3.9 + +options { + chain_hostnames(no); + create_dirs(yes); + flush_lines(0); + keep_hostname(yes); + log_fifo_size(256); + log_msg_size(1024); + stats_freq(0); + flush_lines(0); + use_fqdn(no); +}; + +source src { + internal(); + unix-dgram("/dev/log"); +}; + +source net { + udp(ip(0.0.0.0) port(514)); +}; + +source kernel { + file("/proc/kmsg" program_override("kernel")); +}; + +destination messages { + file("/var/log/messages"); +}; + +log { + source(src); + source(net); + source(kernel); + destination(messages); +}; + +# put any customization files in this directory +@include "/etc/syslog-ng.d/" + diff --git a/admin/syslog-ng/files/syslog-ng.init b/admin/syslog-ng/files/syslog-ng.init new file mode 100644 index 00000000..bb03de67 --- /dev/null +++ b/admin/syslog-ng/files/syslog-ng.init @@ -0,0 +1,31 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2016 OpenWrt.org + +START=20 +PROG=/usr/sbin/syslog-ng +PROG2=/usr/sbin/syslog-ng-ctl + +SERVICE_USE_PID=1 +SERVICE_PID_FILE=/var/run/syslog-ng.pid + +config_file=/etc/syslog-ng.conf + +start() { + [ -f $config_file ] || return 1 + + if ! $PROG -s 2>/dev/null ; then + echo "Couldn't parse $(basename $config_file)" >&2 + exit 1 + fi + + service_start $PROG --process-mode background \ + -p $SERVICE_PID_FILE +} + +stop() { + service_stop $PROG +} + +reload() { + $PROG2 reload +} diff --git a/admin/syslog-ng/patches/100-use-1.0.2k-threadids.patch b/admin/syslog-ng/patches/100-use-1.0.2k-threadids.patch new file mode 100644 index 00000000..17c005aa --- /dev/null +++ b/admin/syslog-ng/patches/100-use-1.0.2k-threadids.patch @@ -0,0 +1,35 @@ +--- a/lib/crypto.c 2016-12-21 07:57:44.000000000 -0700 ++++ b/lib/crypto.c 2017-03-24 13:19:34.188259018 -0600 +@@ -51,11 +51,20 @@ + } + } + ++#if OPENSSL_VERSION_NUMBER < 0x10000000 + static unsigned long + ssl_thread_id(void) + { + return (unsigned long) get_thread_id(); + } ++ ++#else ++static void ++ssl_thread_id2(CRYPTO_THREADID *id) ++{ ++ CRYPTO_THREADID_set_numeric(id, get_thread_id()); ++} ++#endif + + static void + crypto_init_threading(void) +@@ -68,7 +76,11 @@ + { + g_static_mutex_init(&ssl_locks[i]); + } ++#if OPENSSL_VERSION_NUMBER < 0x10000000 + CRYPTO_set_id_callback(ssl_thread_id); ++#else ++ CRYPTO_THREADID_set_callback(ssl_thread_id2); ++#endif + CRYPTO_set_locking_callback(ssl_locking_callback); + } + diff --git a/admin/zabbix/Makefile b/admin/zabbix/Makefile new file mode 100644 index 00000000..af5044e0 --- /dev/null +++ b/admin/zabbix/Makefile @@ -0,0 +1,235 @@ +# +# Copyright (C) 2006-2015 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:=zabbix +PKG_VERSION:=3.2.7 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=3ea0c299bd69bc728177128740f0476bc1a2c1de438330df5bbd8f5fc6090712 +PKG_SOURCE_URL:=@SF/zabbix + +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=COPYING + +PKG_INSTALL:=1 + +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/zabbix/Default + SECTION:=admin + CATEGORY:=Administration + TITLE:=Zabbix + URL:=http://www.zabbix.com/ + SUBMENU:=zabbix + MAINTAINER:=Etienne CHAMPETIER + USERID:=zabbix=53:zabbix=53 + DEPENDS += $(ICONV_DEPENDS) +endef + +define Package/zabbix-agentd + $(call Package/zabbix/Default) + TITLE+= agentd +endef + +define Package/zabbix-extra-mac80211 + $(call Package/zabbix/Default) + TITLE+= discovery/userparameters for mac80211 + DEPENDS = +zabbix-agentd @PACKAGE_MAC80211_DEBUGFS @KERNEL_DEBUG_FS +endef + +define Package/zabbix-extra-network + $(call Package/zabbix/Default) + TITLE+= discovery/userparameters for network + DEPENDS = +zabbix-agentd +libuci-lua +lua +endef + +define Package/zabbix-extra-wifi + $(call Package/zabbix/Default) + TITLE+= discovery/userparameters for wifi + DEPENDS = +zabbix-agentd +libiwinfo-lua +libuci-lua +lua +endef + +define Package/zabbix-sender + $(call Package/zabbix/Default) + TITLE+= sender +endef + +define Package/zabbix-get + $(call Package/zabbix/Default) + TITLE+= get +endef + +define Package/zabbix-server + $(call Package/zabbix/Default) + TITLE+= server + DEPENDS += +libsqlite3 +endef + +define Package/zabbix-proxy + $(call Package/zabbix/Default) + TITLE+= proxy + DEPENDS += +libsqlite3 +endef + +define Package/zabbix-extra-mac80211/description +An extra package for zabbix-agentd that adds a discovery rule for mac80211 wifi phy and many userparameters. +It contains an suid helper to allow zabbix-agentd to still run as zabbix user and not as root. +See http://wiki.openwrt.org/doc/howto/zabbix for ready to use zabbix templates. +endef + +define Package/zabbix-extra-network/description +An extra package for zabbix-agentd that adds a discovery rule for openwrt network interfaces. +The idea here is to discover only interfaces listed in /etc/config/network (discover br-lan and not eth0.1 and wlan0) +See http://wiki.openwrt.org/doc/howto/zabbix for ready to use zabbix templates. +endef + +define Package/zabbix-extra-wifi/description +An extra package for zabbix-agentd that adds a discovery rule for wifi interfaces and many userparameters. +As it uses libiwinfo, it works with all wifi devices supported by openwrt. +See http://wiki.openwrt.org/doc/howto/zabbix for ready to use zabbix templates. +endef + +CONFIGURE_ARGS+= \ + --enable-agent \ + --enable-server \ + --enable-proxy \ + $(call autoconf_bool,CONFIG_IPV6,ipv6) \ + --disable-java \ + --with-sqlite3="$(STAGING_DIR)/usr" + +MAKE_FLAGS += ARCH="linux" + +define Package/zabbix/install/sbin + $(INSTALL_DIR) \ + $(1)/usr/sbin + + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/sbin/zabbix_$(2) \ + $(1)/usr/sbin/ +endef + +define Package/zabbix/install/bin + $(INSTALL_DIR) \ + $(1)/usr/bin + + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/zabbix_$(2) \ + $(1)/usr/bin/ +endef + +define Package/zabbix/install/etc + $(INSTALL_DIR) \ + $(1)/etc + + $(INSTALL_CONF) \ + $(PKG_INSTALL_DIR)/etc/zabbix_$(2).conf \ + $(1)/etc/ +endef + +define Package/zabbix/install/init.d + $(INSTALL_DIR) \ + $(1)/etc/init.d + + $(INSTALL_BIN) \ + ./files/zabbix_$(2).init \ + $(1)/etc/init.d/zabbix_$(2) +endef + +define Package/zabbix/install/zabbix.conf.d + $(INSTALL_DIR) \ + $(1)/etc/zabbix_agentd.conf.d + + $(INSTALL_BIN) \ + ./files/$(2) \ + $(1)/etc/zabbix_agentd.conf.d/$(2) +endef + +define Package/zabbix-agentd/conffiles +/etc/zabbix_agentd.conf +endef +define Package/zabbix-server/conffiles +/etc/zabbix_server.conf +endef +define Package/zabbix-proxy/conffiles +/etc/zabbix_proxy.conf +endef + +ifdef CONFIG_PACKAGE_zabbix-extra-mac80211 +define Build/Prepare/zabbix-extra-mac80211 + mkdir -p $(PKG_BUILD_DIR)/zabbix-extra-mac80211 + $(CP) ./files/zabbix_helper_mac80211.c $(PKG_BUILD_DIR)/zabbix-extra-mac80211/ +endef + +define Build/Compile/zabbix-extra-mac80211 + $(TARGET_CC) $(TARGET_CFLAGS) $(PKG_BUILD_DIR)/zabbix-extra-mac80211/zabbix_helper_mac80211.c -o $(PKG_BUILD_DIR)/zabbix-extra-mac80211/zabbix_helper_mac80211 +endef +endif + +define Build/Prepare + $(call Build/Prepare/Default) + $(call Build/Prepare/zabbix-extra-mac80211) +endef + +define Build/Compile + $(call Build/Compile/Default) + $(call Build/Compile/zabbix-extra-mac80211) +endef + +define Package/zabbix-agentd/install + $(INSTALL_DIR) $(1)/etc/zabbix_agentd.conf.d + $(call Package/zabbix/install/sbin,$(1),agentd) + $(call Package/zabbix/install/etc,$(1),agentd) + $(call Package/zabbix/install/init.d,$(1),agentd) +endef + +define Package/zabbix-extra-mac80211/install + $(call Package/zabbix/install/zabbix.conf.d,$(1),mac80211) + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/zabbix-extra-mac80211/zabbix_helper_mac80211 $(1)/usr/bin/ + chmod 4755 $(1)/usr/bin/zabbix_helper_mac80211 +endef + +define Package/zabbix-extra-network/install + $(call Package/zabbix/install/zabbix.conf.d,$(1),network) +endef + +define Package/zabbix-extra-wifi/install + $(call Package/zabbix/install/zabbix.conf.d,$(1),wifi) +endef + +define Package/zabbix-sender/install + $(call Package/zabbix/install/bin,$(1),sender) +endef + +define Package/zabbix-get/install + $(call Package/zabbix/install/bin,$(1),get) +endef + +define Package/zabbix-server/install + $(call Package/zabbix/install/sbin,$(1),server) + $(call Package/zabbix/install/etc,$(1),server) +endef + +define Package/zabbix-proxy/install + $(call Package/zabbix/install/sbin,$(1),proxy) + $(call Package/zabbix/install/etc,$(1),proxy) +endef + +$(eval $(call BuildPackage,zabbix-agentd)) +$(eval $(call BuildPackage,zabbix-extra-mac80211)) +$(eval $(call BuildPackage,zabbix-extra-network)) +$(eval $(call BuildPackage,zabbix-extra-wifi)) +$(eval $(call BuildPackage,zabbix-sender)) +$(eval $(call BuildPackage,zabbix-server)) +$(eval $(call BuildPackage,zabbix-proxy)) +$(eval $(call BuildPackage,zabbix-get)) diff --git a/admin/zabbix/files/mac80211 b/admin/zabbix/files/mac80211 new file mode 100644 index 00000000..a567f85c --- /dev/null +++ b/admin/zabbix/files/mac80211 @@ -0,0 +1,29 @@ +#see http://wiki.openwrt.org/doc/howto/zabbix for ready to use templates + +# If you want to know the exact meaning of an UserParameter, you can search in the ieee80211 standard: +# http://standards.ieee.org/getieee802/download/802.11-2012.pdf +# example: for mac80211.ACKFailureCount search for dot11ACKFailureCount (page 2145) + +# mac80211 phy discovery (like 'phy0') +# example: {"data":[{"{#PHY}":"phy0"}]} +# +UserParameter=mac80211.phydiscovery,zabbix_helper_mac80211 discovery + +#phy statistics (you need {#PHY} as parameter) +# +UserParameter=mac80211.ACKFailureCount[*],zabbix_helper_mac80211 $1 dot11ACKFailureCount +UserParameter=mac80211.FCSErrorCount[*],zabbix_helper_mac80211 $1 dot11FCSErrorCount +UserParameter=mac80211.RTSFailureCount[*],zabbix_helper_mac80211 $1 dot11RTSFailureCount +UserParameter=mac80211.RTSSuccessCount[*],zabbix_helper_mac80211 $1 dot11RTSSuccessCount + +# hidden behind MAC80211_DEBUG_COUNTERS +UserParameter=mac80211.FailedCount[*],zabbix_helper_mac80211 $1 dot11FailedCount +UserParameter=mac80211.FrameDuplicateCount[*],zabbix_helper_mac80211 $1 dot11FrameDuplicateCount +UserParameter=mac80211.MulticastReceivedFrameCount[*],zabbix_helper_mac80211 $1 dot11MulticastReceivedFrameCount +UserParameter=mac80211.MulticastTransmittedFrameCount[*],zabbix_helper_mac80211 $1 dot11MulticastTransmittedFrameCount +UserParameter=mac80211.MultipleRetryCount[*],zabbix_helper_mac80211 $1 dot11MultipleRetryCount +UserParameter=mac80211.ReceivedFragmentCount[*],zabbix_helper_mac80211 $1 dot11ReceivedFragmentCount +UserParameter=mac80211.RetryCount[*],zabbix_helper_mac80211 $1 dot11RetryCount +UserParameter=mac80211.TransmittedFragmentCount[*],zabbix_helper_mac80211 $1 dot11TransmittedFragmentCount +UserParameter=mac80211.TransmittedFrameCount[*],zabbix_helper_mac80211 $1 dot11TransmittedFrameCount + diff --git a/admin/zabbix/files/network b/admin/zabbix/files/network new file mode 100644 index 00000000..b68e2a50 --- /dev/null +++ b/admin/zabbix/files/network @@ -0,0 +1,9 @@ +#see http://wiki.openwrt.org/doc/howto/zabbix for ready to use templates + +# network interface discovery +# example: {"data":[{"{#IF}":"lo", "{#NET}":"loopback"},{"{#IF}":"br-lan", "{#NET}":"lan"},{"{#IF}":"eth0.1", "{#NET}":"wan"}]} +# +UserParameter=netowrt.discovery,lua -l uci -e 'x = uci.cursor(nil, "/var/state");list = "{\"data\":[";x:foreach("network", "interface", function(s) list=list.."{\"{#IF}\":\""..s.ifname.."\", \"{#NET}\":\""..s[".name"].."\"}," end); list=string.gsub(list,",$",""); print(list.."]}")' + + + diff --git a/admin/zabbix/files/wifi b/admin/zabbix/files/wifi new file mode 100644 index 00000000..f03d9b41 --- /dev/null +++ b/admin/zabbix/files/wifi @@ -0,0 +1,25 @@ +#see http://wiki.openwrt.org/doc/howto/zabbix for ready to use templates + +# wifi interface discovery +# example: {"data":[{"{#IF}":"wlan0", "{#MODE}":"ap", "{#SSID}":"Openwrt", "{#NET}":"lan", "{#DEV}":"radio0", "{#ENC}":"psk2+ccmp", "{#TYPE}":"mac80211", "{#HWMODE}":"11ng", "{#CHANNEL}":"11", "{#BSSID}":"xx:xx:xx:xx:xx:xx"}]} +# ubus call only work as root so you need to run zabbix as root to use wifi.ifdiscovery +UserParameter=wifi.ifdiscovery, lua -l ubus -l iwinfo -e 'u=ubus.connect();list="{\"data\":[";stat=u:call("network.wireless", "status", {});for dev, dev_table in pairs(stat) do for i, iface in pairs(dev_table["interfaces"]) do c=iface["config"];i=iface["ifname"];t=iwinfo.type(i);iw=iwinfo[t];e = iw.encryption(i);e = e and e.description or "None";n = table.concat(c["network"]," ");list=list.."{\"{#IF}\":\""..i.."\", \"{#MODE}\":\""..iw.mode(i).."\", \"{#SSID}\":\""..c["ssid"].."\", \"{#NET}\":\""..n.."\", \"{#DEV}\":\""..dev.."\", \"{#ENC}\":\""..e.."\", \"{#TYPE}\":\""..t.."\", \"{#HWMODE}\":\"".."?".."\", \"{#CHANNEL}\":\""..iw.channel(i).."\", \"{#BSSID}\":\""..iw.bssid(i).."\"},";end;end;list=string.gsub(list,",$","");print(list.."]}")' + + +#iwinfo info (you need {#IF} as parameter, like 'wlan0') +UserParameter=wifi.iwinfo.channel[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].channel('$1'))" +UserParameter=wifi.iwinfo.frequency[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].frequency('$1'))" +UserParameter=wifi.iwinfo.txpower[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].txpower('$1'))" +UserParameter=wifi.iwinfo.bitrate[*],lua -l iwinfo -e "b = iwinfo[iwinfo.type('$1')].bitrate('$1'); print(b or '0')" +UserParameter=wifi.iwinfo.signal[*],lua -l iwinfo -e "s = iwinfo[iwinfo.type('$1')].signal('$1'); print(s or '-255')" +UserParameter=wifi.iwinfo.noise[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].noise('$1'))" +UserParameter=wifi.iwinfo.quality[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].quality('$1'))" +UserParameter=wifi.iwinfo.quality_max[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].quality_max('$1'))" +UserParameter=wifi.iwinfo.mode[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].mode('$1'))" +UserParameter=wifi.iwinfo.ssid[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].ssid('$1'))" +UserParameter=wifi.iwinfo.bssid[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].bssid('$1'))" +UserParameter=wifi.iwinfo.country[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].country('$1'))" +UserParameter=wifi.iwinfo.nbusers[*],lua -l iwinfo -e "n = 0; for _,_ in pairs(iwinfo[iwinfo.type('$1')].assoclist('$1')) do n = n + 1 end; print(n)" +UserParameter=wifi.iwinfo.encryption[*],lua -l iwinfo -e "e = iwinfo[iwinfo.type('$1')].encryption('$1'); print(e and e.description or 'None')" +UserParameter=wifi.iwinfo.hwmode[*],lua -l iwinfo -e "x=iwinfo[iwinfo.type('$1')].hwmodelist('$1'); print((x.a and 'a' or '')..(x.b and 'b' or '')..(x.g and 'g' or '')..(x.n and 'n' or ''))" + diff --git a/admin/zabbix/files/zabbix_agentd.init b/admin/zabbix/files/zabbix_agentd.init new file mode 100755 index 00000000..ea886346 --- /dev/null +++ b/admin/zabbix/files/zabbix_agentd.init @@ -0,0 +1,23 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008-2011 OpenWrt.org + +START=60 + +USE_PROCD=1 +PROG=/usr/sbin/zabbix_agentd +CONFIG=/etc/zabbix_agentd.conf + +start_service() { + # Sometimes the agentd config was installed in /etc/zabbix/zabbix_agentd.conf + [ -f /etc/zabbix/zabbix_agentd.conf ] && mv /etc/zabbix/zabbix_agentd.conf ${CONFIG} + + [ -f ${CONFIG} ] || return 1 + + procd_open_instance + procd_set_param command ${PROG} -c ${CONFIG} -f + procd_set_param respawn + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_close_instance +} + diff --git a/admin/zabbix/files/zabbix_helper_mac80211.c b/admin/zabbix/files/zabbix_helper_mac80211.c new file mode 100644 index 00000000..1442d274 --- /dev/null +++ b/admin/zabbix/files/zabbix_helper_mac80211.c @@ -0,0 +1,77 @@ +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include + +int discovery() +{ + DIR *dir; + struct dirent *ent; + bool comma = false; + if ((dir = opendir ("/sys/kernel/debug/ieee80211/")) != NULL) { + printf("{\"data\":["); + while ((ent = readdir (dir)) != NULL) { + if (strcmp(".", ent->d_name) && strcmp("..", ent->d_name)) { + if (comma) + printf(","); + printf("{\"{#PHY}\":\"%s\"}", ent->d_name); + comma = true; + } + } + printf("]}\n"); + closedir(dir); + } else { + perror(""); + return EXIT_FAILURE; + } + return EXIT_SUCCESS; +} + +int get_param(char *phy, char *stat) +{ + char *filename = NULL; + FILE *f = NULL; + phy = basename(phy); + stat = basename(stat); + if (asprintf(&filename, "/sys/kernel/debug/ieee80211/%s/statistics/%s", phy, stat) > 0) + f = fopen(filename, "r"); + + if (f != NULL) { + char temp[256]; + while (fgets(temp, 256, f) != NULL) + printf("%s",temp); + + fclose(f); + } else { + perror(""); + return EXIT_FAILURE; + } + free(filename); + return EXIT_SUCCESS; +} + +int usage(char *name) +{ + fprintf(stderr, "Usage:\n"); + fprintf(stderr, " %s discovery\n", name); + fprintf(stderr, " => print mac80211.phydiscovery discovery rule\n"); + fprintf(stderr, " %s PHY STAT\n", name); + fprintf(stderr, " => cat /sys/kernel/debug/ieee80211/PHY/statistics/STAT as root\n"); + return EXIT_FAILURE; +} + +int main(int argc, char *argv[]) +{ + + switch (argc) { + case 2: + return discovery(); + case 3: + return get_param(argv[1], argv[2]); + default: + return usage(argv[0]); + } +} diff --git a/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch b/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch new file mode 100644 index 00000000..f4b5d33a --- /dev/null +++ b/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch @@ -0,0 +1,35 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -161,6 +161,10 @@ if test "x$found_resolv" != "xyes"; then + AC_MSG_ERROR([Unable to do DNS lookups (libresolv check failed)]) + fi + LIBS="${LIBS} ${RESOLV_LIBS}" ++AC_SEARCH_LIBS([res_mkquery], [], [AC_DEFINE([HAVE_RES_MKQUERY], 1, [Define if res_mkquery exists])]) ++AC_SEARCH_LIBS([__res_mkquery], [], [AC_DEFINE([HAVE_RES_MKQUERY], 1, [Define if res_mkquery exists])]) ++AC_SEARCH_LIBS([res_send], [], [AC_DEFINE([HAVE_RES_SEND], 1, [Define if res_send exists])]) ++AC_SEARCH_LIBS([__res_send], [], [AC_DEFINE([HAVE_RES_SEND], 1, [Define if res_send exists])]) + + dnl ***************************************************************** + dnl * * +--- a/src/libs/zbxsysinfo/common/net.c ++++ b/src/libs/zbxsysinfo/common/net.c +@@ -471,6 +471,7 @@ static int dns_query(AGENT_REQUEST *requ + return SYSINFO_RET_FAIL; + } + ++#if defined(HAVE_RES_MKQUERY) && defined(HAVE_RES_SEND) + if (-1 == (res = res_mkquery(QUERY, zone, C_IN, type, NULL, 0, NULL, buf, sizeof(buf)))) + { + SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Cannot create DNS query: %s", zbx_strerror(errno))); +@@ -505,6 +506,11 @@ static int dns_query(AGENT_REQUEST *requ + _res.retry = retry; + + res = res_send(buf, res, answer.buffer, sizeof(answer.buffer)); ++#else /* defined(HAVE_RES_QUERY) && defined(HAVE_RES_SEND) */ ++ /* retrand and retry are ignored */ ++ if (-1 == (res = res_query(zone, C_IN, type, answer.buffer, sizeof(answer.buffer)))) ++ return SYSINFO_RET_FAIL; ++#endif + + _res.options = saved_options; + _res.retrans = saved_retrans; diff --git a/admin/zabbix/patches/002-uclibc_loadavg.patch b/admin/zabbix/patches/002-uclibc_loadavg.patch new file mode 100644 index 00000000..ce62d06c --- /dev/null +++ b/admin/zabbix/patches/002-uclibc_loadavg.patch @@ -0,0 +1,48 @@ +--- a/src/libs/zbxsysinfo/linux/cpu.c ++++ b/src/libs/zbxsysinfo/linux/cpu.c +@@ -22,6 +22,45 @@ + #include "stats.h" + #include "log.h" + ++ ++/* uclibc and dietlibc do not have this junk -ReneR */ ++#if defined (__UCLIBC__) || defined (__dietlibc__) ++static int getloadavg (double loadavg[], int nelem) ++{ ++ int fd; ++ ++ fd = open ("/proc/loadavg", O_RDONLY); ++ if (fd < 0) ++ return -1; ++ else ++ { ++ char buf[65], *p; ++ ssize_t nread; ++ int i; ++ ++ nread = read (fd, buf, sizeof buf - 1); ++ close (fd); ++ if (nread <= 0) ++ return -1; ++ buf[nread - 1] = '\0'; ++ ++ if (nelem > 3) ++ nelem = 3; ++ p = buf; ++ for (i = 0; i < nelem; ++i) ++ { ++ char *endp; ++ loadavg[i] = strtod (p, &endp); ++ if (endp == p) ++ return -1; ++ p = endp; ++ } ++ ++ return i; ++ } ++} ++#endif ++ + int SYSTEM_CPU_NUM(AGENT_REQUEST *request, AGENT_RESULT *result) + { + char *type; diff --git a/admin/zabbix/patches/003-change-user-and-foreground.patch b/admin/zabbix/patches/003-change-user-and-foreground.patch new file mode 100644 index 00000000..6779e471 --- /dev/null +++ b/admin/zabbix/patches/003-change-user-and-foreground.patch @@ -0,0 +1,17 @@ +--- a/src/libs/zbxnix/daemon.c ++++ b/src/libs/zbxnix/daemon.c +@@ -300,11 +300,14 @@ int daemon_start(int allow_root, const c + + if (0 == allow_root && 0 == getuid()) /* running as root? */ + { ++#if 0 ++/* allow changing user and foreground */ + if (0 != (flags & ZBX_TASK_FLAG_FOREGROUND)) + { + zbx_error("cannot run as root!"); + exit(EXIT_FAILURE); + } ++#endif + + if (NULL == user) + user = "zabbix"; diff --git a/admin/zabbix/patches/010-change-agentd-config.patch b/admin/zabbix/patches/010-change-agentd-config.patch new file mode 100644 index 00000000..8b16b280 --- /dev/null +++ b/admin/zabbix/patches/010-change-agentd-config.patch @@ -0,0 +1,65 @@ +--- a/conf/zabbix_agentd.conf ++++ b/conf/zabbix_agentd.conf +@@ -3,12 +3,11 @@ + + ############ GENERAL PARAMETERS ################# + +-### Option: PidFile +-# Name of PID file. +-# +-# Mandatory: no +-# Default: +-# PidFile=/tmp/zabbix_agentd.pid ++# We do not need PidFile with procd ++# PidFile=/var/run/zabbix_agentd.pid ++ ++# use syslog ++LogType=system + + ### Option: LogType + # Specifies where log messages are written to: +@@ -27,8 +26,6 @@ + # Default: + # LogFile= + +-LogFile=/tmp/zabbix_agentd.log +- + ### Option: LogFileSize + # Maximum size of log file in MB. + # 0 - disable automatic log rotation. +@@ -114,6 +111,7 @@ Server=127.0.0.1 + # Range: 0-100 + # Default: + # StartAgents=3 ++StartAgents=1 + + ##### Active checks related + +@@ -129,8 +127,6 @@ Server=127.0.0.1 + # Default: + # ServerActive= + +-ServerActive=127.0.0.1 +- + ### Option: Hostname + # Unique, case sensitive hostname. + # Required for active checks and must match hostname as configured on the server. +@@ -140,8 +136,6 @@ ServerActive=127.0.0.1 + # Default: + # Hostname= + +-Hostname=Zabbix server +- + ### Option: HostnameItem + # Item used for generating Hostname if it is undefined. Ignored if Hostname is defined. + # Does not support UserParameters or aliases. +@@ -259,8 +253,8 @@ Hostname=Zabbix server + # Include= + + # Include=/usr/local/etc/zabbix_agentd.userparams.conf +-# Include=/usr/local/etc/zabbix_agentd.conf.d/ + # Include=/usr/local/etc/zabbix_agentd.conf.d/*.conf ++Include=/etc/zabbix_agentd.conf.d/ + + ####### USER-DEFINED MONITORED PARAMETERS ####### + diff --git a/admin/zabbix/patches/100-musl-compat.patch b/admin/zabbix/patches/100-musl-compat.patch new file mode 100644 index 00000000..61aeb9e0 --- /dev/null +++ b/admin/zabbix/patches/100-musl-compat.patch @@ -0,0 +1,23 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -51,7 +51,7 @@ AC_CHECK_HEADERS(stdio.h stdlib.h string + syslog.h time.h errno.h sys/types.h sys/stat.h netinet/in.h \ + math.h sys/socket.h dirent.h ctype.h \ + mtent.h fcntl.h sys/param.h arpa/inet.h \ +- sys/vfs.h sys/pstat.h sys/sysinfo.h sys/statvfs.h sys/statfs.h \ ++ sys/vfs.h sys/pstat.h sys/statvfs.h sys/statfs.h \ + sys/socket.h sys/loadavg.h arpa/inet.h \ + sys/vmmeter.h strings.h vm/vm_param.h \ + sys/time.h kstat.h sys/syscall.h sys/sysmacros.h \ +@@ -63,6 +63,11 @@ AC_CHECK_HEADERS(stdio.h stdlib.h string + Winber.h lber.h ws2tcpip.h inttypes.h sys/file.h grp.h \ + execinfo.h libperfstat.h sys/systemcfg.h sys/mnttab.h mntent.h sys/times.h \ + dlfcn.h sys/utsname.h) ++AC_CHECK_HEADERS(sys/sysinfo.h, [], [], [ ++#ifdef HAVE_LINUX_KERNEL_H ++# include ++#endif ++]) + AC_CHECK_HEADERS(resolv.h, [], [], [ + #ifdef HAVE_SYS_TYPES_H + # include diff --git a/admin/zabbix/patches/110-reproducible-builds.patch b/admin/zabbix/patches/110-reproducible-builds.patch new file mode 100644 index 00000000..f7d03fa9 --- /dev/null +++ b/admin/zabbix/patches/110-reproducible-builds.patch @@ -0,0 +1,13 @@ +Index: zabbix-3.2.7/src/libs/zbxcommon/str.c +=================================================================== +--- zabbix-3.2.7.orig/src/libs/zbxcommon/str.c ++++ zabbix-3.2.7/src/libs/zbxcommon/str.c +@@ -51,7 +51,7 @@ static const char help_message_footer[] + void version(void) + { + printf("%s (Zabbix) %s\n", title_message, ZABBIX_VERSION); +- printf("Revision %s %s, compilation time: %s %s\n\n", ZABBIX_REVISION, ZABBIX_REVDATE, __DATE__, __TIME__); ++ printf("Revision %s %s\n\n", ZABBIX_REVISION, ZABBIX_REVDATE); + puts(copyright_message); + } + diff --git a/devel/autoconf/Makefile b/devel/autoconf/Makefile new file mode 100644 index 00000000..48d71b7d --- /dev/null +++ b/devel/autoconf/Makefile @@ -0,0 +1,70 @@ +# +# Copyright (C) 2015 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:=autoconf +PKG_VERSION:=2.69 +PKG_RELEASE:=2 + +PKG_SOURCE_URL:=@GNU/autoconf +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_HASH:=64ebcec9f8ac5b2487125a86a7760d2591ac9e1d3dbd59489633f9de62a57684 +PKG_MAINTAINER:=Heinrich Schuchardt +PKG_LICENSE:=GPL-3.0+ + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +CONFIGURE_VARS += M4=m4 EMACS=no + +define Package/autoconf + SECTION:=devel + CATEGORY:=Development + TITLE:=autoconf + URL:=https://www.gnu.org/software/autoconf/ + DEPENDS:=+m4 +perl +perlbase-data +perlbase-file +perlbase-getopt \ + +perlbase-dynaloader +perlbase-text +endef + +define Package/autoconf/description + Autoconf is an extensible package of M4 macros that produce shell scripts to + automatically configure software source code packages. +endef + +define Build/Install + $(SED) 's/@PERL@/\/usr\/bin\/perl/g' $(PKG_BUILD_DIR)/bin/Makefile.in + $(call Build/Install/Default) +endef + +define Package/autoconf/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/share/autoconf + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/INSTALL \ + $(1)/usr/share/autoconf/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/autom4te.cfg \ + $(1)/usr/share/autoconf/ + $(INSTALL_DIR) $(1)/usr/share/autoconf/Autom4te + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/Autom4te/* \ + $(1)/usr/share/autoconf/Autom4te/ + $(INSTALL_DIR) $(1)/usr/share/autoconf/autoconf + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/autoconf/* \ + $(1)/usr/share/autoconf/autoconf/ + $(INSTALL_DIR) $(1)/usr/share/autoconf/autoscan + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/autoscan/* \ + $(1)/usr/share/autoconf/autoscan/ + $(INSTALL_DIR) $(1)/usr/share/autoconf/autotest + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/autotest/* \ + $(1)/usr/share/autoconf/autotest/ + $(INSTALL_DIR) $(1)/usr/share/autoconf/m4sugar + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/m4sugar/* \ + $(1)/usr/share/autoconf/m4sugar/ +endef + +$(eval $(call BuildPackage,autoconf)) diff --git a/devel/automake/Makefile b/devel/automake/Makefile new file mode 100644 index 00000000..87a69b18 --- /dev/null +++ b/devel/automake/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2015-2016 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:=automake +PKG_VERSION:=1.15 +PKG_RELEASE:=4 + +PKG_SOURCE_URL:=@GNU/automake +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_HASH:=9908c75aabd49d13661d6dcb1bc382252d22cc77bf733a2d55e87f2aa2db8636 +PKG_MAINTAINER:=Heinrich Schuchardt +PKG_LICENSE:=GPL-3.0+ + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/automake + SECTION:=devel + CATEGORY:=Development + TITLE:=automake + URL:=https://www.gnu.org/software/automake/ + DEPENDS:=+autoconf +perlbase-thread +perlbase-attributes +endef + +define Package/automake/description + Automake is a tool for automatically generating Makefile.in files compliant + with the GNU Coding Standards. +endef + +FIX_PATHS = $(SED) '1c \#!/usr/bin/perl' -e 's| /[^ ]*/bin/perl| /usr/bin/perl|g' + +define Package/automake/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/automake-$(PKG_VERSION) \ + $(1)/usr/bin/automake-$(PKG_VERSION) + $(LN) automake-$(PKG_VERSION) $(1)/usr/bin/automake + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aclocal-$(PKG_VERSION) \ + $(1)/usr/bin/aclocal-$(PKG_VERSION) + $(LN) aclocal-$(PKG_VERSION) $(1)/usr/bin/aclocal + $(FIX_PATHS) $(1)/usr/bin/automake-$(PKG_VERSION) + $(FIX_PATHS) $(1)/usr/bin/aclocal-$(PKG_VERSION) + $(INSTALL_DIR) $(1)/usr/share/automake-$(PKG_VERSION) + + for dir in \ + automake-$(PKG_VERSION) automake-$(PKG_VERSION)/Automake \ + automake-$(PKG_VERSION)/am aclocal \ + aclocal-$(PKG_VERSION) aclocal-$(PKG_VERSION)/internal \ + ; do \ + $(INSTALL_DIR) $(1)/usr/share/$$$$dir; \ + for file in $$$$(cd $(PKG_INSTALL_DIR) && \ + find usr/share/$$$$dir -maxdepth 1 -type f); do \ + $(INSTALL_DATA) $$(PKG_INSTALL_DIR)/$$$$file \ + $(1)/$$$$file; \ + done; \ + done +endef + +$(eval $(call BuildPackage,automake)) diff --git a/devel/diffutils/Makefile b/devel/diffutils/Makefile new file mode 100644 index 00000000..643eaf9a --- /dev/null +++ b/devel/diffutils/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2008-2015 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:=diffutils +PKG_VERSION:=3.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@GNU/diffutils +PKG_HASH:=d621e8bdd4b573918c8145f7ae61817d1be9deb4c8d2328a65cea8e11d783bd6 +PKG_MAINTAINER:=Roger D +PKG_LICENSE:=GPL-3.0 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/diffutils + SECTION:=devel + CATEGORY:=Development + DEPENDS:=+USE_GLIBC:librt + TITLE:=diffutils + URL:=http://www.gnu.org/software/diffutils/ +endef + +define Package/diffutils/description + The Diffutils package contains programs that show the differences between + files or directories. +endef + +CONFIGURE_VARS += \ + ac_cv_func_mempcpy=n +TARGET_CFLAGS += --std=gnu99 + +define Package/diffutils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{sdiff,diff3,diff,cmp} $(1)/usr/bin/ +endef + +define Package/diffutils/preinst +#!/bin/sh +for x in sdiff diff3 diff cmp; do + [ -L "$${IPKG_INSTROOT}/usr/bin/$$x" ] && rm -f "$${IPKG_INSTROOT}/usr/bin/$$x" +done +exit 0 +endef + +define Package/diffutils/postrm +#!/bin/sh +for x in sdiff diff3 diff cmp; do + /bin/busybox $$x -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/bin/$$x +done +exit 0 +endef + +$(eval $(call BuildPackage,diffutils)) diff --git a/devel/gcc/Makefile b/devel/gcc/Makefile new file mode 100644 index 00000000..716f593d --- /dev/null +++ b/devel/gcc/Makefile @@ -0,0 +1,176 @@ +# +# 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:=5.4.0 +PKG_RELEASE:=3 +PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION) +PKG_HASH:=608df76dec2d34de6558249d8af4cbee21eceddbcb580d666f7a5a583ca3303a +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +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) +TARGET_CPPFLAGS += -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS + +# 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 + +ifneq ($(CONFIG_SOFT_FLOAT),y) + ifeq ($(CONFIG_arm),y) + ARM_FLOAT_OPTION:= --with-float=hard + endif +endif + +define Package/gcc + SECTION:=devel + CATEGORY:=Development + TITLE:=gcc + MAINTAINER:=Noble Pepper + DEPENDS:= +binutils +libstdcpp +endef + +define Package/gcc/description + build a native toolchain for compiling on target +endef + +GMPSRC=gmp-4.3.2 + +define Download/gmp + URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/ + FILE:=$(GMPSRC).tar.bz2 + HASH:=936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775 +endef +$(eval $(call Download,gmp)) + +MPCSRC=mpc-0.8.1 + +define Download/mpc + URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/ + FILE:=$(MPCSRC).tar.gz + HASH:=e664603757251fd8a352848276497a4c79b7f8b21fd8aedd5cc0598a38fee3e4 +endef +$(eval $(call Download,mpc)) + +MPFRSRC=mpfr-2.4.2 + +define Download/mpfr + URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/ + FILE:=$(MPFRSRC).tar.bz2 + HASH:=c7e75a08a8d49d2082e4caee1591a05d11b9d5627514e678f02d66a124bcf2ba +endef +$(eval $(call Download,mpfr)) + +define Build/Prepare + $(PKG_UNPACK) +# we have to download and unpack additional stuff before patching + tar -C $(PKG_BUILD_DIR) -xvjf $(DL_DIR)/$(GMPSRC).tar.bz2 + ln -sf $(PKG_BUILD_DIR)/$(GMPSRC) $(PKG_BUILD_DIR)/gmp + tar -C $(PKG_BUILD_DIR) -xvzf $(DL_DIR)/$(MPCSRC).tar.gz + ln -sf $(PKG_BUILD_DIR)/$(MPCSRC) $(PKG_BUILD_DIR)/mpc + tar -C $(PKG_BUILD_DIR) -xvjf $(DL_DIR)/$(MPFRSRC).tar.bz2 + ln -sf $(PKG_BUILD_DIR)/$(MPFRSRC) $(PKG_BUILD_DIR)/mpfr + $(Build/Patch) +# poor man's fix for `none-openwrt-linux' not recognized when building with musl + cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/mpfr/ + cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/gmp/ + cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/mpc/ +endef + +TARGET_CXX += -std=gnu++03 +CONFIGURE_ARGS += CXX_FOR_TARGET="$(TARGET_CXX)" CXXFLAGS_FOR_TARGET="-g -O2 -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS" + +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 \ + $(if $(CONFIG_LIBC_USE_GLIBC),--enable,--disable)-__cxa_atexit \ + --with-default-libstdcxx-abi=gcc4-compatible \ + --enable-target-optspace \ + --with-gnu-ld \ + --disable-nls \ + --disable-libsanitizer \ + --disable-libvtv \ + --disable-libcilkrts \ + --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 \ + --with-local-prefix=/usr \ + $(ARM_FLOAT_OPTION) \ + $(SOFT_FLOAT_CONFIG_OPTION) \ + $(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \ + ); +endef + +define Build/Compile + export SHELL="$(BASH)"; $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" $(MAKE_ARGS) all install +endef + +ENVCFLAGS:="$(TARGET_OPTIMIZATION) $(EXTRA_OPTIMIZATION) +ifeq ($(CONFIG_SOFT_FLOAT),y) + ifeq ($(CONFIG_arm),y) + ENVCFLAGS+= -mfloat-abi=soft + else + ENVCFLAGS+= -msoft-float + endif +endif +ENVCFLAGS+=" + +ENVLDFLAGS:="-Wl,-rpath=/usr/lib -Wl,--dynamic-linker=/usr/lib/$(DYNLINKER) -L/usr/lib" + +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 + cp -ar $(TOOLCHAIN_DIR)/include $(1)/usr + 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) + cp -a $(TOOLCHAIN_DIR)/lib/libm.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) + rm -f $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libgo* + rm -f $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libcc1* + echo '#!/bin/sh' > $(1)/usr/bin/gcc_env.sh + echo 'export LDFLAGS=$(ENVLDFLAGS)' >> $(1)/usr/bin/gcc_env.sh + echo 'export CFLAGS=$(ENVCFLAGS)' >> $(1)/usr/bin/gcc_env.sh + chmod +x $(1)/usr/bin/gcc_env.sh +endef + +$(eval $(call BuildPackage,gcc)) diff --git a/devel/gcc/README b/devel/gcc/README new file mode 100644 index 00000000..58db4740 --- /dev/null +++ b/devel/gcc/README @@ -0,0 +1,10 @@ +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 except libgcc.a on those architectures +that need it. + +For now, this was only tested on arm (EABI) and mips targets. Others to be +done... + + Christian Beier diff --git a/devel/gcc/patches/001-revert_register_mode_search.patch b/devel/gcc/patches/001-revert_register_mode_search.patch new file mode 100644 index 00000000..06373eb6 --- /dev/null +++ b/devel/gcc/patches/001-revert_register_mode_search.patch @@ -0,0 +1,65 @@ +Revert of: + +commit 275035b56823b26d5fb7e90fad945b998648edf2 +Author: bergner +Date: Thu Sep 5 14:09:07 2013 +0000 + + PR target/58139 + * reginfo.c (choose_hard_reg_mode): Scan through all mode classes + looking for widest mode. + + + git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202286 138bc75d-0d04-0410-961f-82ee72b054a4 + + +--- a/gcc/reginfo.c ++++ b/gcc/reginfo.c +@@ -665,35 +665,40 @@ choose_hard_reg_mode (unsigned int regno + mode = GET_MODE_WIDER_MODE (mode)) + if ((unsigned) hard_regno_nregs[regno][mode] == nregs + && HARD_REGNO_MODE_OK (regno, mode) +- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) +- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) ++ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) + found_mode = mode; + ++ if (found_mode != VOIDmode) ++ return found_mode; ++ + for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); + mode != VOIDmode; + mode = GET_MODE_WIDER_MODE (mode)) + if ((unsigned) hard_regno_nregs[regno][mode] == nregs + && HARD_REGNO_MODE_OK (regno, mode) +- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) +- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) ++ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) + found_mode = mode; + ++ if (found_mode != VOIDmode) ++ return found_mode; ++ + for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT); + mode != VOIDmode; + mode = GET_MODE_WIDER_MODE (mode)) + if ((unsigned) hard_regno_nregs[regno][mode] == nregs + && HARD_REGNO_MODE_OK (regno, mode) +- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) +- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) ++ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) + found_mode = mode; + ++ if (found_mode != VOIDmode) ++ return found_mode; ++ + for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT); + mode != VOIDmode; + mode = GET_MODE_WIDER_MODE (mode)) + if ((unsigned) hard_regno_nregs[regno][mode] == nregs + && HARD_REGNO_MODE_OK (regno, mode) +- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) +- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) ++ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) + found_mode = mode; + + if (found_mode != VOIDmode) diff --git a/devel/gcc/patches/002-case_insensitive.patch b/devel/gcc/patches/002-case_insensitive.patch new file mode 100644 index 00000000..b3d2dbe2 --- /dev/null +++ b/devel/gcc/patches/002-case_insensitive.patch @@ -0,0 +1,14 @@ +--- a/include/filenames.h ++++ b/include/filenames.h +@@ -43,11 +43,6 @@ extern "C" { + # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) + # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) + #else /* not DOSish */ +-# if defined(__APPLE__) +-# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM +-# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 +-# endif +-# endif /* __APPLE__ */ + # define HAS_DRIVE_SPEC(f) (0) + # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) + # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/devel/gcc/patches/002-dont-choke-when-building-32bit-on-64bit.patch b/devel/gcc/patches/002-dont-choke-when-building-32bit-on-64bit.patch new file mode 100644 index 00000000..a00cbcde --- /dev/null +++ b/devel/gcc/patches/002-dont-choke-when-building-32bit-on-64bit.patch @@ -0,0 +1,14 @@ +--- a/gcc/real.h ++++ b/gcc/real.h +@@ -75,9 +75,10 @@ + + (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 + as many as four (32-bit HOST_WIDE_INT, 128-bit REAL_VALUE_TYPE). diff --git a/devel/gcc/patches/003-mpfr-longlong-mips.patch b/devel/gcc/patches/003-mpfr-longlong-mips.patch new file mode 100644 index 00000000..0ab9fe50 --- /dev/null +++ b/devel/gcc/patches/003-mpfr-longlong-mips.patch @@ -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 diff --git a/devel/gcc/patches/010-documentation.patch b/devel/gcc/patches/010-documentation.patch new file mode 100644 index 00000000..07064a97 --- /dev/null +++ b/devel/gcc/patches/010-documentation.patch @@ -0,0 +1,23 @@ +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -2941,18 +2941,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) diff --git a/devel/gcc/patches/020-no-plt-backport.patch b/devel/gcc/patches/020-no-plt-backport.patch new file mode 100644 index 00000000..b9702c95 --- /dev/null +++ b/devel/gcc/patches/020-no-plt-backport.patch @@ -0,0 +1,28 @@ +--- a/gcc/calls.c ++++ b/gcc/calls.c +@@ -225,6 +225,12 @@ prepare_call_address (tree fndecl_or_typ + && targetm.small_register_classes_for_mode_p (FUNCTION_MODE)) + ? force_not_mem (memory_address (FUNCTION_MODE, funexp)) + : memory_address (FUNCTION_MODE, funexp)); ++ else if (flag_pic && !flag_plt && fndecl_or_type ++ && TREE_CODE (fndecl_or_type) == FUNCTION_DECL ++ && !targetm.binds_local_p (fndecl_or_type)) ++ { ++ funexp = force_reg (Pmode, funexp); ++ } + else if (! sibcallp) + { + #ifndef NO_FUNCTION_CSE +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -1779,6 +1779,10 @@ fpie + Common Report Var(flag_pie,1) Negative(fPIC) + Generate position-independent code for executables if possible (small mode) + ++fplt ++Common Report Var(flag_plt) Init(1) ++Use PLT for PIC calls (-fno-plt: load the address from GOT at call site) ++ + fplugin= + Common Joined RejectNegative Var(common_deferred_options) Defer + Specify a plugin to load diff --git a/devel/gcc/patches/040-fix-mips-ICE-PR-68400.patch b/devel/gcc/patches/040-fix-mips-ICE-PR-68400.patch new file mode 100644 index 00000000..e88af340 --- /dev/null +++ b/devel/gcc/patches/040-fix-mips-ICE-PR-68400.patch @@ -0,0 +1,23 @@ +--- a/gcc/config/mips/mips.c ++++ b/gcc/config/mips/mips.c +@@ -8001,9 +8001,17 @@ mask_low_and_shift_p (machine_mode mode, + bool + and_operands_ok (machine_mode mode, rtx op1, rtx op2) + { +- return (memory_operand (op1, mode) +- ? and_load_operand (op2, mode) +- : and_reg_operand (op2, mode)); ++ if (!memory_operand (op1, mode)) ++ return and_reg_operand (op2, mode); ++ ++ if (!and_load_operand (op2, mode)) ++ return false; ++ ++ if (!TARGET_MIPS16 || si_mask_operand(op2, mode)) ++ return true; ++ ++ op1 = XEXP (op1, 0); ++ return !(REG_P (op1) && REGNO (op1) == STACK_POINTER_REGNUM); + } + + /* The canonical form of a mask-low-and-shift-left operation is diff --git a/devel/gcc/patches/100-uclibc-conf.patch b/devel/gcc/patches/100-uclibc-conf.patch new file mode 100644 index 00000000..ff9ad94f --- /dev/null +++ b/devel/gcc/patches/100-uclibc-conf.patch @@ -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 diff --git a/devel/gcc/patches/200-musl_config.patch b/devel/gcc/patches/200-musl_config.patch new file mode 100644 index 00000000..b9a5b282 --- /dev/null +++ b/devel/gcc/patches/200-musl_config.patch @@ -0,0 +1,309 @@ +From: ktkachov +Date: Fri, 8 May 2015 08:25:47 +0000 (+0000) +Subject: [PATCH 2/13] musl libc config +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a9173ceabaf29c16f8ef226fbf98af373a4b2ceb + +[PATCH 2/13] musl libc config + +2015-05-08 Gregor Richards + Szabolcs Nagy + + * config.gcc (LIBC_MUSL): New tm_defines macro. + * config/linux.h (OPTION_MUSL): Define. + (MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER32,) + (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32,) + (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,) + (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,) + (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define. + * config/linux.opt (mmusl): New option. + * doc/invoke.texi (GNU/Linux Options): Document -mmusl. + * configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*. + (gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*. + * configure: Regenerate. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222904 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -575,7 +575,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" + + # 32-bit x86 processors supported by --with-arch=. Each processor + # MUST be separated by exactly one space. +@@ -720,6 +720,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/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() \ +@@ -50,21 +52,25 @@ see the files COPYING3 and COPYING.RUNTI + } while (0) + + /* 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. */ ++ uClibc or Bionic or musl is the default C library and whether ++ -muclibc or -mglibc or -mbionic or -mmusl 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 */ +@@ -81,24 +87,100 @@ see the files COPYING3 and COPYING.RUNTI + #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" + #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" + #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32" ++/* Should be redefined for each target that supports musl. */ ++#define MUSL_DYNAMIC_LINKER "/dev/null" ++#define MUSL_DYNAMIC_LINKER32 "/dev/null" ++#define MUSL_DYNAMIC_LINKER64 "/dev/null" ++#define MUSL_DYNAMIC_LINKERX32 "/dev/null" + + #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) + + /* Whether we have Bionic libc runtime */ + #undef TARGET_HAS_BIONIC + #define TARGET_HAS_BIONIC (OPTION_BIONIC) + ++/* musl avoids problematic includes by rearranging the include directories. ++ * Unfortunately, this is mostly duplicated from cppdefault.c */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#define INCLUDE_DEFAULTS_MUSL_GPP \ ++ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ ++ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ ++ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, ++ ++#ifdef LOCAL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_LOCAL \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_LOCAL ++#endif ++ ++#ifdef PREFIX_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_PREFIX ++#endif ++ ++#ifdef CROSS_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_CROSS \ ++ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#ifdef TOOL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_TOOL \ ++ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_TOOL ++#endif ++ ++#ifdef NATIVE_SYSTEM_HEADER_DIR ++#define INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_NATIVE ++#endif ++ ++#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) ++# undef INCLUDE_DEFAULTS_MUSL_LOCAL ++# define INCLUDE_DEFAULTS_MUSL_LOCAL ++# undef INCLUDE_DEFAULTS_MUSL_NATIVE ++# define INCLUDE_DEFAULTS_MUSL_NATIVE ++#else ++# undef INCLUDE_DEFAULTS_MUSL_CROSS ++# define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#undef INCLUDE_DEFAULTS ++#define INCLUDE_DEFAULTS \ ++ { \ ++ INCLUDE_DEFAULTS_MUSL_GPP \ ++ INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ INCLUDE_DEFAULTS_MUSL_CROSS \ ++ INCLUDE_DEFAULTS_MUSL_TOOL \ ++ INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ ++ { 0, 0, 0, 0, 0, 0 } \ ++ } ++#endif ++ + #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ + /* This is a *uclinux* target. We don't define below macros to normal linux + versions, because doing so would require *uclinux* targets to include +--- a/gcc/config/linux.opt ++++ b/gcc/config/linux.opt +@@ -28,5 +28,9 @@ Target Report RejectNegative Var(linux_l + Use GNU C library + + muclibc +-Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) ++Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mmusl) + Use uClibc C library ++ ++mmusl ++Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mbionic) ++Use musl C library +--- a/gcc/configure ++++ b/gcc/configure +@@ -27833,6 +27833,9 @@ if test "${gcc_cv_libc_provides_ssp+set} + else + gcc_cv_libc_provides_ssp=no + case "$target" in ++ *-*-musl*) ++ # All versions of musl provide stack protector ++ gcc_cv_libc_provides_ssp=yes;; + *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) + # glibc 2.4 and later provides __stack_chk_fail and + # either __stack_chk_guard, or TLS access to stack guard canary. +@@ -27865,6 +27868,7 @@ fi + # ) and for now + # simply assert that glibc does provide this, which is true for all + # realistically usable GNU/Hurd configurations. ++ # All supported versions of musl provide it as well + gcc_cv_libc_provides_ssp=yes;; + *-*-darwin* | *-*-freebsd*) + ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail" +@@ -27961,6 +27965,9 @@ case "$target" in + gcc_cv_target_dl_iterate_phdr=no + fi + ;; ++ *-linux-musl*) ++ gcc_cv_target_dl_iterate_phdr=yes ++ ;; + esac + + if test x$gcc_cv_target_dl_iterate_phdr = xyes; then +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5287,6 +5287,9 @@ AC_CACHE_CHECK(__stack_chk_fail in targe + gcc_cv_libc_provides_ssp, + [gcc_cv_libc_provides_ssp=no + case "$target" in ++ *-*-musl*) ++ # All versions of musl provide stack protector ++ gcc_cv_libc_provides_ssp=yes;; + *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) + # glibc 2.4 and later provides __stack_chk_fail and + # either __stack_chk_guard, or TLS access to stack guard canary. +@@ -5313,6 +5316,7 @@ AC_CACHE_CHECK(__stack_chk_fail in targe + # ) and for now + # simply assert that glibc does provide this, which is true for all + # realistically usable GNU/Hurd configurations. ++ # All supported versions of musl provide it as well + gcc_cv_libc_provides_ssp=yes;; + *-*-darwin* | *-*-freebsd*) + AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], +@@ -5386,6 +5390,9 @@ case "$target" in + gcc_cv_target_dl_iterate_phdr=no + fi + ;; ++ *-linux-musl*) ++ gcc_cv_target_dl_iterate_phdr=yes ++ ;; + esac + GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) + if test x$gcc_cv_target_dl_iterate_phdr = xyes; then +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -667,7 +667,7 @@ Objective-C and Objective-C++ Dialects}. + -mcpu=@var{cpu}} + + @emph{GNU/Linux Options} +-@gccoptlist{-mglibc -muclibc -mbionic -mandroid @gol ++@gccoptlist{-mglibc -muclibc -mmusl -mbionic -mandroid @gol + -tno-android-cc -tno-android-ld} + + @emph{H8/300 Options} +@@ -15340,13 +15340,19 @@ These @samp{-m} options are defined for + @item -mglibc + @opindex mglibc + Use the GNU C library. This is the default except +-on @samp{*-*-linux-*uclibc*} and @samp{*-*-linux-*android*} targets. ++on @samp{*-*-linux-*uclibc*}, @samp{*-*-linux-*musl*} and ++@samp{*-*-linux-*android*} targets. + + @item -muclibc + @opindex muclibc + Use uClibc C library. This is the default on + @samp{*-*-linux-*uclibc*} targets. + ++@item -mmusl ++@opindex mmusl ++Use the musl C library. This is the default on ++@samp{*-*-linux-*musl*} targets. ++ + @item -mbionic + @opindex mbionic + Use Bionic C library. This is the default on diff --git a/devel/gcc/patches/201-musl_arm.patch b/devel/gcc/patches/201-musl_arm.patch new file mode 100644 index 00000000..27a26afc --- /dev/null +++ b/devel/gcc/patches/201-musl_arm.patch @@ -0,0 +1,43 @@ +From: ktkachov +Date: Wed, 27 May 2015 13:17:11 +0000 (+0000) +Subject: [PATCH 4/13] arm musl support +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=de799bd087ab9a179768fea75bd195a31d3432a4 + +[PATCH 4/13] arm musl support + +On behalf of szabolcs.nagy@arm.com + +2015-05-27 Gregor Richards + + * config/arm/linux-eabi.h (MUSL_DYNAMIC_LINKER): Define. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223749 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -77,6 +77,23 @@ + %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ + %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" + ++/* For ARM musl currently supports four dynamic linkers: ++ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI ++ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI ++ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB ++ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB ++ musl does not support the legacy OABI mode. ++ All the dynamic linkers live in /lib. ++ We default to soft-float, EL. */ ++#undef MUSL_DYNAMIC_LINKER ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" ++#endif ++#define MUSL_DYNAMIC_LINKER \ ++ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.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 diff --git a/devel/gcc/patches/202-musl_mips.patch b/devel/gcc/patches/202-musl_mips.patch new file mode 100644 index 00000000..816dd8d1 --- /dev/null +++ b/devel/gcc/patches/202-musl_mips.patch @@ -0,0 +1,35 @@ +From: ktkachov +Date: Fri, 8 May 2015 15:16:50 +0000 (+0000) +Subject: [PATCH 6/13] mips musl support +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2550b6a866c887472b587bef87d433c51cf1ebc8 + +[PATCH 6/13] mips musl support + +2015-05-08 Gregor Richards + Szabolcs Nagy + + * config/mips/linux.h (MUSL_DYNAMIC_LINKER32): Define. + (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERN32): Define. + (GNU_USER_DYNAMIC_LINKERN32): Update. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222915 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/gcc/config/mips/linux.h ++++ b/gcc/config/mips/linux.h +@@ -37,7 +37,13 @@ along with GCC; see the file COPYING3. + #define UCLIBC_DYNAMIC_LINKERN32 \ + "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}" + ++#undef MUSL_DYNAMIC_LINKER32 ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1" ++#undef MUSL_DYNAMIC_LINKER64 ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1" ++#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1" ++ + #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" + #define GNU_USER_DYNAMIC_LINKERN32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ +- BIONIC_DYNAMIC_LINKERN32) ++ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32) diff --git a/devel/gcc/patches/203-musl_powerpc.patch b/devel/gcc/patches/203-musl_powerpc.patch new file mode 100644 index 00000000..b4f34e81 --- /dev/null +++ b/devel/gcc/patches/203-musl_powerpc.patch @@ -0,0 +1,209 @@ + +gcc/Changelog: + +2015-04-24 Gregor Richards + Szabolcs Nagy + + * config.gcc (secure_plt): Add *-linux*-musl*. + * config/rs6000/linux64.h (MUSL_DYNAMIC_LINKER32): Define. + (MUSL_DYNAMIC_LINKER64): Define. + (GNU_USER_DYNAMIC_LINKER32): Update. + (GNU_USER_DYNAMIC_LINKER64): Update. + (CHOOSE_DYNAMIC_LINKER): Update. + + * config/rs6000/secureplt.h (LINK_SECURE_PLT_DEFAULT_SPEC): Define. + * config/rs6000/sysv4.h (GNU_USER_DYNAMIC_LINKER): Update. + (MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER_E,) + (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,) + (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,) + (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define. + (LINK_SECURE_PLT_DEFAULT_SPEC): Define. + (CHOOSE_DYNAMIC_LINKER, LINK_TARGET_SPEC, LINK_OS_LINUX_SPEC): Update. + + * config/rs6000/sysv4le.h (MUSL_DYNAMIC_LINKER_E): Define. + +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -365,17 +365,21 @@ extern int dot_symbols; + #endif + #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" MUSL_DYNAMIC_LINKER_E ".so.1" ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E ".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) + + #undef DEFAULT_ASM_ENDIAN + #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) +--- a/gcc/config/rs6000/secureplt.h ++++ b/gcc/config/rs6000/secureplt.h +@@ -18,3 +18,4 @@ along with GCC; see the file COPYING3. + . */ + + #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt" ++#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt" +--- a/gcc/config/rs6000/sysv4.h ++++ b/gcc/config/rs6000/sysv4.h +@@ -537,6 +537,9 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF + #ifndef CC1_SECURE_PLT_DEFAULT_SPEC + #define CC1_SECURE_PLT_DEFAULT_SPEC "" + #endif ++#ifndef LINK_SECURE_PLT_DEFAULT_SPEC ++#define LINK_SECURE_PLT_DEFAULT_SPEC "" ++#endif + + /* Pass -G xxx to the compiler. */ + #undef CC1_SPEC +@@ -574,7 +577,8 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF + %{R*} \ + %(link_shlib) \ + %{!T*: %(link_start) } \ +-%(link_os)" ++%(link_os)" \ ++"%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}" + + /* Shared libraries are not default. */ + #define LINK_SHLIB_SPEC "\ +@@ -757,17 +761,22 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF + + #define LINK_START_LINUX_SPEC "" + ++#define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","") ++ + #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" MUSL_DYNAMIC_LINKER_E ".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} \ +@@ -889,6 +898,7 @@ ncrtn.o%s" + { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ + { "link_os_default", LINK_OS_DEFAULT_SPEC }, \ + { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \ ++ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \ + { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ + { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ + { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ +@@ -943,3 +953,72 @@ ncrtn.o%s" + /* This target uses the sysv4.opt file. */ + #define TARGET_USES_SYSV4_OPT 1 + ++/* Include order changes for musl, same as in generic linux.h. */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#define INCLUDE_DEFAULTS_MUSL_GPP \ ++ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ ++ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ ++ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, ++ ++#ifdef LOCAL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_LOCAL \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_LOCAL ++#endif ++ ++#ifdef PREFIX_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_PREFIX ++#endif ++ ++#ifdef CROSS_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_CROSS \ ++ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#ifdef TOOL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_TOOL \ ++ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_TOOL ++#endif ++ ++#ifdef NATIVE_SYSTEM_HEADER_DIR ++#define INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_NATIVE ++#endif ++ ++#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) ++# undef INCLUDE_DEFAULTS_MUSL_LOCAL ++# define INCLUDE_DEFAULTS_MUSL_LOCAL ++# undef INCLUDE_DEFAULTS_MUSL_NATIVE ++# define INCLUDE_DEFAULTS_MUSL_NATIVE ++#else ++# undef INCLUDE_DEFAULTS_MUSL_CROSS ++# define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#undef INCLUDE_DEFAULTS ++#define INCLUDE_DEFAULTS \ ++ { \ ++ INCLUDE_DEFAULTS_MUSL_GPP \ ++ INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ INCLUDE_DEFAULTS_MUSL_CROSS \ ++ INCLUDE_DEFAULTS_MUSL_TOOL \ ++ INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ ++ { 0, 0, 0, 0, 0, 0 } \ ++ } ++#endif +--- a/gcc/config/rs6000/sysv4le.h ++++ b/gcc/config/rs6000/sysv4le.h +@@ -31,3 +31,5 @@ + /* Little-endian PowerPC64 Linux uses the ELF v2 ABI by default. */ + #define LINUX64_DEFAULT_ABI_ELFv2 + ++#undef MUSL_DYNAMIC_LINKER_E ++#define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","le") +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -2416,6 +2416,10 @@ powerpc*-*-linux*) + powerpc*-*-linux*paired*) + tm_file="${tm_file} rs6000/750cl.h" ;; + esac ++ case ${target} in ++ *-linux*-musl*) ++ enable_secureplt=yes ;; ++ esac + if test x${enable_secureplt} = xyes; then + tm_file="rs6000/secureplt.h ${tm_file}" + fi diff --git a/devel/gcc/patches/204-musl_sh.patch b/devel/gcc/patches/204-musl_sh.patch new file mode 100644 index 00000000..8c3753d5 --- /dev/null +++ b/devel/gcc/patches/204-musl_sh.patch @@ -0,0 +1,39 @@ +gcc/Changelog: + +2015-04-27 Gregor Richards + Szabolcs Nagy + + * config/sh/linux.h (MUSL_DYNAMIC_LINKER): Define. + (MUSL_DYNAMIC_LINKER_E, MUSL_DYNAMIC_LINKER_FP): Define. + +--- a/gcc/config/sh/linux.h ++++ b/gcc/config/sh/linux.h +@@ -43,6 +43,28 @@ along with GCC; see the file COPYING3. + + #define TARGET_ASM_FILE_END file_end_indicate_exec_stack + ++#if TARGET_ENDIAN_DEFAULT == MASK_LITTLE_ENDIAN ++#define MUSL_DYNAMIC_LINKER_E "%{mb:eb}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{!ml:eb}" ++#endif ++ ++#if TARGET_CPU_DEFAULT & ( MASK_HARD_SH2A_DOUBLE | MASK_SH4 ) ++/* "-nofpu" if any nofpu option is specified */ ++#define MUSL_DYNAMIC_LINKER_FP \ ++ "%{m1|m2|m2a-nofpu|m3|m4-nofpu|m4-100-nofpu|m4-200-nofpu|m4-300-nofpu|" \ ++ "m4-340|m4-400|m4-500|m4al|m5-32media-nofpu|m5-64media-nofpu|" \ ++ "m5-compact-nofpu:-nofpu}" ++#else ++/* "-nofpu" if none of the hard fpu options are specified */ ++#define MUSL_DYNAMIC_LINKER_FP \ ++ "%{m2a|m4|m4-100|m4-200|m4-300|m4a|m5-32media|m5-64media|m5-compact:;:-nofpu}" ++#endif ++ ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER \ ++ "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP ".so.1" ++ + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + + #undef SUBTARGET_LINK_EMUL_SUFFIX diff --git a/devel/gcc/patches/205-musl_x86.patch b/devel/gcc/patches/205-musl_x86.patch new file mode 100644 index 00000000..8772328d --- /dev/null +++ b/devel/gcc/patches/205-musl_x86.patch @@ -0,0 +1,41 @@ +From: ktkachov +Date: Fri, 15 May 2015 13:20:01 +0000 (+0000) +Subject: [PATCH 9/13] x86 musl support +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=5551c8d927c17f60837f15f8dfe46f945ba3fa9c + +[PATCH 9/13] x86 musl support + +On behalf of Szabolcs Nagy. + +2015-05-15 Gregor Richards + + * config/i386/linux.h (MUSL_DYNAMIC_LINKER): Define. + * config/i386/linux64.h (MUSL_DYNAMIC_LINKER32): Define. + (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32): Define. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223218 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/gcc/config/i386/linux.h ++++ b/gcc/config/i386/linux.h +@@ -21,3 +21,6 @@ along with GCC; see the file COPYING3. + + #define GNU_USER_LINK_EMULATION "elf_i386" + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++ ++#undef MUSL_DYNAMIC_LINKER ++#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,10 @@ 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" ++ ++#undef MUSL_DYNAMIC_LINKER32 ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" ++#undef MUSL_DYNAMIC_LINKER64 ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" ++#undef MUSL_DYNAMIC_LINKERX32 ++#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" diff --git a/devel/gcc/patches/206-musl_aarch64.patch b/devel/gcc/patches/206-musl_aarch64.patch new file mode 100644 index 00000000..6925a026 --- /dev/null +++ b/devel/gcc/patches/206-musl_aarch64.patch @@ -0,0 +1,31 @@ +From: jgreenhalgh +Date: Wed, 27 May 2015 16:46:39 +0000 (+0000) +Subject: [PATCH 3/13] aarch64 musl support +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=b3ff21cf0531be91bc3fb8200296a7633090ec78 + +[PATCH 3/13] aarch64 musl support + +gcc/Changelog: + +2015-05-27 Gregor Richards + Szabolcs Nagy + + * config/aarch64/aarch64-linux.h (MUSL_DYNAMIC_LINKER): Define. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223766 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -23,6 +23,9 @@ + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" + ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" ++ + #undef ASAN_CC1_SPEC + #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" + diff --git a/devel/gcc/patches/207-musl_fixincludes.patch b/devel/gcc/patches/207-musl_fixincludes.patch new file mode 100644 index 00000000..0ff33d39 --- /dev/null +++ b/devel/gcc/patches/207-musl_fixincludes.patch @@ -0,0 +1,30 @@ +From: ktkachov +Date: Wed, 22 Apr 2015 14:18:16 +0000 (+0000) +Subject: fixincludes update for musl support +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2dc727de2e87c2756a514cbb43cea23c99deaa3d + +fixincludes update for musl support + +On behalf of Szabolcs.Nagy@arm.com + +2015-04-22 Gregor Richards + + * mkfixinc.sh: Add *-musl* with no fixes. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222327 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/fixincludes/mkfixinc.sh ++++ b/fixincludes/mkfixinc.sh +@@ -19,7 +19,8 @@ case $machine in + powerpc-*-eabi* | \ + powerpc-*-rtems* | \ + powerpcle-*-eabisim* | \ +- powerpcle-*-eabi* ) ++ powerpcle-*-eabi* | \ ++ *-musl* ) + # IF there is no include fixing, + # THEN create a no-op fixer and exit + (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} diff --git a/devel/gcc/patches/209-musl_libstdc++.patch b/devel/gcc/patches/209-musl_libstdc++.patch new file mode 100644 index 00000000..d2414d02 --- /dev/null +++ b/devel/gcc/patches/209-musl_libstdc++.patch @@ -0,0 +1,72 @@ +From: ktkachov +Date: Wed, 22 Apr 2015 14:24:11 +0000 (+0000) +Subject: libstdc++, libgfortran gthr workaround for musl +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=1e5f711c11cb80ce609db9e9c1d8b2da0f7b5b61 + +libstdc++, libgfortran gthr workaround for musl + +On behalf of szabolcs.nagy@arm.com + +[libstdc++-v3/] +2015-04-22 Szabolcs Nagy + + * config/os/generic/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK): Define. + * configure.host (os_include_dir): Set to "os/generic" for linux-musl*. + +[libgfortran/] +2015-04-22 Szabolcs Nagy + + * acinclude.m4 (GTHREAD_USE_WEAK): Define as 0 for *-*-musl*. + * configure: Regenerate. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222329 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/libgfortran/acinclude.m4 ++++ b/libgfortran/acinclude.m4 +@@ -100,7 +100,7 @@ void foo (void); + [Define to 1 if the target supports #pragma weak]) + fi + case "$host" in +- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) ++ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) + AC_DEFINE(GTHREAD_USE_WEAK, 0, + [Define to 0 if the target shouldn't use #pragma weak]) + ;; +--- a/libgfortran/configure ++++ b/libgfortran/configure +@@ -26456,7 +26456,7 @@ $as_echo "#define SUPPORTS_WEAK 1" >>con + + fi + case "$host" in +- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) ++ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) + + $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h + +--- a/libstdc++-v3/config/os/generic/os_defines.h ++++ b/libstdc++-v3/config/os/generic/os_defines.h +@@ -33,4 +33,9 @@ + // System-specific #define, typedefs, corrections, etc, go here. This + // file will come before all others. + ++// Disable the weak reference logic in gthr.h for os/generic because it ++// is broken on every platform unless there is implementation specific ++// workaround in gthr-posix.h and at link-time for static linking. ++#define _GLIBCXX_GTHREAD_USE_WEAK 0 ++ + #endif +--- a/libstdc++-v3/configure.host ++++ b/libstdc++-v3/configure.host +@@ -273,6 +273,9 @@ case "${host_os}" in + freebsd*) + os_include_dir="os/bsd/freebsd" + ;; ++ linux-musl*) ++ os_include_dir="os/generic" ++ ;; + gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) + if [ "$uclibc" = "yes" ]; then + os_include_dir="os/uclibc" diff --git a/devel/gcc/patches/230-musl_libssp.patch b/devel/gcc/patches/230-musl_libssp.patch new file mode 100644 index 00000000..30f42e9f --- /dev/null +++ b/devel/gcc/patches/230-musl_libssp.patch @@ -0,0 +1,13 @@ +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -727,7 +727,9 @@ proper position among the other output f + #endif + + #ifndef LINK_SSP_SPEC +-#ifdef TARGET_LIBC_PROVIDES_SSP ++#if DEFAULT_LIBC == LIBC_MUSL ++#define LINK_SSP_SPEC "-lssp_nonshared" ++#elif defined(TARGET_LIBC_PROVIDES_SSP) + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ + "|fstack-protector-strong|fstack-protector-explicit:}" + #else diff --git a/devel/gcc/patches/240-musl-libitm-fixes.patch b/devel/gcc/patches/240-musl-libitm-fixes.patch new file mode 100644 index 00000000..533cb684 --- /dev/null +++ b/devel/gcc/patches/240-musl-libitm-fixes.patch @@ -0,0 +1,61 @@ +From: ktkachov +Date: Wed, 22 Apr 2015 14:11:25 +0000 (+0000) +Subject: libitm fixes for musl support +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=e53a4d49c3d03ab8eaddb073cf972c1c46d75338 + +libitm fixes for musl support + +On behalf of Szabolcs.Nagy@arm.com + +2015-04-22 Gregor Richards + + * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h. + * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222325 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/libitm/config/arm/hwcap.cc ++++ b/libitm/config/arm/hwcap.cc +@@ -40,7 +40,7 @@ int GTM_hwcap HIDDEN = 0 + + #ifdef __linux__ + #include +-#include ++#include + #include + + 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 diff --git a/devel/gcc/patches/250-add-musl.patch b/devel/gcc/patches/250-add-musl.patch new file mode 100644 index 00000000..8cbeddea --- /dev/null +++ b/devel/gcc/patches/250-add-musl.patch @@ -0,0 +1,120 @@ +From: ktkachov +Date: Fri, 8 May 2015 08:30:40 +0000 (+0000) +Subject: [PATCH 0/13] Add musl support to GCC +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=f2d678afa5b8385d763b93772d73d6bf80a9739e + +[PATCH 0/13] Add musl support to GCC + +2015-05-08 Szabolcs Nagy + + * config/glibc-stdint.h (OPTION_MUSL): Define. + (INT_FAST16_TYPE, INT_FAST32_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE): + Change the definition based on OPTION_MUSL for 64 bit targets. + * config/linux.h (OPTION_MUSL): Redefine. + * config/alpha/linux.h (OPTION_MUSL): Redefine. + * config/rs6000/linux.h (OPTION_MUSL): Redefine. + * config/rs6000/linux64.h (OPTION_MUSL): Redefine. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222905 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/gcc/config/alpha/linux.h ++++ b/gcc/config/alpha/linux.h +@@ -61,10 +61,14 @@ along with GCC; see the file COPYING3. + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#undef OPTION_MUSL ++#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) ++#undef OPTION_MUSL ++#define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + + /* Determine what functions are present at the runtime; +--- a/gcc/config/glibc-stdint.h ++++ b/gcc/config/glibc-stdint.h +@@ -22,6 +22,12 @@ a copy of the GCC Runtime Library Except + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + ++/* Systems using musl libc should use this header and make sure ++ OPTION_MUSL is defined correctly before using the TYPE macros. */ ++#ifndef OPTION_MUSL ++#define OPTION_MUSL 0 ++#endif ++ + #define SIG_ATOMIC_TYPE "int" + + #define INT8_TYPE "signed char" +@@ -43,12 +49,12 @@ see the files COPYING3 and COPYING.RUNTI + #define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") + + #define INT_FAST8_TYPE "signed char" +-#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") +-#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") ++#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int") ++#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int") + #define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int") + #define UINT_FAST8_TYPE "unsigned char" +-#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int") +-#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int") ++#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int") ++#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int") + #define UINT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") + + #define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -32,11 +32,13 @@ 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) ++#undef OPTION_MUSL + #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) ++#undef OPTION_MUSL + #define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + +--- a/gcc/config/rs6000/linux.h ++++ b/gcc/config/rs6000/linux.h +@@ -30,10 +30,14 @@ + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#undef OPTION_MUSL ++#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) ++#undef OPTION_MUSL ++#define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + + /* Determine what functions are present at the runtime; +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -299,10 +299,14 @@ extern int dot_symbols; + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#undef OPTION_MUSL ++#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) ++#undef OPTION_MUSL ++#define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + + /* Determine what functions are present at the runtime; diff --git a/devel/gcc/patches/260-musl-add-unwind-fix.patch b/devel/gcc/patches/260-musl-add-unwind-fix.patch new file mode 100644 index 00000000..a3b83e20 --- /dev/null +++ b/devel/gcc/patches/260-musl-add-unwind-fix.patch @@ -0,0 +1,34 @@ +From: ktkachov +Date: Wed, 22 Apr 2015 14:20:01 +0000 (+0000) +Subject: unwind fix for musl +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a2e31d0681d8a47389b8a3552622fbd9827bcef4 + +unwind fix for musl + +On behalf of szabolcs.nagy@arm.com + +2015-04-22 Gregor Richards + Szabolcs Nagy + + * unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME): Define it on + Linux if target provides dl_iterate_phdr. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222328 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +--- a/libgcc/unwind-dw2-fde-dip.c ++++ b/libgcc/unwind-dw2-fde-dip.c +@@ -59,6 +59,12 @@ + + #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ + && defined(TARGET_DL_ITERATE_PHDR) \ ++ && defined(__linux__) ++# define USE_PT_GNU_EH_FRAME ++#endif ++ ++#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ ++ && defined(TARGET_DL_ITERATE_PHDR) \ + && (defined(__DragonFly__) || defined(__FreeBSD__)) + # define ElfW __ElfN + # define USE_PT_GNU_EH_FRAME diff --git a/devel/gcc/patches/270-musl-add-powerpc-softfloat-fix.patch b/devel/gcc/patches/270-musl-add-powerpc-softfloat-fix.patch new file mode 100644 index 00000000..bdebf6c0 --- /dev/null +++ b/devel/gcc/patches/270-musl-add-powerpc-softfloat-fix.patch @@ -0,0 +1,24 @@ +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -369,8 +369,8 @@ extern int dot_symbols; + #endif + #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" MUSL_DYNAMIC_LINKER_E ".so.1" +-#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E ".so.1" ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC + #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" + #elif DEFAULT_LIBC == LIBC_GLIBC +--- a/gcc/config/rs6000/sysv4.h ++++ b/gcc/config/rs6000/sysv4.h +@@ -765,7 +765,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF + + #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" MUSL_DYNAMIC_LINKER_E ".so.1" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC + #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" + #elif DEFAULT_LIBC == LIBC_MUSL diff --git a/devel/gcc/patches/300-mips_Os_cpu_rtx_cost_model.patch b/devel/gcc/patches/300-mips_Os_cpu_rtx_cost_model.patch new file mode 100644 index 00000000..1743658a --- /dev/null +++ b/devel/gcc/patches/300-mips_Os_cpu_rtx_cost_model.patch @@ -0,0 +1,14 @@ +Use the proper rtx cost model for the selected CPU, even when optimizing +for size. This generates better code. + +--- a/gcc/config/mips/mips.c ++++ b/gcc/config/mips/mips.c +@@ -17483,7 +17483,7 @@ mips_option_override (void) + flag_pcc_struct_return = 0; + + /* Decide which rtx_costs structure to use. */ +- if (optimize_size) ++ if (0 && optimize_size) + mips_cost = &mips_rtx_cost_optimize_size; + else + mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/devel/gcc/patches/800-arm_v5te_no_ldrd_strd.patch b/devel/gcc/patches/800-arm_v5te_no_ldrd_strd.patch new file mode 100644 index 00000000..0edeb13c --- /dev/null +++ b/devel/gcc/patches/800-arm_v5te_no_ldrd_strd.patch @@ -0,0 +1,11 @@ +--- a/gcc/config/arm/arm.h ++++ b/gcc/config/arm/arm.h +@@ -285,7 +285,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) + + #define TARGET_CRC32 (arm_arch_crc) diff --git a/devel/gcc/patches/810-arm-softfloat-libgcc.patch b/devel/gcc/patches/810-arm-softfloat-libgcc.patch new file mode 100644 index 00000000..1d06f5b2 --- /dev/null +++ b/devel/gcc/patches/810-arm-softfloat-libgcc.patch @@ -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 +@@ -60,8 +60,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*} \ diff --git a/devel/gcc/patches/820-libgcc_pic.patch b/devel/gcc/patches/820-libgcc_pic.patch new file mode 100644 index 00000000..42bf0c8c --- /dev/null +++ b/devel/gcc/patches/820-libgcc_pic.patch @@ -0,0 +1,36 @@ +--- a/libgcc/Makefile.in ++++ b/libgcc/Makefile.in +@@ -887,11 +887,12 @@ $(libgcov-driver-objects): %$(objext): $ + + # 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)"; \ +@@ -913,7 +914,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 +@@ -1108,6 +1109,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)))) diff --git a/devel/gcc/patches/830-arm_unbreak_armv4t.patch b/devel/gcc/patches/830-arm_unbreak_armv4t.patch new file mode 100644 index 00000000..37f8f2a5 --- /dev/null +++ b/devel/gcc/patches/830-arm_unbreak_armv4t.patch @@ -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. */ diff --git a/devel/gcc/patches/840-armv4_pass_fix-v4bx_to_ld.patch b/devel/gcc/patches/840-armv4_pass_fix-v4bx_to_ld.patch new file mode 100644 index 00000000..cb1fb982 --- /dev/null +++ b/devel/gcc/patches/840-armv4_pass_fix-v4bx_to_ld.patch @@ -0,0 +1,19 @@ +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -94,10 +94,15 @@ + #define MUSL_DYNAMIC_LINKER \ + "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.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 EABI_LINK_SPEC \ ++#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ + LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ + LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) + diff --git a/devel/gcc/patches/850-use_shared_libgcc.patch b/devel/gcc/patches/850-use_shared_libgcc.patch new file mode 100644 index 00000000..5818cf4d --- /dev/null +++ b/devel/gcc/patches/850-use_shared_libgcc.patch @@ -0,0 +1,47 @@ +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -131,10 +131,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 +@@ -53,6 +53,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 or musl is the default C library and whether + -muclibc or -mglibc or -mbionic or -mmusl has been passed to change +--- 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 +@@ -60,6 +60,9 @@ + #undef CPP_OS_DEFAULT_SPEC + #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" + ++#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}}" + diff --git a/devel/gcc/patches/851-libgcc_no_compat.patch b/devel/gcc/patches/851-libgcc_no_compat.patch new file mode 100644 index 00000000..80c34768 --- /dev/null +++ b/devel/gcc/patches/851-libgcc_no_compat.patch @@ -0,0 +1,12 @@ +--- a/libgcc/config/t-libunwind ++++ b/libgcc/config/t-libunwind +@@ -2,8 +2,7 @@ + + HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER + +-LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ +- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c ++LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c + LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c + + # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/devel/gcc/patches/870-ppc_no_crtsavres.patch b/devel/gcc/patches/870-ppc_no_crtsavres.patch new file mode 100644 index 00000000..0e64a416 --- /dev/null +++ b/devel/gcc/patches/870-ppc_no_crtsavres.patch @@ -0,0 +1,11 @@ +--- a/gcc/config/rs6000/rs6000.c ++++ b/gcc/config/rs6000/rs6000.c +@@ -21500,7 +21500,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; diff --git a/devel/gcc/patches/880-no_java_section.patch b/devel/gcc/patches/880-no_java_section.patch new file mode 100644 index 00000000..def6c9f4 --- /dev/null +++ b/devel/gcc/patches/880-no_java_section.patch @@ -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 diff --git a/devel/gcc/patches/900-bad-mips16-crt.patch b/devel/gcc/patches/900-bad-mips16-crt.patch new file mode 100644 index 00000000..dd6e9dc8 --- /dev/null +++ b/devel/gcc/patches/900-bad-mips16-crt.patch @@ -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 diff --git a/devel/gcc/patches/910-mbsd_multi.patch b/devel/gcc/patches/910-mbsd_multi.patch new file mode 100644 index 00000000..32fc9da9 --- /dev/null +++ b/devel/gcc/patches/910-mbsd_multi.patch @@ -0,0 +1,222 @@ + + 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. + + This patch was authored by Thorsten Glaser + with copyright assignment to the FSF in effect. + +--- a/gcc/c-family/c-opts.c ++++ b/gcc/c-family/c-opts.c +@@ -122,6 +122,9 @@ static int class_dump_flags; + /* 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); +@@ -449,6 +452,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; +@@ -1034,6 +1043,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 +@@ -431,6 +431,10 @@ Wfloat-conversion + C ObjC C++ ObjC++ Var(warn_float_conversion) LangEnabledBy(C ObjC C++ ObjC++,Wconversion) + Warn for implicit type conversions that cause loss of floating point precision + ++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 +@@ -1161,6 +1165,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 +@@ -561,6 +561,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 +@@ -1360,6 +1364,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 +@@ -1699,6 +1699,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 +@@ -251,7 +251,7 @@ Objective-C and Objective-C++ Dialects}. + -Wdisabled-optimization @gol + -Wno-discarded-qualifiers -Wno-discarded-array-qualifiers @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-signedness -Wformat-y2k @gol +@@ -5382,6 +5382,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 +@@ -7860,7 +7876,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 +@@ -629,6 +629,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) + { diff --git a/devel/gcc/patches/920-specs_nonfatal_getenv.patch b/devel/gcc/patches/920-specs_nonfatal_getenv.patch new file mode 100644 index 00000000..3d708f24 --- /dev/null +++ b/devel/gcc/patches/920-specs_nonfatal_getenv.patch @@ -0,0 +1,15 @@ +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -8807,8 +8807,10 @@ getenv_spec_function (int argc, const ch + + value = getenv (argv[0]); + if (!value) +- fatal_error (input_location, +- "environment variable %qs not defined", argv[0]); ++ { ++ warning (input_location, "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 diff --git a/devel/gcc/patches/930-fix-mips-noexecstack.patch b/devel/gcc/patches/930-fix-mips-noexecstack.patch new file mode 100644 index 00000000..c05844d2 --- /dev/null +++ b/devel/gcc/patches/930-fix-mips-noexecstack.patch @@ -0,0 +1,111 @@ +From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 +From: Andrew McDonnell +Date: Fri, 3 Oct 2014 19:09:00 +0930 +Subject: Add .note.GNU-stack section + +See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html +Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html + +Re: [Patch, MIPS] Add .note.GNU-stack section + + From: Steve Ellcey + +On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: +> +> +> On Wed, Sep 10, 2014 at 9:27 AM, wrote: + +> This works except you did not update the assembly files in +> libgcc or glibc. We (Cavium) have the same patch in our tree +> for a few released versions. + +> Mind just checking yours in then Andrew? + +> Thanks! +> -eric + +I talked to Andrew about what files he changed in GCC and created and +tested this new patch. Andrew also mentioned changing some assembly +files in glibc but I don't see any use of '.section .note.GNU-stack' in +any assembly files in glibc (for any platform) so I wasn't planning on +creating a glibc to add them to mips glibc assembly language files. + +OK to check in this patch? + +Steve Ellcey +sellcey@mips.com + + + +2014-09-26 Steve Ellcey +--- + gcc/config/mips/mips.c | 3 +++ + libgcc/config/mips/crti.S | 4 ++++ + libgcc/config/mips/crtn.S | 3 +++ + libgcc/config/mips/mips16.S | 4 ++++ + libgcc/config/mips/vr4120-div.S | 4 ++++ + 5 files changed, 18 insertions(+) + +--- a/gcc/config/mips/mips.c ++++ b/gcc/config/mips/mips.c +@@ -19629,6 +19629,9 @@ mips_lra_p (void) + #undef TARGET_LRA_P + #define TARGET_LRA_P mips_lra_p + ++#undef TARGET_ASM_FILE_END ++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack ++ + struct gcc_target targetm = TARGET_INITIALIZER; + + #include "gt-mips.h" +--- a/libgcc/config/mips/crti.S ++++ b/libgcc/config/mips/crti.S +@@ -21,6 +21,10 @@ a copy of the GCC Runtime Library Except + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + ++ ++/* An executable stack is *not* required for these functions. */ ++ .section .note.GNU-stack,"",%progbits ++ + /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. + Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ + +--- a/libgcc/config/mips/crtn.S ++++ b/libgcc/config/mips/crtn.S +@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Except + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + ++/* An executable stack is *not* required for these functions. */ ++ .section .note.GNU-stack,"",%progbits ++ + /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. + Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ + +--- a/libgcc/config/mips/mips16.S ++++ b/libgcc/config/mips/mips16.S +@@ -48,6 +48,10 @@ see the files COPYING3 and COPYING.RUNTI + values using the soft-float calling convention, but do the actual + operation using the hard floating point instructions. */ + ++/* An executable stack is *not* required for these functions. */ ++ .section .note.GNU-stack,"",%progbits ++ .previous ++ + #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) + + /* This file contains 32-bit assembly code. */ +--- a/libgcc/config/mips/vr4120-div.S ++++ b/libgcc/config/mips/vr4120-div.S +@@ -26,6 +26,10 @@ see the files COPYING3 and COPYING.RUNTI + -mfix-vr4120. div and ddiv do not give the correct result when one + of the operands is negative. */ + ++/* An executable stack is *not* required for these functions. */ ++ .section .note.GNU-stack,"",%progbits ++ .previous ++ + .set nomips16 + + #define DIV \ diff --git a/devel/gcc/patches/930-osdefines.patch b/devel/gcc/patches/930-osdefines.patch new file mode 100644 index 00000000..a1b61204 --- /dev/null +++ b/devel/gcc/patches/930-osdefines.patch @@ -0,0 +1,13 @@ +--- a/libstdc++-v3/config/os/gnu-linux/os_defines.h 2015-01-05 06:33:28.000000000 -0600 ++++ b/libstdc++-v3/config/os/gnu-linux/os_defines.h 2016-04-15 12:32:49.374356001 -0500 +@@ -41,8 +41,8 @@ + // Provide a declaration for the possibly deprecated gets function, as + // glibc 2.15 and later does not declare gets for ISO C11 when + // __GNU_SOURCE is defined. +-#if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE) ++//#if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE) + # undef _GLIBCXX_HAVE_GETS +-#endif ++//#endif + + #endif diff --git a/devel/gcc/patches/940-no-clobber-stamp-bits.patch b/devel/gcc/patches/940-no-clobber-stamp-bits.patch new file mode 100644 index 00000000..0b21ffaf --- /dev/null +++ b/devel/gcc/patches/940-no-clobber-stamp-bits.patch @@ -0,0 +1,11 @@ +--- a/libstdc++-v3/include/Makefile.in ++++ b/libstdc++-v3/include/Makefile.in +@@ -1421,7 +1421,7 @@ stamp-bits: ${bits_headers} + @$(STAMP) stamp-bits + + stamp-bits-sup: stamp-bits ${bits_sup_headers} +- @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null ++ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null + @$(STAMP) stamp-bits-sup + + stamp-c_base: ${c_base_headers} diff --git a/devel/gcc/patches/950-cpp_file_path_translation.patch b/devel/gcc/patches/950-cpp_file_path_translation.patch new file mode 100644 index 00000000..dc0938ab --- /dev/null +++ b/devel/gcc/patches/950-cpp_file_path_translation.patch @@ -0,0 +1,182 @@ +Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047 + +--- a/gcc/c-family/c-opts.c ++++ b/gcc/c-family/c-opts.c +@@ -581,6 +581,10 @@ c_common_handle_option (size_t scode, co + add_path (xstrdup (arg), SYSTEM, 0, true); + break; + ++ case OPT_iremap: ++ add_cpp_remap_path (arg); ++ break; ++ + case OPT_iwithprefix: + add_prefixed_path (arg, SYSTEM); + break; +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -1528,6 +1528,10 @@ iquote + C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) + -iquote Add to the end of the quote include path + ++iremap ++C ObjC C++ ObjC++ Joined Separate ++-iremap Convert to if it occurs as prefix in __FILE__. ++ + iwithprefix + C ObjC C++ ObjC++ Joined Separate + -iwithprefix Add to the end of the system include path +--- a/gcc/doc/cpp.texi ++++ b/gcc/doc/cpp.texi +@@ -4441,6 +4441,7 @@ without notice. + @c man begin SYNOPSIS + cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}] + [@option{-I}@var{dir}@dots{}] [@option{-iquote}@var{dir}@dots{}] ++ [@option{-iremap}@var{src}:@var{dst}] + [@option{-W}@var{warn}@dots{}] + [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}] + [@option{-MP}] [@option{-MQ} @var{target}@dots{}] +--- a/gcc/doc/cppopts.texi ++++ b/gcc/doc/cppopts.texi +@@ -532,6 +532,12 @@ Search @var{dir} only for header files r + If @var{dir} begins with @code{=}, then the @code{=} will be replaced + by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}. + ++@item -iremap @var{src}:@var{dst} ++@opindex iremap ++Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. ++This option can be specified more than once. Processing stops at the first ++match. ++ + @item -fdirectives-only + @opindex fdirectives-only + When preprocessing, handle directives, but do not expand macros. +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -494,8 +494,8 @@ Objective-C and Objective-C++ Dialects}. + @item Directory Options + @xref{Directory Options,,Options for Directory Search}. + @gccoptlist{-B@var{prefix} -I@var{dir} -iplugindir=@var{dir} @gol +--iquote@var{dir} -L@var{dir} -specs=@var{file} -I- @gol +---sysroot=@var{dir} --no-sysroot-suffix} ++-iquote@var{dir} -iremap@var{src}:@var{dst} -L@var{dir} -specs=@var{file} @gol ++-I- --sysroot=@var{dir} --no-sysroot-suffix} + + @item Machine Dependent Options + @xref{Submodel Options,,Hardware Models and Configurations}. +@@ -11479,6 +11479,12 @@ be searched for header files only for th + "@var{file}"}; they are not searched for @code{#include <@var{file}>}, + otherwise just like @option{-I}. + ++@item -iremap @var{src}:@var{dst} ++@opindex iremap ++Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. ++This option can be specified more than once. Processing stops at the first ++match. ++ + @item -L@var{dir} + @opindex L + Add directory @var{dir} to the list of directories to be searched +--- a/libcpp/include/cpplib.h ++++ b/libcpp/include/cpplib.h +@@ -751,6 +751,9 @@ extern void cpp_set_lang (cpp_reader *, + /* Set the include paths. */ + extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int); + ++/* Provide src:dst pair for __FILE__ remapping. */ ++extern void add_cpp_remap_path (const char *); ++ + /* Call these to get pointers to the options, callback, and deps + structures for a given reader. These pointers are good until you + call cpp_finish on that reader. You can either edit the callbacks +--- a/libcpp/macro.c ++++ b/libcpp/macro.c +@@ -224,6 +224,64 @@ static const char * const monthnames[] = + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" + }; + ++static size_t remap_pairs; ++static char **remap_src; ++static char **remap_dst; ++ ++void ++add_cpp_remap_path (const char *arg) ++{ ++ const char *arg_dst; ++ size_t len; ++ ++ arg_dst = strchr(arg, ':'); ++ if (arg_dst == NULL) ++ { ++ fprintf(stderr, "Invalid argument for -iremap\n"); ++ exit(1); ++ } ++ ++ len = arg_dst - arg; ++ ++arg_dst; ++ ++ remap_src = (char **) xrealloc(remap_src, sizeof(char *) * (remap_pairs + 1)); ++ remap_dst = (char **) xrealloc(remap_dst, sizeof(char *) * (remap_pairs + 1)); ++ ++ remap_src[remap_pairs] = (char *) xmalloc(len + 1); ++ memcpy(remap_src[remap_pairs], arg, len); ++ remap_src[remap_pairs][len] = '\0'; ++ remap_dst[remap_pairs] = xstrdup(arg_dst); ++ ++remap_pairs; ++} ++ ++static const char * ++cpp_remap_file (const char *arg, char **tmp_name) ++{ ++ char *result; ++ size_t i, len; ++ ++ for (i = 0; i < remap_pairs; ++i) ++ { ++ len = strlen (remap_src[i]); ++ if (strncmp (remap_src[i], arg, len)) ++ continue; ++ if (arg[len] == '\0') ++ return xstrdup (remap_dst[i]); ++ if (arg[len] != '/') ++ continue; ++ arg += len; ++ len = strlen (remap_dst[i]); ++ result = (char *) xmalloc (len + strlen (arg) + 1); ++ memcpy(result, remap_dst[i], len); ++ strcpy(result + len, arg); ++ *tmp_name = result; ++ ++ return result; ++ } ++ ++ return arg; ++} ++ + /* Helper function for builtin_macro. Returns the text generated by + a builtin macro. */ + const uchar * +@@ -286,6 +344,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi + { + unsigned int len; + const char *name; ++ char *tmp_name = NULL; + uchar *buf; + + if (node->value.builtin == BT_FILE) +@@ -297,6 +356,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi + if (!name) + abort (); + } ++ name = cpp_remap_file (name, &tmp_name); + len = strlen (name); + buf = _cpp_unaligned_alloc (pfile, len * 2 + 3); + result = buf; +@@ -304,6 +364,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi + buf = cpp_quote_string (buf + 1, (const unsigned char *) name, len); + *buf++ = '"'; + *buf = '\0'; ++ free (tmp_name); + } + break; + diff --git a/devel/gcc/patches/960-go_libm.patch b/devel/gcc/patches/960-go_libm.patch new file mode 100644 index 00000000..d16b0200 --- /dev/null +++ b/devel/gcc/patches/960-go_libm.patch @@ -0,0 +1,11 @@ +--- a/gcc/go/Make-lang.in ++++ b/gcc/go/Make-lang.in +@@ -74,7 +74,7 @@ go_OBJS = $(GO_OBJS) go/gospec.o + + go1$(exeext): $(GO_OBJS) attribs.o $(BACKEND) $(LIBDEPS) + +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ +- $(GO_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS) ++ $(GO_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS) -lm + + # Documentation. + diff --git a/devel/gcc/patches/970-warn_bug.patch b/devel/gcc/patches/970-warn_bug.patch new file mode 100644 index 00000000..2c5cf9be --- /dev/null +++ b/devel/gcc/patches/970-warn_bug.patch @@ -0,0 +1,11 @@ +--- a/libgo/runtime/mprof.goc ++++ b/libgo/runtime/mprof.goc +@@ -403,7 +403,7 @@ func ThreadCreateProfile(p Slice) (n int + + func Stack(b Slice, all bool) (n int) { + byte *pc, *sp; +- bool enablegc; ++ bool enablegc = false; /* workaround GCC bug #36550 */ + + sp = runtime_getcallersp(&b); + pc = (byte*)(uintptr)runtime_getcallerpc(&b); diff --git a/devel/libtool-bin/Makefile b/devel/libtool-bin/Makefile new file mode 100644 index 00000000..efcee5c6 --- /dev/null +++ b/devel/libtool-bin/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2016 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:=libtool +PKG_VERSION:=2.4.6 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@GNU/libtool +PKG_HASH:=7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f +PKG_MAINTAINER:=Heinrich Schuchardt +PKG_LICENSE:=GPL-2.0+ +PKG_BUILD_DIR = $(BUILD_DIR)/libtool-bin/$(PKG_NAME)-$(PKG_VERSION) + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +CONFIGURE_VARS += GREP=grep SED=sed + +define Package/libtool-bin + SECTION:=devel + CATEGORY:=Development + TITLE:=GNU Libtool - libtoolize + URL:=https://www.gnu.org/software/libtool/ +endef + +define Package/libtool-bin/description + GNU libtool is a generic library support script. + Libtool hides the complexity of using shared libraries behind a consistent, + portable interface. + This package contains the libtoolize executable. +endef + +define Package/libtool-bin/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libtoolize $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/share/aclocal/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \ + $(1)/usr/share/aclocal/ + $(INSTALL_DIR) $(1)/usr/share/libtool/build-aux/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libtool/build-aux/* \ + $(1)/usr/share/libtool/build-aux/ +endef + +$(eval $(call BuildPackage,libtool-bin)) diff --git a/devel/lpc21isp/Makefile b/devel/lpc21isp/Makefile new file mode 100644 index 00000000..daaf05ff --- /dev/null +++ b/devel/lpc21isp/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2016 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:=lpc21isp +PKG_VERSION:=197 +PKG_RELEASE:=2 +PKG_LICENSE:=LGPL-3.0+ +PKG_LICENSE_FILES:=README gpl.txt lgpl-3.0.txt + +PKG_BUILD_DIR:=$(BUILD_DIR)/lpc21isp_$(PKG_VERSION) +PKG_SOURCE:=lpc21isp_$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/lpc21isp +PKG_HASH:=9f7d80382e4b70bfa4200233466f29f73a36fea7dc604e32f05b9aa69ef591dc +PKG_CAT:=zcat + +include $(INCLUDE_DIR)/package.mk + +define Package/lpc21isp + SECTION:=base + CATEGORY:=Development + TITLE:=Command line ISP for NXP LPC family and ADUC70xx + URL:=http://lpc21isp.sourceforge.net/ + MAINTAINER:=Emil 'Skeen' Madsen +endef + +define Package/lpc21isp/description + Portable command line ISP (In-circuit Programmer) for NXP LPC family + and Analog Devices ADUC70xx. +endef + +define Package/lpc21isp/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lpc21isp $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,lpc21isp)) diff --git a/devel/lpc21isp/patches/100-fix-reproducible-builds.patch b/devel/lpc21isp/patches/100-fix-reproducible-builds.patch new file mode 100644 index 00000000..ad079954 --- /dev/null +++ b/devel/lpc21isp/patches/100-fix-reproducible-builds.patch @@ -0,0 +1,13 @@ +Index: lpc21isp_197/lpc21isp.c +=================================================================== +--- lpc21isp_197.orig/lpc21isp.c 2017-12-03 06:01:05.854070061 +0100 ++++ lpc21isp_197/lpc21isp.c 2017-12-03 06:01:23.326431659 +0100 +@@ -1549,7 +1549,7 @@ + DebugPrintf(2, "\n" + "Portable command line ISP\n" + "for NXP LPC family and Analog Devices ADUC 70xx\n" +- "Version " VERSION_STR " compiled for " COMPILED_FOR ": " __DATE__ ", " __TIME__ "\n" ++ "Version " VERSION_STR " compiled for " COMPILED_FOR "\n" + "Copyright (c) by Martin Maurer, 2003-2013, Email: Martin.Maurer@clibb.de\n" + "Portions Copyright (c) by Aeolus Development 2004, www.aeolusdevelopment.com\n" + "\n"); diff --git a/devel/lttng-modules/Makefile b/devel/lttng-modules/Makefile new file mode 100644 index 00000000..c1380865 --- /dev/null +++ b/devel/lttng-modules/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2013-2015 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:=lttng-modules +PKG_VERSION:=2.6.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://lttng.org/files/$(PKG_NAME)/ +PKG_HASH:=0112d0646437163a0065022e5a788d049b690ec3fa99494c4ab6f61ced2a46af + +PKG_LICENSE:=LGPL-2.1 GPL-2.0 MIT +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Nicolas Thill + +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/lttng + SUBMENU:=Other modules + TITLE:=Linux Trace Toolkit: next generation (kernel modules) + URL:=https://lttng.org/ + DEPENDS:= @!TARGET_uml @KERNEL_FTRACE_SYSCALLS + FILES:= \ + $(PKG_BUILD_DIR)/lttng-*.$(LINUX_KMOD_SUFFIX) \ + $(PKG_BUILD_DIR)/lib/lttng-*.$(LINUX_KMOD_SUFFIX) \ + $(PKG_BUILD_DIR)/probes/lttng-*.$(LINUX_KMOD_SUFFIX) +endef + +define Build/Compile + $(MAKE) -C "$(LINUX_DIR)" \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + SUBDIRS="$(PKG_BUILD_DIR)" \ + V="$(V)" \ + modules +endef + +$(eval $(call KernelPackage,lttng)) diff --git a/devel/lttng-modules/patches/001-mm_page_alloc_extfrag.patch b/devel/lttng-modules/patches/001-mm_page_alloc_extfrag.patch new file mode 100644 index 00000000..d8a0c62f --- /dev/null +++ b/devel/lttng-modules/patches/001-mm_page_alloc_extfrag.patch @@ -0,0 +1,10 @@ +--- a/instrumentation/events/lttng-module/kmem.h ++++ b/instrumentation/events/lttng-module/kmem.h +@@ -287,6 +287,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_PRINT(mm + ) + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,2) \ ++ || LTTNG_KERNEL_RANGE(3,18,10, 3,19,0) \ + || LTTNG_KERNEL_RANGE(3,14,36, 3,15,0) \ + || LTTNG_DEBIAN_KERNEL_RANGE(3,16,7,9,0,0, 3,17,0,0,0,0)) + diff --git a/devel/lttng-tools/Makefile b/devel/lttng-tools/Makefile new file mode 100644 index 00000000..dfce72c8 --- /dev/null +++ b/devel/lttng-tools/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2013-2015 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:=lttng-tools +PKG_VERSION:=2.6.0 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://lttng.org/files/$(PKG_NAME)/ +PKG_HASH:=128166445126d76da7d9f42a56dec12716732a1ed697a6cfdf40c9e135384f32 + +PKG_LICENSE:=LGPL-2.1 GPL-2.0 +PKG_LICENSE_FILES:=COPYING +PKG_MAINTAINER:=Nicolas Thill + +PKG_FIXUP:=autoreconf +PKG_USE_MIPS16:=0 +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/lttng-tools + SECTION:=devel + CATEGORY:=Development + TITLE:=Linux Trace Toolkit: next generation (tools) + URL:=https://lttng.org/ + DEPENDS:= +lttng-ust +libpopt +libxml2 +endef + +CONFIGURE_ARGS += --disable-kmod + +TARGET_LDFLAGS += -lurcu-bp + +MAKE_FLAGS += V="$(V)" + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/lttng $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblttng-ctl*.{a,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lttng-ctl.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/lttng-tools/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblttng-ctl*.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lttng $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lttng* $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,lttng-tools)) diff --git a/devel/lttng-tools/patches/100-musl-compat.patch b/devel/lttng-tools/patches/100-musl-compat.patch new file mode 100644 index 00000000..8813f837 --- /dev/null +++ b/devel/lttng-tools/patches/100-musl-compat.patch @@ -0,0 +1,23 @@ +--- a/src/common/compat/poll.h ++++ b/src/common/compat/poll.h +@@ -55,6 +55,10 @@ static inline void __lttng_poll_free(voi + #include + #include + ++#ifndef __GLIBC_PREREQ ++#define __GLIBC_PREREQ(maj, min) (0) ++#endif ++ + /* See man epoll(7) for this define path */ + #define COMPAT_EPOLL_PROC_PATH "/proc/sys/fs/epoll/max_user_watches" + +--- a/src/common/runas.h ++++ b/src/common/runas.h +@@ -21,6 +21,7 @@ + + #include + #include ++#include + + int run_as_mkdir_recursive(const char *path, mode_t mode, uid_t uid, gid_t gid); + int run_as_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid); diff --git a/devel/lttng-tools/patches/200-use-extern.patch b/devel/lttng-tools/patches/200-use-extern.patch new file mode 100644 index 00000000..180c0611 --- /dev/null +++ b/devel/lttng-tools/patches/200-use-extern.patch @@ -0,0 +1,423 @@ +--- a/src/common/mi-lttng.h ++++ b/src/common/mi-lttng.h +@@ -49,133 +49,133 @@ struct mi_lttng_version { + }; + + /* Strings related to command */ +-const char * const mi_lttng_element_command; +-const char * const mi_lttng_element_command_action; +-const char * const mi_lttng_element_command_add_context; +-const char * const mi_lttng_element_command_calibrate; +-const char * const mi_lttng_element_command_create; +-const char * const mi_lttng_element_command_destroy; +-const char * const mi_lttng_element_command_disable_channel; +-const char * const mi_lttng_element_command_disable_event; +-const char * const mi_lttng_element_command_enable_channels; +-const char * const mi_lttng_element_command_enable_event; +-const char * const mi_lttng_element_command_list; +-const char * const mi_lttng_element_command_load; +-const char * const mi_lttng_element_command_name; +-const char * const mi_lttng_element_command_output; +-const char * const mi_lttng_element_command_save; +-const char * const mi_lttng_element_command_set_session; +-const char * const mi_lttng_element_command_snapshot; +-const char * const mi_lttng_element_command_snapshot_add; +-const char * const mi_lttng_element_command_snapshot_del; +-const char * const mi_lttng_element_command_snapshot_list; +-const char * const mi_lttng_element_command_snapshot_record; +-const char * const mi_lttng_element_command_start; +-const char * const mi_lttng_element_command_stop; +-const char * const mi_lttng_element_command_success; +-const char * const mi_lttng_element_command_version; ++extern const char * const mi_lttng_element_command; ++extern const char * const mi_lttng_element_command_action; ++extern const char * const mi_lttng_element_command_add_context; ++extern const char * const mi_lttng_element_command_calibrate; ++extern const char * const mi_lttng_element_command_create; ++extern const char * const mi_lttng_element_command_destroy; ++extern const char * const mi_lttng_element_command_disable_channel; ++extern const char * const mi_lttng_element_command_disable_event; ++extern const char * const mi_lttng_element_command_enable_channels; ++extern const char * const mi_lttng_element_command_enable_event; ++extern const char * const mi_lttng_element_command_list; ++extern const char * const mi_lttng_element_command_load; ++extern const char * const mi_lttng_element_command_name; ++extern const char * const mi_lttng_element_command_output; ++extern const char * const mi_lttng_element_command_save; ++extern const char * const mi_lttng_element_command_set_session; ++extern const char * const mi_lttng_element_command_snapshot; ++extern const char * const mi_lttng_element_command_snapshot_add; ++extern const char * const mi_lttng_element_command_snapshot_del; ++extern const char * const mi_lttng_element_command_snapshot_list; ++extern const char * const mi_lttng_element_command_snapshot_record; ++extern const char * const mi_lttng_element_command_start; ++extern const char * const mi_lttng_element_command_stop; ++extern const char * const mi_lttng_element_command_success; ++extern const char * const mi_lttng_element_command_version; + + /* Strings related to version command */ +-const char * const mi_lttng_element_version; +-const char * const mi_lttng_element_version_commit; +-const char * const mi_lttng_element_version_description; +-const char * const mi_lttng_element_version_license; +-const char * const mi_lttng_element_version_major; +-const char * const mi_lttng_element_version_minor; +-const char * const mi_lttng_element_version_patch_level; +-const char * const mi_lttng_element_version_str; +-const char * const mi_lttng_element_version_web; ++extern const char * const mi_lttng_element_version; ++extern const char * const mi_lttng_element_version_commit; ++extern const char * const mi_lttng_element_version_description; ++extern const char * const mi_lttng_element_version_license; ++extern const char * const mi_lttng_element_version_major; ++extern const char * const mi_lttng_element_version_minor; ++extern const char * const mi_lttng_element_version_patch_level; ++extern const char * const mi_lttng_element_version_str; ++extern const char * const mi_lttng_element_version_web; + + /* String related to a lttng_event_field */ +-const char * const mi_lttng_element_event_field; +-const char * const mi_lttng_element_event_fields; ++extern const char * const mi_lttng_element_event_field; ++extern const char * const mi_lttng_element_event_fields; + + /* String related to lttng_event_context */ +-const char * const mi_lttng_context_type_perf_counter; +-const char * const mi_lttng_context_type_perf_cpu_counter; +-const char * const mi_lttng_context_type_perf_thread_counter; ++extern const char * const mi_lttng_context_type_perf_counter; ++extern const char * const mi_lttng_context_type_perf_cpu_counter; ++extern const char * const mi_lttng_context_type_perf_thread_counter; + + /* String related to lttng_event_perf_counter_ctx */ +-const char * const mi_lttng_element_perf_counter_context; ++extern const char * const mi_lttng_element_perf_counter_context; + + /* Strings related to pid */ +-const char * const mi_lttng_element_pids; +-const char * const mi_lttng_element_pid; +-const char * const mi_lttng_element_pid_id; ++extern const char * const mi_lttng_element_pids; ++extern const char * const mi_lttng_element_pid; ++extern const char * const mi_lttng_element_pid_id; + + /* Strings related to save command */ +-const char * const mi_lttng_element_save; ++extern const char * const mi_lttng_element_save; + + /* Strings related to load command */ +-const char * const mi_lttng_element_load; ++extern const char * const mi_lttng_element_load; + + /* General element of mi_lttng */ +-const char * const mi_lttng_element_empty; +-const char * const mi_lttng_element_id; +-const char * const mi_lttng_element_nowrite; +-const char * const mi_lttng_element_success; +-const char * const mi_lttng_element_type_enum; +-const char * const mi_lttng_element_type_float; +-const char * const mi_lttng_element_type_integer; +-const char * const mi_lttng_element_type_other; +-const char * const mi_lttng_element_type_string; ++extern const char * const mi_lttng_element_empty; ++extern const char * const mi_lttng_element_id; ++extern const char * const mi_lttng_element_nowrite; ++extern const char * const mi_lttng_element_success; ++extern const char * const mi_lttng_element_type_enum; ++extern const char * const mi_lttng_element_type_float; ++extern const char * const mi_lttng_element_type_integer; ++extern const char * const mi_lttng_element_type_other; ++extern const char * const mi_lttng_element_type_string; + + /* String related to loglevel */ +-const char * const mi_lttng_loglevel_str_alert; +-const char * const mi_lttng_loglevel_str_crit; +-const char * const mi_lttng_loglevel_str_debug; +-const char * const mi_lttng_loglevel_str_debug_function; +-const char * const mi_lttng_loglevel_str_debug_line; +-const char * const mi_lttng_loglevel_str_debug_module; +-const char * const mi_lttng_loglevel_str_debug_process; +-const char * const mi_lttng_loglevel_str_debug_program; +-const char * const mi_lttng_loglevel_str_debug_system; +-const char * const mi_lttng_loglevel_str_debug_unit; +-const char * const mi_lttng_loglevel_str_emerg; +-const char * const mi_lttng_loglevel_str_err; +-const char * const mi_lttng_loglevel_str_info; +-const char * const mi_lttng_loglevel_str_notice; +-const char * const mi_lttng_loglevel_str_unknown; +-const char * const mi_lttng_loglevel_str_warning; ++extern const char * const mi_lttng_loglevel_str_alert; ++extern const char * const mi_lttng_loglevel_str_crit; ++extern const char * const mi_lttng_loglevel_str_debug; ++extern const char * const mi_lttng_loglevel_str_debug_function; ++extern const char * const mi_lttng_loglevel_str_debug_line; ++extern const char * const mi_lttng_loglevel_str_debug_module; ++extern const char * const mi_lttng_loglevel_str_debug_process; ++extern const char * const mi_lttng_loglevel_str_debug_program; ++extern const char * const mi_lttng_loglevel_str_debug_system; ++extern const char * const mi_lttng_loglevel_str_debug_unit; ++extern const char * const mi_lttng_loglevel_str_emerg; ++extern const char * const mi_lttng_loglevel_str_err; ++extern const char * const mi_lttng_loglevel_str_info; ++extern const char * const mi_lttng_loglevel_str_notice; ++extern const char * const mi_lttng_loglevel_str_unknown; ++extern const char * const mi_lttng_loglevel_str_warning; + + /* String related to loglevel JUL */ +-const char * const mi_lttng_loglevel_str_jul_all; +-const char * const mi_lttng_loglevel_str_jul_config; +-const char * const mi_lttng_loglevel_str_jul_fine; +-const char * const mi_lttng_loglevel_str_jul_finer; +-const char * const mi_lttng_loglevel_str_jul_finest; +-const char * const mi_lttng_loglevel_str_jul_info; +-const char * const mi_lttng_loglevel_str_jul_off; +-const char * const mi_lttng_loglevel_str_jul_severe; +-const char * const mi_lttng_loglevel_str_jul_warning; ++extern const char * const mi_lttng_loglevel_str_jul_all; ++extern const char * const mi_lttng_loglevel_str_jul_config; ++extern const char * const mi_lttng_loglevel_str_jul_fine; ++extern const char * const mi_lttng_loglevel_str_jul_finer; ++extern const char * const mi_lttng_loglevel_str_jul_finest; ++extern const char * const mi_lttng_loglevel_str_jul_info; ++extern const char * const mi_lttng_loglevel_str_jul_off; ++extern const char * const mi_lttng_loglevel_str_jul_severe; ++extern const char * const mi_lttng_loglevel_str_jul_warning; + + /* String related to loglevel Log4j */ +-const char * const mi_lttng_loglevel_str_log4j_off; +-const char * const mi_lttng_loglevel_str_log4j_fatal; +-const char * const mi_lttng_loglevel_str_log4j_error; +-const char * const mi_lttng_loglevel_str_log4j_warn; +-const char * const mi_lttng_loglevel_str_log4j_info; +-const char * const mi_lttng_loglevel_str_log4j_debug; +-const char * const mi_lttng_loglevel_str_log4j_trace; +-const char * const mi_lttng_loglevel_str_log4j_all; ++extern const char * const mi_lttng_loglevel_str_log4j_off; ++extern const char * const mi_lttng_loglevel_str_log4j_fatal; ++extern const char * const mi_lttng_loglevel_str_log4j_error; ++extern const char * const mi_lttng_loglevel_str_log4j_warn; ++extern const char * const mi_lttng_loglevel_str_log4j_info; ++extern const char * const mi_lttng_loglevel_str_log4j_debug; ++extern const char * const mi_lttng_loglevel_str_log4j_trace; ++extern const char * const mi_lttng_loglevel_str_log4j_all; + + /* String related to loglevel type */ +-const char * const mi_lttng_loglevel_type_all; +-const char * const mi_lttng_loglevel_type_range; +-const char * const mi_lttng_loglevel_type_single; +-const char * const mi_lttng_loglevel_type_unknown; ++extern const char * const mi_lttng_loglevel_type_all; ++extern const char * const mi_lttng_loglevel_type_range; ++extern const char * const mi_lttng_loglevel_type_single; ++extern const char * const mi_lttng_loglevel_type_unknown; + + /* Sting related to lttng_calibrate */ +-const char * const mi_lttng_element_calibrate; +-const char * const mi_lttng_element_calibrate_function; ++extern const char * const mi_lttng_element_calibrate; ++extern const char * const mi_lttng_element_calibrate_function; + + /* String related to a lttng_snapshot */ +-const char * const mi_lttng_element_snapshot_ctrl_url; +-const char * const mi_lttng_element_snapshot_data_url; +-const char * const mi_lttng_element_snapshot_max_size; +-const char * const mi_lttng_element_snapshot_n_ptr; +-const char * const mi_lttng_element_snapshot_session_name; +-const char * const mi_lttng_element_snapshots; ++extern const char * const mi_lttng_element_snapshot_ctrl_url; ++extern const char * const mi_lttng_element_snapshot_data_url; ++extern const char * const mi_lttng_element_snapshot_max_size; ++extern const char * const mi_lttng_element_snapshot_n_ptr; ++extern const char * const mi_lttng_element_snapshot_session_name; ++extern const char * const mi_lttng_element_snapshots; + + /* Utility string function */ + const char *mi_lttng_loglevel_string(int value, enum lttng_domain_type domain); +--- a/src/common/config/config-session-abi.h ++++ b/src/common/config/config-session-abi.h +@@ -18,95 +18,95 @@ + #ifndef CONFIG_SESSION_INTERNAL_H + #define CONFIG_SESSION_INTERNAL_H + +-const char * const config_element_channel; +-const char * const config_element_channels; +-const char * const config_element_domain; +-const char * const config_element_domains; +-const char * const config_element_event; +-const char * const config_element_events; +-const char * const config_element_context; +-const char * const config_element_contexts; +-const char * const config_element_attributes; +-const char * const config_element_exclusion; +-const char * const config_element_exclusions; +-const char * const config_element_function_attributes; +-const char * const config_element_probe_attributes; +-const char * const config_element_symbol_name; +-const char * const config_element_address; +-const char * const config_element_offset; +-const char * const config_element_name; +-const char * const config_element_enabled; +-const char * const config_element_overwrite_mode; +-const char * const config_element_subbuf_size; +-const char * const config_element_num_subbuf; +-const char * const config_element_switch_timer_interval; +-const char * const config_element_read_timer_interval; +-const char * const config_element_output; +-const char * const config_element_output_type; +-const char * const config_element_tracefile_size; +-const char * const config_element_tracefile_count; +-const char * const config_element_live_timer_interval; +-const char * const config_element_type; +-const char * const config_element_buffer_type; +-const char * const config_element_session; +-const char * const config_element_sessions; +-const char * const config_element_perf; +-const char * const config_element_config; +-const char * const config_element_started; +-const char * const config_element_snapshot_mode; +-const char * const config_element_loglevel; +-const char * const config_element_loglevel_type; +-const char * const config_element_filter; +-const char * const config_element_snapshot_outputs; +-const char * const config_element_consumer_output; +-const char * const config_element_destination; +-const char * const config_element_path; +-const char * const config_element_net_output; +-const char * const config_element_control_uri; +-const char * const config_element_data_uri; +-const char * const config_element_max_size; +- +-const char * const config_domain_type_kernel; +-const char * const config_domain_type_ust; +-const char * const config_domain_type_jul; +-const char * const config_domain_type_log4j; +- +-const char * const config_buffer_type_per_pid; +-const char * const config_buffer_type_per_uid; +-const char * const config_buffer_type_global; +- +-const char * const config_overwrite_mode_discard; +-const char * const config_overwrite_mode_overwrite; +- +-const char * const config_output_type_splice; +-const char * const config_output_type_mmap; +- +-const char * const config_loglevel_type_all; +-const char * const config_loglevel_type_range; +-const char * const config_loglevel_type_single; +- +-const char * const config_event_type_all; +-const char * const config_event_type_tracepoint; +-const char * const config_event_type_probe; +-const char * const config_event_type_function; +-const char * const config_event_type_function_entry; +-const char * const config_event_type_noop; +-const char * const config_event_type_syscall; +-const char * const config_event_type_kprobe; +-const char * const config_event_type_kretprobe; +- +-const char * const config_event_context_pid; +-const char * const config_event_context_procname; +-const char * const config_event_context_prio; +-const char * const config_event_context_nice; +-const char * const config_event_context_vpid; +-const char * const config_event_context_tid; +-const char * const config_event_context_vtid; +-const char * const config_event_context_ppid; +-const char * const config_event_context_vppid; +-const char * const config_event_context_pthread_id; +-const char * const config_event_context_hostname; +-const char * const config_event_context_ip; +-const char * const config_event_context_perf_thread_counter; ++extern const char * const config_element_channel; ++extern const char * const config_element_channels; ++extern const char * const config_element_domain; ++extern const char * const config_element_domains; ++extern const char * const config_element_event; ++extern const char * const config_element_events; ++extern const char * const config_element_context; ++extern const char * const config_element_contexts; ++extern const char * const config_element_attributes; ++extern const char * const config_element_exclusion; ++extern const char * const config_element_exclusions; ++extern const char * const config_element_function_attributes; ++extern const char * const config_element_probe_attributes; ++extern const char * const config_element_symbol_name; ++extern const char * const config_element_address; ++extern const char * const config_element_offset; ++extern const char * const config_element_name; ++extern const char * const config_element_enabled; ++extern const char * const config_element_overwrite_mode; ++extern const char * const config_element_subbuf_size; ++extern const char * const config_element_num_subbuf; ++extern const char * const config_element_switch_timer_interval; ++extern const char * const config_element_read_timer_interval; ++extern const char * const config_element_output; ++extern const char * const config_element_output_type; ++extern const char * const config_element_tracefile_size; ++extern const char * const config_element_tracefile_count; ++extern const char * const config_element_live_timer_interval; ++extern const char * const config_element_type; ++extern const char * const config_element_buffer_type; ++extern const char * const config_element_session; ++extern const char * const config_element_sessions; ++extern const char * const config_element_perf; ++extern const char * const config_element_config; ++extern const char * const config_element_started; ++extern const char * const config_element_snapshot_mode; ++extern const char * const config_element_loglevel; ++extern const char * const config_element_loglevel_type; ++extern const char * const config_element_filter; ++extern const char * const config_element_snapshot_outputs; ++extern const char * const config_element_consumer_output; ++extern const char * const config_element_destination; ++extern const char * const config_element_path; ++extern const char * const config_element_net_output; ++extern const char * const config_element_control_uri; ++extern const char * const config_element_data_uri; ++extern const char * const config_element_max_size; ++ ++extern const char * const config_domain_type_kernel; ++extern const char * const config_domain_type_ust; ++extern const char * const config_domain_type_jul; ++extern const char * const config_domain_type_log4j; ++ ++extern const char * const config_buffer_type_per_pid; ++extern const char * const config_buffer_type_per_uid; ++extern const char * const config_buffer_type_global; ++ ++extern const char * const config_overwrite_mode_discard; ++extern const char * const config_overwrite_mode_overwrite; ++ ++extern const char * const config_output_type_splice; ++extern const char * const config_output_type_mmap; ++ ++extern const char * const config_loglevel_type_all; ++extern const char * const config_loglevel_type_range; ++extern const char * const config_loglevel_type_single; ++ ++extern const char * const config_event_type_all; ++extern const char * const config_event_type_tracepoint; ++extern const char * const config_event_type_probe; ++extern const char * const config_event_type_function; ++extern const char * const config_event_type_function_entry; ++extern const char * const config_event_type_noop; ++extern const char * const config_event_type_syscall; ++extern const char * const config_event_type_kprobe; ++extern const char * const config_event_type_kretprobe; ++ ++extern const char * const config_event_context_pid; ++extern const char * const config_event_context_procname; ++extern const char * const config_event_context_prio; ++extern const char * const config_event_context_nice; ++extern const char * const config_event_context_vpid; ++extern const char * const config_event_context_tid; ++extern const char * const config_event_context_vtid; ++extern const char * const config_event_context_ppid; ++extern const char * const config_event_context_vppid; ++extern const char * const config_event_context_pthread_id; ++extern const char * const config_event_context_hostname; ++extern const char * const config_event_context_ip; ++extern const char * const config_event_context_perf_thread_counter; + + #endif /* CONFIG_SESSION_INTERNAL_H */ diff --git a/devel/m4/Makefile b/devel/m4/Makefile new file mode 100644 index 00000000..1a42f4b1 --- /dev/null +++ b/devel/m4/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2015 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:=m4 +PKG_VERSION:=1.4.18 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=@GNU/m4 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_HASH:=f2c1e86ca0a404ff281631bdc8377638992744b175afb806e25871a24a934e07 +PKG_MAINTAINER:=Heinrich Schuchardt +PKG_LICENSE:=GPL-3.0+ + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/m4 + SECTION:=devel + CATEGORY:=Development + TITLE:=m4 + URL:=https://www.gnu.org/software/m4/ +endef + +define Package/m4/description + GNU M4 is an implementation of the traditional Unix macro processor. + It is used by GNU Autoconf and Automake. +endef + +define Package/m4/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/m4 $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,m4)) diff --git a/devel/make/Makefile b/devel/make/Makefile new file mode 100644 index 00000000..a2692d42 --- /dev/null +++ b/devel/make/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2015 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:=make +PKG_VERSION:=4.2.1 +PKG_RELEASE:=2 + +PKG_SOURCE_URL:=@GNU/make +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_HASH:=d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589 +PKG_MAINTAINER:=Heinrich Schuchardt +PKG_LICENSE:=GPL-3.0+ + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/make + SECTION:=devel + CATEGORY:=Development + TITLE:=make + URL:=https://www.gnu.org/software/make/ +endef + +define Package/make/description + The Make package contains a tool to create executables from source files. +endef + +define Package/make/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/make $(1)/usr/bin/ +endef + +# provide gnumake.h at build time for other packages +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_BUILD_DIR)/gnumake.h $(1)/usr/include/ +endef + +$(eval $(call BuildPackage,make)) diff --git a/devel/patch/Makefile b/devel/patch/Makefile new file mode 100644 index 00000000..43049def --- /dev/null +++ b/devel/patch/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2008-2015 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:=patch +PKG_VERSION:=2.7.6 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@GNU/patch +PKG_HASH:=ac610bda97abe0d9f6b7c963255a11dcb196c25e337c61f94e4778d632f1d8fd + +PKG_LICENSE:=GPL-3.0+ +PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:gnu:patch + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/patch + SECTION:=devel + CATEGORY:=Development + TITLE:=patch + URL:=https://savannah.gnu.org/projects/patch/ + MAINTAINER:=Russell Senior +endef + +define Package/patch/description + The Patch package contains a program for modifying or creating files + by applying a "patch" file typically created by the diff program. +endef + +CONFIGURE_ARGS+= --disable-xattr + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + +define Package/patch/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/patch $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,patch)) diff --git a/devel/patch/patches/010-CVE-2018-6951.patch b/devel/patch/patches/010-CVE-2018-6951.patch new file mode 100644 index 00000000..19c3ccbb --- /dev/null +++ b/devel/patch/patches/010-CVE-2018-6951.patch @@ -0,0 +1,29 @@ +From 9bf998b5fcbcde1dea0e472dc1538abb97e9012e Mon Sep 17 00:00:00 2001 +From: Andreas Gruenbacher +Date: Mon, 12 Feb 2018 16:48:24 +0100 +Subject: [PATCH] Fix segfault with mangled rename patch + +http://savannah.gnu.org/bugs/?53132 +* src/pch.c (intuit_diff_type): Ensure that two filenames are specified +for renames and copies (fix the existing check). +--- + src/pch.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/pch.c b/src/pch.c +index ff9ed2c..bc6278c 100644 +--- a/src/pch.c ++++ b/src/pch.c +@@ -974,7 +974,8 @@ intuit_diff_type (bool need_header, mode_t *p_file_type) + if ((pch_rename () || pch_copy ()) + && ! inname + && ! ((i == OLD || i == NEW) && +- p_name[! reverse] && ++ p_name[reverse] && p_name[! reverse] && ++ name_is_valid (p_name[reverse]) && + name_is_valid (p_name[! reverse]))) + { + say ("Cannot %s file without two valid file names\n", pch_rename () ? "rename" : "copy"); +-- +2.19.1 + diff --git a/devel/patch/patches/020-CVE-2018-1000156.patch b/devel/patch/patches/020-CVE-2018-1000156.patch new file mode 100644 index 00000000..f0583c12 --- /dev/null +++ b/devel/patch/patches/020-CVE-2018-1000156.patch @@ -0,0 +1,209 @@ +From b56779aed483f0036a32a65e62ab7b5e461b07cc Mon Sep 17 00:00:00 2001 +From: Andreas Gruenbacher +Date: Fri, 6 Apr 2018 12:14:49 +0200 +Subject: [PATCH] Fix arbitrary command execution in ed-style patches + (CVE-2018-1000156) + +* src/pch.c (do_ed_script): Write ed script to a temporary file instead +of piping it to ed: this will cause ed to abort on invalid commands +instead of rejecting them and carrying on. +* tests/ed-style: New test case. +* tests/Makefile.am (TESTS): Add test case. +--- + src/pch.c | 89 +++++++++++++++++++++++++++++++++++------------ + tests/Makefile.am | 1 + + tests/ed-style | 41 ++++++++++++++++++++++ + 3 files changed, 108 insertions(+), 23 deletions(-) + create mode 100644 tests/ed-style + +diff --git a/src/pch.c b/src/pch.c +index bc6278c..4fd5a05 100644 +--- a/src/pch.c ++++ b/src/pch.c +@@ -33,6 +33,7 @@ + # include + #endif + #include ++#include + + #define INITHUNKMAX 125 /* initial dynamic allocation size */ + +@@ -2389,22 +2390,28 @@ do_ed_script (char const *inname, char const *outname, + static char const editor_program[] = EDITOR_PROGRAM; + + file_offset beginning_of_this_line; +- FILE *pipefp = 0; + size_t chars_read; ++ FILE *tmpfp = 0; ++ char const *tmpname; ++ int tmpfd; ++ pid_t pid; ++ ++ if (! dry_run && ! skip_rest_of_patch) ++ { ++ /* Write ed script to a temporary file. This causes ed to abort on ++ invalid commands such as when line numbers or ranges exceed the ++ number of available lines. When ed reads from a pipe, it rejects ++ invalid commands and treats the next line as a new command, which ++ can lead to arbitrary command execution. */ ++ ++ tmpfd = make_tempfile (&tmpname, 'e', NULL, O_RDWR | O_BINARY, 0); ++ if (tmpfd == -1) ++ pfatal ("Can't create temporary file %s", quotearg (tmpname)); ++ tmpfp = fdopen (tmpfd, "w+b"); ++ if (! tmpfp) ++ pfatal ("Can't open stream for file %s", quotearg (tmpname)); ++ } + +- if (! dry_run && ! skip_rest_of_patch) { +- int exclusive = *outname_needs_removal ? 0 : O_EXCL; +- assert (! inerrno); +- *outname_needs_removal = true; +- copy_file (inname, outname, 0, exclusive, instat.st_mode, true); +- sprintf (buf, "%s %s%s", editor_program, +- verbosity == VERBOSE ? "" : "- ", +- outname); +- fflush (stdout); +- pipefp = popen(buf, binary_transput ? "wb" : "w"); +- if (!pipefp) +- pfatal ("Can't open pipe to %s", quotearg (buf)); +- } + for (;;) { + char ed_command_letter; + beginning_of_this_line = file_tell (pfp); +@@ -2415,14 +2422,14 @@ do_ed_script (char const *inname, char const *outname, + } + ed_command_letter = get_ed_command_letter (buf); + if (ed_command_letter) { +- if (pipefp) +- if (! fwrite (buf, sizeof *buf, chars_read, pipefp)) ++ if (tmpfp) ++ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp)) + write_fatal (); + if (ed_command_letter != 'd' && ed_command_letter != 's') { + p_pass_comments_through = true; + while ((chars_read = get_line ()) != 0) { +- if (pipefp) +- if (! fwrite (buf, sizeof *buf, chars_read, pipefp)) ++ if (tmpfp) ++ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp)) + write_fatal (); + if (chars_read == 2 && strEQ (buf, ".\n")) + break; +@@ -2435,13 +2442,49 @@ do_ed_script (char const *inname, char const *outname, + break; + } + } +- if (!pipefp) ++ if (!tmpfp) + return; +- if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, pipefp) == 0 +- || fflush (pipefp) != 0) ++ if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, tmpfp) == 0 ++ || fflush (tmpfp) != 0) + write_fatal (); +- if (pclose (pipefp) != 0) +- fatal ("%s FAILED", editor_program); ++ ++ if (lseek (tmpfd, 0, SEEK_SET) == -1) ++ pfatal ("Can't rewind to the beginning of file %s", quotearg (tmpname)); ++ ++ if (! dry_run && ! skip_rest_of_patch) { ++ int exclusive = *outname_needs_removal ? 0 : O_EXCL; ++ *outname_needs_removal = true; ++ if (inerrno != ENOENT) ++ { ++ *outname_needs_removal = true; ++ copy_file (inname, outname, 0, exclusive, instat.st_mode, true); ++ } ++ sprintf (buf, "%s %s%s", editor_program, ++ verbosity == VERBOSE ? "" : "- ", ++ outname); ++ fflush (stdout); ++ ++ pid = fork(); ++ if (pid == -1) ++ pfatal ("Can't fork"); ++ else if (pid == 0) ++ { ++ dup2 (tmpfd, 0); ++ execl ("/bin/sh", "sh", "-c", buf, (char *) 0); ++ _exit (2); ++ } ++ else ++ { ++ int wstatus; ++ if (waitpid (pid, &wstatus, 0) == -1 ++ || ! WIFEXITED (wstatus) ++ || WEXITSTATUS (wstatus) != 0) ++ fatal ("%s FAILED", editor_program); ++ } ++ } ++ ++ fclose (tmpfp); ++ safe_unlink (tmpname); + + if (ofp) + { +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 6b6df63..16f8693 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -32,6 +32,7 @@ TESTS = \ + crlf-handling \ + dash-o-append \ + deep-directories \ ++ ed-style \ + empty-files \ + false-match \ + fifo \ +diff --git a/tests/ed-style b/tests/ed-style +new file mode 100644 +index 0000000..d8c0689 +--- /dev/null ++++ b/tests/ed-style +@@ -0,0 +1,41 @@ ++# Copyright (C) 2018 Free Software Foundation, Inc. ++# ++# Copying and distribution of this file, with or without modification, ++# in any medium, are permitted without royalty provided the copyright ++# notice and this notice are preserved. ++ ++. $srcdir/test-lib.sh ++ ++require cat ++use_local_patch ++use_tmpdir ++ ++# ============================================================== ++ ++cat > ed1.diff < ed2.diff < /dev/null || echo "Status: $?"' < +Date: Fri, 17 Aug 2018 13:35:40 +0200 +Subject: [PATCH] Fix swapping fake lines in pch_swap + +* src/pch.c (pch_swap): Fix swapping p_bfake and p_efake when there is a +blank line in the middle of a context-diff hunk: that empty line stays +in the middle of the hunk and isn't swapped. + +Fixes: https://savannah.gnu.org/bugs/index.php?53133 +--- + src/pch.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/pch.c b/src/pch.c +index 4fd5a05..b0dd14d 100644 +--- a/src/pch.c ++++ b/src/pch.c +@@ -2115,7 +2115,7 @@ pch_swap (void) + } + if (p_efake >= 0) { /* fix non-freeable ptr range */ + if (p_efake <= i) +- n = p_end - i + 1; ++ n = p_end - p_ptrn_lines; + else + n = -i; + p_efake += n; +-- +2.19.1 + diff --git a/devel/pkg-config/Makefile b/devel/pkg-config/Makefile new file mode 100644 index 00000000..26ef737c --- /dev/null +++ b/devel/pkg-config/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2015-2016 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:=pkg-config +PKG_VERSION:=0.29.1 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://pkgconfig.freedesktop.org/releases/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=beb43c9e064555469bd4390dcfd8030b1536e0aa103f08d7abf7ae8cac0cb001 +PKG_MAINTAINER:=Heinrich Schuchardt +PKG_LICENSE:=GPL-2+ + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/pkg-config + SECTION:=devel + CATEGORY:=Development + TITLE:=pkg-config + URL:=http://www.freedesktop.org/wiki/Software/pkg-config/ + DEPENDS:=+glib2 $(INTL_DEPENDS) +endef + +define Package/pkg-config/description + pkg-config is a helper tool used when compiling applications and libraries. + It helps you insert the correct compiler options on the command line so an + application can use gcc -o test test.cpkg-config --libs --cflags glib-2.0 + for instance, rather than hard-coding values on where to find glib (or + other libraries). +endef + +define Package/pkg-config/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pkg-config $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/share/aclocal/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/pkg.m4 \ + $(1)/usr/share/aclocal/ +endef + +$(eval $(call BuildPackage,pkg-config)) diff --git a/fonts/dejavu-fonts-ttf/Makefile b/fonts/dejavu-fonts-ttf/Makefile new file mode 100644 index 00000000..76bb48c1 --- /dev/null +++ b/fonts/dejavu-fonts-ttf/Makefile @@ -0,0 +1,84 @@ +# +# Copyright (C) 2008-2016 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:=dejavu-fonts-ttf +PKG_VERSION:=2.37 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/dejavu +PKG_HASH:=fa9ca4d13871dd122f61258a80d01751d603b4d3ee14095d65453b4e846e17d7 +PKG_LICENSE:=Bitstream-Vera-Fonts-Copyright Arev-Fonts-Copyright Public-Domain +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Mirko Vogt + +include $(INCLUDE_DIR)/package.mk + +FILES:= \ + DejaVuSerif-Italic \ + DejaVuSerifCondensed-Italic \ + DejaVuSerifCondensed-BoldItalic \ + DejaVuSerifCondensed-Bold \ + DejaVuSerifCondensed \ + DejaVuSerif-BoldItalic \ + DejaVuSerif-Bold \ + DejaVuSerif \ + DejaVuSans-Oblique \ + DejaVuSansMono-Oblique \ + DejaVuSansMono-BoldOblique \ + DejaVuSansMono-Bold \ + DejaVuSansMono \ + DejaVuSans-ExtraLight \ + DejaVuSansCondensed-Oblique \ + DejaVuSansCondensed-BoldOblique \ + DejaVuSansCondensed-Bold \ + DejaVuSansCondensed \ + DejaVuSans-BoldOblique \ + DejaVuSans-Bold \ + DejaVuSans \ + DejaVuMathTeXGyre + +define PartGen +define Package/dejavu-fonts-ttf-$(1) +$(call Package/dejavu-fonts-ttf/Default) + TITLE:=$(1) +endef +endef + +define Package/dejavu-fonts-ttf/Default + TITLE:=dejavu-fonts-ttf + SECTION:=fonts + CATEGORY:=Fonts + SUBMENU:=DejaVu + URL:=http://dejavu.sourceforge.net/ +endef + +$(foreach file,$(FILES),$(eval $(call PartGen,$(file)))) + +define Build/Compile + true +endef + +define Build/Configure + true +endef + +define PartInstall +define Package/dejavu-fonts-ttf-$(1)/install + $(INSTALL_DIR) \ + $$(1)/usr/share/fonts/ttf-dejavu + + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/ttf/$(1).ttf \ + $$(1)/usr/share/fonts/ttf-dejavu/ +endef +endef + +$(foreach file,$(FILES),$(eval $(call PartInstall,$(file)))) + +$(foreach file,$(FILES),$(eval $(call BuildPackage,dejavu-fonts-ttf-$(file)))) diff --git a/ipv6/tayga/Makefile b/ipv6/tayga/Makefile new file mode 100644 index 00000000..a3decdfe --- /dev/null +++ b/ipv6/tayga/Makefile @@ -0,0 +1,49 @@ +# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tayga +PKG_VERSION:=0.9.2 +PKG_RELEASE:=2 + +PKG_SOURCE:=tayga-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.litech.org/tayga/ +PKG_HASH:=2b1f7927a9d2dcff9095aff3c271924b052ccfd2faca9588b277431a44f0009c +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=COPYING + +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk + +define Package/tayga + SECTION:=net + CATEGORY:=Network + DEPENDS:=+ip @IPV6 +kmod-tun + TITLE:=Out-of-kernel stateless NAT64 implementation for Linux + URL:=http://www.litech.org/tayga/ + MAINTAINER:=Ondrej Caletka +endef + +define Package/tayga/description + TAYGA is an out-of-kernel stateless NAT64 implementation for + Linux. It uses the TUN driver to exchange packets with the + kernel, which is the same driver used by OpenVPN and QEMU/KVM. +endef + +ifdef CONFIG_PACKAGE_netifd + define Package/tayga/install + $(INSTALL_DIR) $(1)/usr/sbin $(1)/lib/netifd/proto + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tayga $(1)/usr/sbin/ + $(INSTALL_BIN) ./files/tayga-proto.sh $(1)/lib/netifd/proto/tayga.sh + endef +else + define Package/tayga/install + $(INSTALL_DIR) $(1)/usr/sbin $(1)/lib/network $(1)/etc/hotplug.d/iface + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tayga $(1)/usr/sbin/ + $(INSTALL_DATA) ./files/tayga.sh $(1)/lib/network/tayga.sh + $(INSTALL_DATA) ./files/tayga.hotplug $(1)/etc/hotplug.d/iface/95-tayga + endef +endif + +$(eval $(call BuildPackage,tayga)) diff --git a/ipv6/tayga/files/tayga-proto.sh b/ipv6/tayga/files/tayga-proto.sh new file mode 100755 index 00000000..b92c2a66 --- /dev/null +++ b/ipv6/tayga/files/tayga-proto.sh @@ -0,0 +1,96 @@ +#!/bin/sh +# tayga.sh - TAYGA proto +# Copyright (c) 2014 OpenWrt.org + +[ -n "$INCLUDE_ONLY" ] || { + . /lib/functions.sh + . /lib/functions/network.sh + . ../netifd-proto.sh + init_proto "$@" +} + +proto_tayga_setup() { + local cfg="$1" + local iface="$2" + local link="tayga-$cfg" + + local ipv4_addr ipv6_addr prefix dynamic_pool ipaddr ip6addr noroutes + json_get_vars ipv4_addr ipv6_addr prefix dynamic_pool ipaddr ip6addr noroutes + [ -z "$ipv4_addr" -o -z "$prefix" ] && { + proto_notify_error "$cfg" "REQUIRED_PARAMETERS_MISSING" + proto_block_restart "$cfg" + return + } + + local tmpconf="/var/etc/tayga-$cfg.conf" + mkdir -p /var/etc + mkdir -p /var/run/tayga/$cfg + + echo "tun-device $link" >$tmpconf + echo "ipv4-addr $ipv4_addr" >>$tmpconf + [ -n "$ipv6_addr" ] && + echo "ipv6-addr $ipv6_addr" >>$tmpconf + [ -n "$prefix" ] && + echo "prefix $prefix" >>$tmpconf + [ -n "$dynamic_pool" ] && + echo "dynamic-pool $dynamic_pool" >>$tmpconf + echo "data-dir /var/run/tayga/$cfg" >>$tmpconf + #TODO: Support static mapping of IPv4 <-> IPv6 + + # here we create TUN device and check configuration + tayga -c $tmpconf --mktun + [ "$?" -ne 0 ] && { + proto_notify_error "$cfg" "TAYGA_FAILED" + proto_block_restart "$cfg" + return + } + + proto_init_update "$link" 1 + + [ -n "$ipaddr" ] && proto_add_ipv4_address "$ipaddr" "255.255.255.255" + [ -n "$ip6addr" ] && proto_add_ipv6_address "$ip6addr" "128" + + [ "$noroutes" != 1 ] && { + [ -n "$ipv6_addr" ] && proto_add_ipv6_route "$ipv6_addr" "128" + [ -n "$dynamic_pool" ] && { + local pool="${dynamic_pool%%/*}" + local mask="${dynamic_pool##*/}" + proto_add_ipv4_route "$pool" "$mask" + } + [ -n "$prefix" ] && { + local prefix6="${prefix%%/*}" + local mask6="${prefix##*/}" + proto_add_ipv6_route "$prefix6" "$mask6" + } + } + + proto_send_update "$cfg" + + proto_run_command "$cfg" tayga -n -c $tmpconf \ + -p /var/run/$link.pid + +} + +proto_tayga_teardown() { + local cfg="$1" + local tmpconf="/var/etc/tayga-$cfg.conf" + proto_kill_command "$cfg" + sleep 1 + tayga -c $tmpconf --rmtun +} + +proto_tayga_init_config() { + no_device=1 + available=1 + proto_config_add_string "ipv4_addr" + proto_config_add_string "ipv6_addr" + proto_config_add_string "prefix" + proto_config_add_string "dynamic_pool" + proto_config_add_string "ipaddr" + proto_config_add_string "ip6addr:ip6addr" + proto_config_add_boolean "noroutes" +} + +[ -n "$INCLUDE_ONLY" ] || { + add_protocol tayga +} diff --git a/ipv6/tayga/files/tayga.hotplug b/ipv6/tayga/files/tayga.hotplug new file mode 100644 index 00000000..fb989bdb --- /dev/null +++ b/ipv6/tayga/files/tayga.hotplug @@ -0,0 +1,37 @@ +#!/bin/sh + +if [ "$ACTION" = ifup ]; then + . /lib/functions.sh + + include /lib/network + scan_interfaces + + update_tunnel() { + local cfg="$1" + + local proto + config_get proto "$cfg" proto + [ "$proto" = tayga ] || return 0 + + local wandev4 + config_get wandev4 "$cfg" wan4_device "$(find_tayga_wanif4)" + + local wandev6 + config_get wandev6 "$cfg" wan6_device "$(find_tayga_wanif6)" + + [ "$wandev4" = "$DEVICE" ] || [ "$wandev6" = "$DEVICE" ] || return 0 + + local wanip4=$(find_tayga_wanip4 "$wandev4") + local wanip6=$(find_tayga_wanip6 "$wandev6") + + [ -n "$wanip4" ] && [ -n "$wanip6" ] && { + uci_set_state network "$cfg" ipv4addr "$wanip4" + uci_set_state network "$cfg" ipv6addr "$wanip6" + + logger -t tayga-update "Re-establishing tayga NAT64 due to change on $INTERFACE ($DEVICE)" + ifup "$cfg" & + } + } + + config_foreach update_tunnel interface +fi diff --git a/ipv6/tayga/files/tayga.sh b/ipv6/tayga/files/tayga.sh new file mode 100644 index 00000000..a9edb6d0 --- /dev/null +++ b/ipv6/tayga/files/tayga.sh @@ -0,0 +1,152 @@ +# tayga.sh - NAT64 backend + +find_tayga_wanif4() { + local if=$(ip -4 r l e 0.0.0.0/0); if="${if#default* dev }"; if="${if%% *}" + [ -n "$if" ] && grep -qs "^ *$if:" /proc/net/dev && echo "$if" +} + +find_tayga_wanip4() { + local ip=$(ip -4 a s dev "$1"); ip="${ip#*inet }" + echo "${ip%%[^0-9.]*}" +} + +find_tayga_wanif6() { + local if=$(ip -6 r l e ::/0); if="${if#default* dev }"; if="${if%% *}" + [ -n "$if" ] && grep -qs "^ *$if:" /proc/net/dev && echo "$if" +} + +find_tayga_wanip6() { + local ip=$(ip -6 a s dev "$1"); ip="${ip#*inet6 }" + echo "${ip%%[^0-9A-Fa-f:]*}" +} + +# Hook into scan_interfaces() to synthesize a .device option +# This is needed for /sbin/ifup to properly dispatch control +# to setup_interface_tayga() even if no .ifname is set in +# the configuration. +scan_tayga() { + config_set "$1" device "tayga-$1" +} + +coldplug_interface_tayga() { + setup_interface_tayga "tayga-$1" "$1" +} + +tayga_add_static_mappings() { + local tmpconf="$1" + + ( + . /lib/functions.sh + config_load firewall + + tayga_map_rule_add() { + local cfg="$1" + local tmpconf="$2" + local ipv4_addr ipv6_addr + config_get ipv4_addr "$cfg" ipv4_addr "" + config_get ipv6_addr "$cfg" ipv6_addr "" + [ -n "$ipv4_addr" ] && [ -n "$ipv6_addr" ] && + echo "map $ipv4_addr $ipv6_addr" >>$tmpconf + } + + config_foreach tayga_map_rule_add nat64 "$tmpconf" + ) +} + +setup_interface_tayga() { + local iface="$1" + local cfg="$2" + local link="tayga-$cfg" + + local ipv4_addr ipv6_addr prefix dynamic_pool + + config_get ipv4_addr "$cfg" ipv4_addr + config_get ipv6_addr "$cfg" ipv6_addr + config_get prefix "$cfg" prefix + config_get dynamic_pool "$cfg" dynamic_pool + + local args + + include /lib/network + scan_interfaces + + local wanip4=$(uci_get network "$cfg" ipv4addr) + local wanip6=$(uci_get network "$cfg" ipv6addr) + + local wanif4=$(find_tayga_wanif4) + local wanif6=$(find_tayga_wanif6) + + [ -z "$wanip4" ] && { + [ -n "$wanif4" ] && { + wanip4=$(find_tayga_wanip4 "$wanif4") + uci_set_state network "$cfg" wan4_device "$wanif4" + } + } + + [ -z "$wanip6" ] && { + [ -n "$wanif6" ] && { + wanip6=$(find_tayga_wanip6 "$wanif6") + uci_set_state network "$cfg" wan6_device "$wanif6" + } + } + + [ -n "$wanip4" ] && [ -n "$wanip6" ] || { + echo "Cannot determine local IPv4 and IPv6 addressed for tayga NAT64 $cfg - skipping" + return 1 + } + + local tmpconf="/var/etc/tayga-$cfg.conf" + args="-c $tmpconf" + mkdir -p /var/etc + mkdir -p /var/run/tayga/$cfg + + echo "tun-device $link" >$tmpconf + echo "ipv4-addr $ipv4_addr" >>$tmpconf + [ -n "$ipv6_addr" ] && + echo "ipv6-addr $ipv6_addr" >>$tmpconf + [ -n "$prefix" ] && + echo "prefix $prefix" >>$tmpconf + + tayga_add_static_mappings "$tmpconf" + + [ -n "$dynamic_pool" ] && + echo "dynamic-pool $dynamic_pool" >>$tmpconf + echo "data-dir /var/run/tayga/$cfg" >>$tmpconf + + # creating the tunnel below will trigger a net subsystem event + # prevent it from touching or iface by disabling .auto here + uci_set_state network "$cfg" ifname $link + uci_set_state network "$cfg" auto 0 + + # here we create TUN device and check configuration + tayga $args --mktun || return 1 + + ip link set "$link" up + + ip addr add "$wanip4" dev "$link" + ip addr add "$wanip6" dev "$link" + + [ -n "$dynamic_pool" ] && + ip -4 route add "$dynamic_pool" dev "$link" + [ -n "$prefix" ] && + ip -6 route add "$prefix" dev "$link" + + start-stop-daemon -S -x tayga -- $args -p /var/run/$link.pid + + env -i ACTION="ifup" DEVICE="$link" INTERFACE="$cfg" PROTO="tayga" \ + /sbin/hotplug-call iface +} + +stop_interface_tayga() { + local cfg="$1" + local link="tayga-$cfg" + + env -i ACTION="ifdown" DEVICE="$link" INTERFACE="$cfg" PROTO="tayga" \ + /sbin/hotplug-call iface + + service_kill tayga "/var/run/$link.pid" + + ip link set "$link" down + ip addr flush dev "$link" + ip route flush dev "$link" +} diff --git a/ipv6/tayga/patches/001-configure_unset_CFLAGS.patch b/ipv6/tayga/patches/001-configure_unset_CFLAGS.patch new file mode 100644 index 00000000..c56b5f21 --- /dev/null +++ b/ipv6/tayga/patches/001-configure_unset_CFLAGS.patch @@ -0,0 +1,11 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -5,8 +5,6 @@ AC_CONFIG_HEADERS(config.h) + + AC_PROG_CC + +-CFLAGS='-g -Wall' +- + tayga_conf_path=${sysconfdir}/tayga.conf + + AC_SUBST(tayga_conf_path) diff --git a/ipv6/tayga/patches/002-bigendian_wrong_checksum.patch b/ipv6/tayga/patches/002-bigendian_wrong_checksum.patch new file mode 100644 index 00000000..d8deac3a --- /dev/null +++ b/ipv6/tayga/patches/002-bigendian_wrong_checksum.patch @@ -0,0 +1,53 @@ +--- a/nat64.c ++++ b/nat64.c +@@ -19,6 +19,11 @@ + + extern struct config *gcfg; + ++static uint16_t checksum_extend_byte(uint8_t b) ++{ ++ return htons(b << 8); ++} ++ + static uint16_t ip_checksum(void *d, int c) + { + uint32_t sum = 0xffff; +@@ -30,7 +35,7 @@ static uint16_t ip_checksum(void *d, int + } + + if (c) +- sum += htons(*((uint8_t *)p) << 8); ++ sum += checksum_extend_byte(*((uint8_t *)p)); + + while (sum > 0xffff) + sum = (sum & 0xffff) + (sum >> 16); +@@ -180,10 +185,12 @@ static int xlate_payload_4to6(struct pkt + cksum = ones_add(p->icmp->cksum, cksum); + if (p->icmp->type == 8) { + p->icmp->type = 128; +- p->icmp->cksum = ones_add(cksum, ~(128 - 8)); ++ p->icmp->cksum = ones_add(cksum, ++ ~checksum_extend_byte(128 - 8)); + } else { + p->icmp->type = 129; +- p->icmp->cksum = ones_add(cksum, ~(129 - 0)); ++ p->icmp->cksum = ones_add(cksum, ++ ~checksum_extend_byte(129 - 0)); + } + return 0; + case 17: +@@ -668,10 +675,12 @@ static int xlate_payload_6to4(struct pkt + cksum = ones_add(p->icmp->cksum, cksum); + if (p->icmp->type == 128) { + p->icmp->type = 8; +- p->icmp->cksum = ones_add(cksum, 128 - 8); ++ p->icmp->cksum = ones_add(cksum, ++ checksum_extend_byte(128 - 8)); + } else { + p->icmp->type = 0; +- p->icmp->cksum = ones_add(cksum, 129 - 0); ++ p->icmp->cksum = ones_add(cksum, ++ checksum_extend_byte(129 - 0)); + } + return 0; + case 17: diff --git a/kernel/exfat-nofuse/Makefile b/kernel/exfat-nofuse/Makefile new file mode 100644 index 00000000..46eeb9f9 --- /dev/null +++ b/kernel/exfat-nofuse/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2014 Bruno Randolf +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=exfat-nofuse +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=https://github.com/dorimanx/exfat-nofuse.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_DATE:=2017-06-20 +PKG_SOURCE_VERSION:=de4c760bc9a05ead83bc3ec6eec6cf1fb106f523 +PKG_MIRROR_HASH:=2aa53a83daf4be46e437842ee67d2e0ea327642cb6b8856a79153b52ec726a57 + +PKG_MAINTAINER:=Yousong Zhou +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=LICENSE + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/fs-exfat + SUBMENU:=Filesystems + TITLE:=ExFAT Kernel driver + FILES:=$(PKG_BUILD_DIR)/exfat.ko + AUTOLOAD:=$(call AutoLoad,30,exfat,1) + DEPENDS:=+kmod-nls-base @BUILD_PATENTED +endef + +define KernelPackage/fs-exfat/description + Kernel module for ExFAT Filesytems +endef + +MAKE_OPTS:= \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + M="$(PKG_BUILD_DIR)" + +define Build/Compile + $(MAKE) -C "$(LINUX_DIR)" \ + $(MAKE_OPTS) \ + CONFIG_EXFAT_FS=m \ + modules +endef + +$(eval $(call KernelPackage,fs-exfat)) diff --git a/kernel/mtd-rw/Makefile b/kernel/mtd-rw/Makefile new file mode 100644 index 00000000..bcf60926 --- /dev/null +++ b/kernel/mtd-rw/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2016 Joseph C. Lehner +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=mtd-rw +PKG_VERSION:=git-20160214 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MIRROR_HASH:=c44db17c3e05079116a1704f277642c9ce6f5ca4fa380c60f7e6d44509dc16be +PKG_SOURCE_URL:=https://github.com/jclehner/mtd-rw.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=7e8562067d6a366c8cbaa8084396c33b7e12986b + +PKG_MAINTAINER:=Joseph C. Lehner +PKG_LICENSE=GPL-2.0 +PKG_LICENSE_FILES=LICENSE + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/mtd-rw + SUBMENU:=Other modules + TITLE:=Write-enabler for MTD partitions + FILES:=$(PKG_BUILD_DIR)/mtd-rw.ko +endef + +define KernelPackage/mtd-rw/description + A kernel module that temporarily makes all MTD partitions writeable. +endef + +MAKE_OPTS:= \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + M="$(PKG_BUILD_DIR)" + +define Build/Compile + $(MAKE) -C "$(LINUX_DIR)" \ + $(MAKE_OPTS) \ + CONFIG_MTD_RW=m \ + modules +endef + +$(eval $(call KernelPackage,mtd-rw)) diff --git a/lang/dkjson/Makefile b/lang/dkjson/Makefile new file mode 100644 index 00000000..0901bc06 --- /dev/null +++ b/lang/dkjson/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 20013-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:=dkjson +PKG_VERSION:=2.5 +PKG_RELEASE:=3 + +PKG_SOURCE_URL:=https://github.com/LuaDist/dkjson.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=e72ba0c9f5d8b8746fc306f6189a819dbb5cd0be +PKG_LICENSE:=MIT +PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2 +PKG_MIRROR_HASH:=e80673611e25ce63a95ea0f7a9c407868903fd78536d6c80f1763f2cf9488030 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/dkjson + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=DKJSON + URL:=http://dkolf.de/src/dkjson-lua.fsl/home + MAINTAINER:=Lars Gierth + DEPENDS:=+lua +endef + +define Package/dkjson/description + Lua JSON parser/serializer with UTF-8 support +endef + +define Build/Configure +endef + +define Build/Compile +endef + +define Package/dkjson/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dkjson.lua $(1)/usr/lib/lua/ +endef + +$(eval $(call BuildPackage,dkjson)) diff --git a/lang/erlang/Makefile b/lang/erlang/Makefile new file mode 100644 index 00000000..ed569aa7 --- /dev/null +++ b/lang/erlang/Makefile @@ -0,0 +1,339 @@ +# +# Copyright (C) 2009-2015 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.5 +PKG_RELEASE:=3 + +PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:= http://www.erlang.org/download/ \ + http://erlang.mirror.su.se/ +PKG_HASH:=3c28820c981b30c50df8ac2a4a238e5813454fa3ed2ad530bc7948a282846474 + +PKG_LICENSE:=ErlPL-1.1 +PKG_LICENSE_FILES:=EPLICENCE +PKG_MAINTAINER:=Nicolas Thill + +PKG_BUILD_DEPENDS:=erlang/host openssl +PKG_USE_MIPS16:=0 + +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.4 erlang-kernel=3.2 erlang-sasl=2.4.1 erlang-stdlib=2.4 +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.4 + 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.4 + 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.5 + 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.3 + 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.6 + 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.5 + 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.16 + 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:=5.1.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.2 + 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:=6.0 + 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.18 + 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 + +HOST_CFLAGS += -D_GNU_SOURCE + +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_CFLAGS+=-D_GNU_SOURCE +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)) diff --git a/lang/erlang/patches/101-emulator_includes.patch b/lang/erlang/patches/101-emulator_includes.patch new file mode 100644 index 00000000..5a413af4 --- /dev/null +++ b/lang/erlang/patches/101-emulator_includes.patch @@ -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 $@ diff --git a/lang/erlang/patches/102-musl_compat.patch b/lang/erlang/patches/102-musl_compat.patch new file mode 100644 index 00000000..d23900ed --- /dev/null +++ b/lang/erlang/patches/102-musl_compat.patch @@ -0,0 +1,11 @@ +--- a/lib/erl_interface/src/connect/ei_resolve.c ++++ b/lib/erl_interface/src/connect/ei_resolve.c +@@ -642,7 +642,7 @@ struct hostent *ei_gethostbyname_r(const + #ifndef HAVE_GETHOSTBYNAME_R + return my_gethostbyname_r(name,hostp,buffer,buflen,h_errnop); + #else +-#if (defined(__GLIBC__) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__)) ++#if (defined(_GNU_SOURCE) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__)) + struct hostent *result; + + gethostbyname_r(name, hostp, buffer, buflen, &result, h_errnop); diff --git a/lang/erlang/patches/103-disable_emacs.patch b/lang/erlang/patches/103-disable_emacs.patch new file mode 100644 index 00000000..94121952 --- /dev/null +++ b/lang/erlang/patches/103-disable_emacs.patch @@ -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) diff --git a/lang/golang/golang-compiler.mk b/lang/golang/golang-compiler.mk new file mode 100644 index 00000000..5e7fe689 --- /dev/null +++ b/lang/golang/golang-compiler.mk @@ -0,0 +1,186 @@ +# +# Copyright (C) 2018 Jeffery To +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +ifeq ($(origin GO_INCLUDE_DIR),undefined) + GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST))) +endif + +include $(GO_INCLUDE_DIR)/golang-values.mk + + +# $(1) valid GOOS_GOARCH combinations +# $(2) go version id +define GoCompiler/Default/CheckHost + $(if $(filter $(GO_HOST_OS_ARCH),$(1)),,$(error go-$(2) cannot be installed on $(GO_HOST_OS)/$(GO_HOST_ARCH))) +endef + +# $(1) source go root +# $(2) destination prefix +# $(3) go version id +# $(4) additional environment variables (optional) +define GoCompiler/Default/Make + ( \ + cd $(1)/src ; \ + $(if $(2),GOROOT_FINAL=$(2)/lib/go-$(3)) \ + $(4) \ + $(BASH) make.bash --no-banner ; \ + ) +endef + +# $(1) destination prefix +# $(2) go version id +define GoCompiler/Default/Install/make-dirs + $(INSTALL_DIR) $(1)/lib/go-$(2) + $(INSTALL_DIR) $(1)/share/go-$(2) +endef + +# $(1) source go root +# $(2) destination prefix +# $(3) go version id +# $(4) file/directory name +define GoCompiler/Default/Install/install-share-data + $(CP) $(1)/$(4) $(2)/share/go-$(3)/ + $(LN) ../../share/go-$(3)/$(4) $(2)/lib/go-$(3)/ +endef + +# $(1) source go root +# $(2) destination prefix +# $(3) go version id +# $(4) GOOS_GOARCH +define GoCompiler/Default/Install/Bin + $(call GoCompiler/Default/Install/make-dirs,$(2),$(3)) + + $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),api) + + $(INSTALL_DATA) -p $(1)/VERSION $(2)/lib/go-$(3)/ + + for file in AUTHORS CONTRIBUTING.md CONTRIBUTORS LICENSE PATENTS README README.md; do \ + if [ -f $(1)/$$$$file ]; then \ + $(INSTALL_DATA) -p $(1)/$$$$file $(2)/share/go-$(3)/ ; \ + fi ; \ + done + + $(INSTALL_DIR) $(2)/lib/go-$(3)/bin + + ifeq ($(4),$(GO_HOST_OS_ARCH)) + $(INSTALL_BIN) -p $(1)/bin/* $(2)/lib/go-$(3)/bin/ + else + $(INSTALL_BIN) -p $(1)/bin/$(4)/* $(2)/lib/go-$(3)/bin/ + endif + + $(INSTALL_DIR) $(2)/lib/go-$(3)/pkg + $(CP) $(1)/pkg/$(4) $(2)/lib/go-$(3)/pkg/ + + $(INSTALL_DIR) $(2)/lib/go-$(3)/pkg/tool/$(4) + $(INSTALL_BIN) -p $(1)/pkg/tool/$(4)/* $(2)/lib/go-$(3)/pkg/tool/$(4)/ +endef + +# $(1) destination prefix +# $(2) go version id +define GoCompiler/Default/Install/BinLinks + $(INSTALL_DIR) $(1)/bin + $(LN) ../lib/go-$(2)/bin/go $(1)/bin/go + $(LN) ../lib/go-$(2)/bin/gofmt $(1)/bin/gofmt +endef + +# $(1) source go root +# $(2) destination prefix +# $(3) go version id +define GoCompiler/Default/Install/Doc + $(call GoCompiler/Default/Install/make-dirs,$(2),$(3)) + + $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),doc) + $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),favicon.ico) + $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),robots.txt) +endef + +# $(1) source go root +# $(2) destination prefix +# $(3) go version id +define GoCompiler/Default/Install/Src + $(call GoCompiler/Default/Install/make-dirs,$(2),$(3)) + + $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),lib) + $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),misc) + $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),src) + $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),test) + + $(FIND) \ + $(2)/share/go-$(3)/src/ \ + \! -type d -a \( -name '*.bat' -o -name '*.rc' \) \ + -delete + + if [ -d $(1)/pkg/include ]; then \ + $(INSTALL_DIR) $(2)/lib/go-$(3)/pkg ; \ + $(INSTALL_DIR) $(2)/share/go-$(3)/pkg ; \ + $(CP) $(1)/pkg/include $(2)/share/go-$(3)/pkg/ ; \ + $(LN) ../../../share/go-$(3)/pkg/include $(2)/lib/go-$(3)/pkg/ ; \ + fi +endef + +# $(1) destination prefix +# $(2) go version id +define GoCompiler/Default/Uninstall + rm -rf $(1)/lib/go-$(2) + rm -rf $(1)/share/go-$(2) +endef + +# $(1) destination prefix +define GoCompiler/Default/Uninstall/BinLinks + rm -f $(1)/bin/go + rm -f $(1)/bin/gofmt +endef + + +# $(1) profile name +# $(2) source go root +# $(3) destination prefix +# $(4) go version id +# $(5) GOOS_GOARCH +define GoCompiler/AddProfile + + # $$(1) valid GOOS_GOARCH combinations + define GoCompiler/$(1)/CheckHost + $$(call GoCompiler/Default/CheckHost,$$(1),$(4)) + endef + + # $$(1) additional environment variables (optional) + define GoCompiler/$(1)/Make + $$(call GoCompiler/Default/Make,$(2),$(3),$(4),$$(1)) + endef + + # $$(1) override install prefix (optional) + define GoCompiler/$(1)/Install/Bin + $$(call GoCompiler/Default/Install/Bin,$(2),$$(or $$(1),$(3)),$(4),$(5)) + endef + + # $$(1) override install prefix (optional) + define GoCompiler/$(1)/Install/BinLinks + $$(call GoCompiler/Default/Install/BinLinks,$$(or $$(1),$(3)),$(4)) + endef + + # $$(1) override install prefix (optional) + define GoCompiler/$(1)/Install/Doc + $$(call GoCompiler/Default/Install/Doc,$(2),$$(or $$(1),$(3)),$(4)) + endef + + # $$(1) override install prefix (optional) + define GoCompiler/$(1)/Install/Src + $$(call GoCompiler/Default/Install/Src,$(2),$$(or $$(1),$(3)),$(4)) + endef + + # $$(1) override install prefix (optional) + define GoCompiler/$(1)/Uninstall + $$(call GoCompiler/Default/Uninstall,$$(or $$(1),$(3)),$(4)) + endef + + # $$(1) override install prefix (optional) + define GoCompiler/$(1)/Uninstall/BinLinks + $$(call GoCompiler/Default/Uninstall/BinLinks,$$(or $$(1),$(3))) + endef + +endef diff --git a/lang/golang/golang-package.mk b/lang/golang/golang-package.mk new file mode 100644 index 00000000..3c4aeab1 --- /dev/null +++ b/lang/golang/golang-package.mk @@ -0,0 +1,305 @@ +# +# Copyright (C) 2018 Jeffery To +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +ifeq ($(origin GO_INCLUDE_DIR),undefined) + GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST))) +endif + +include $(GO_INCLUDE_DIR)/golang-values.mk + + +# Variables (all optional, except GO_PKG) to be set in package +# Makefiles: +# +# GO_PKG (required) - name of Go package +# +# Go name of the package. +# +# e.g. GO_PKG:=golang.org/x/text +# +# +# GO_PKG_INSTALL_EXTRA - list of regular expressions, default empty +# +# Additional files/directories to install. By default, only these +# files are installed: +# +# * Files with one of these extensions: +# .go, .c, .cc, .h, .hh, .proto, .s +# +# * Files in any 'testdata' directory +# +# e.g. GO_PKG_INSTALL_EXTRA:=example.toml marshal_test.toml +# +# +# GO_PKG_INSTALL_ALL - boolean (0 or 1), default false +# +# If true, install all files regardless of extension or directory. +# +# e.g. GO_PKG_INSTALL_ALL:=1 +# +# +# GO_PKG_SOURCE_ONLY - boolean (0 or 1), default false +# +# If true, 'go install' will not be called. If the package does not +# (or should not) build any binaries, then specifying this option will +# save build time. +# +# e.g. GO_PKG_SOURCE_ONLY:=1 +# +# +# GO_PKG_BUILD_PKG - list of build targets, default GO_PKG/... +# +# Build targets for compiling this Go package, i.e. arguments passed +# to 'go install' +# +# e.g. GO_PKG_BUILD_PKG:=github.com/debian/ratt/cmd/... +# +# +# GO_PKG_EXCLUDES - list of regular expressions, default empty +# +# Patterns to exclude from the build targets expanded from +# GO_PKG_BUILD_PKG. +# +# e.g. GO_PKG_EXCLUDES:=examples/ +# +# +# GO_PKG_GO_GENERATE - boolean (0 or 1), default false +# +# If true, 'go generate' will be called on all build targets (as +# determined by GO_PKG_BUILD_PKG and GO_PKG_EXCLUDES). This is usually +# not necessary. +# +# e.g. GO_PKG_GO_GENERATE:=1 + +# Credit for this package build process (GoPackage/Build/Configure and +# GoPackage/Build/Compile) belong to Debian's dh-golang completely. +# https://anonscm.debian.org/cgit/pkg-go/packages/dh-golang.git + + +# for building packages, not user code +GO_PKG_PATH:=/usr/share/gocode + +GO_PKG_BUILD_PKG?=$(GO_PKG)/... + +GO_PKG_WORK_DIR_NAME:=.go_work +GO_PKG_WORK_DIR:=$(PKG_BUILD_DIR)/$(GO_PKG_WORK_DIR_NAME) + +GO_PKG_BUILD_DIR:=$(GO_PKG_WORK_DIR)/build +GO_PKG_CACHE_DIR:=$(GO_PKG_WORK_DIR)/cache +GO_PKG_TMP_DIR:=$(GO_PKG_WORK_DIR)/tmp + +GO_PKG_BUILD_BIN_DIR:=$(GO_PKG_BUILD_DIR)/bin$(if \ + $(GO_HOST_TARGET_DIFFERENT),/$(GO_OS)_$(GO_ARCH)) + +GO_PKG_BUILD_DEPENDS_SRC:=$(STAGING_DIR)$(GO_PKG_PATH)/src + +# sstrip causes corrupted section header size +ifneq ($(CONFIG_USE_SSTRIP),) + ifneq ($(CONFIG_DEBUG),) + GO_PKG_STRIP_ARGS:=--strip-unneeded --remove-section=.comment --remove-section=.note + else + GO_PKG_STRIP_ARGS:=--strip-all + endif + STRIP:=$(TARGET_CROSS)strip $(GO_PKG_STRIP_ARGS) + RSTRIP= \ + export CROSS="$(TARGET_CROSS)" \ + $(if $(PKG_BUILD_ID),KEEP_BUILD_ID=1) \ + $(if $(CONFIG_KERNEL_KALLSYMS),NO_RENAME=1) \ + $(if $(CONFIG_KERNEL_PROFILING),KEEP_SYMBOLS=1); \ + NM="$(TARGET_CROSS)nm" \ + STRIP="$(STRIP)" \ + STRIP_KMOD="$(SCRIPT_DIR)/strip-kmod.sh" \ + PATCHELF="$(STAGING_DIR_HOST)/bin/patchelf" \ + $(SCRIPT_DIR)/rstrip.sh +endif + +define GoPackage/GoSubMenu + SUBMENU:=Go + SECTION:=lang + CATEGORY:=Languages +endef + +define GoPackage/Environment + GOOS=$(GO_OS) \ + GOARCH=$(GO_ARCH) \ + GO386=$(GO_386) \ + GOARM=$(GO_ARM) \ + GOMIPS=$(GO_MIPS) \ + CGO_ENABLED=1 \ + CGO_CFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CFLAGS))" \ + CGO_CPPFLAGS="$(TARGET_CPPFLAGS)" \ + CGO_CXXFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CXXFLAGS))" +endef + +# false if directory does not exist +GoPackage/is_dir_not_empty=$$$$($(FIND) $(1) -maxdepth 0 -type d \! -empty 2>/dev/null) + +GoPackage/has_binaries=$(call GoPackage/is_dir_not_empty,$(GO_PKG_BUILD_BIN_DIR)) + +define GoPackage/Build/Configure + ( \ + cd $(PKG_BUILD_DIR) ; \ + mkdir -p $(GO_PKG_BUILD_DIR)/bin $(GO_PKG_BUILD_DIR)/src \ + $(GO_PKG_CACHE_DIR) $(GO_PKG_TMP_DIR) ; \ + \ + files=$$$$($(FIND) ./ \ + -type d -a \( -path './.git' -o -path './$(GO_PKG_WORK_DIR_NAME)' \) -prune -o \ + \! -type d -print | \ + sed 's|^\./||') ; \ + \ + if [ "$(GO_PKG_INSTALL_ALL)" != 1 ]; then \ + code=$$$$(echo "$$$$files" | grep '\.\(c\|cc\|go\|h\|hh\|proto\|s\)$$$$') ; \ + testdata=$$$$(echo "$$$$files" | grep '\(^\|/\)testdata/') ; \ + \ + for pattern in $(GO_PKG_INSTALL_EXTRA); do \ + extra=$$$$(echo "$$$$extra"; echo "$$$$files" | grep "$$$$pattern") ; \ + done ; \ + \ + files=$$$$(echo "$$$$code"; echo "$$$$testdata"; echo "$$$$extra") ; \ + files=$$$$(echo "$$$$files" | grep -v '^[[:space:]]*$$$$' | sort -u) ; \ + fi ; \ + \ + echo "Copying files from $(PKG_BUILD_DIR) into $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)" ; \ + for file in $$$$files; do \ + echo $$$$file ; \ + dest=$(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/$$$$file ; \ + mkdir -p $$$$(dirname $$$$dest) ; \ + $(CP) $$$$file $$$$dest ; \ + done ; \ + \ + link_contents() { \ + local src=$$$$1 ; \ + local dest=$$$$2 ; \ + local dirs dir base ; \ + \ + if [ -n "$$$$($(FIND) $$$$src -mindepth 1 -maxdepth 1 -name '*.go' \! -type d)" ]; then \ + echo "$$$$src is already a Go library" ; \ + return 1 ; \ + fi ; \ + \ + dirs=$$$$($(FIND) $$$$src -mindepth 1 -maxdepth 1 -type d) ; \ + for dir in $$$$dirs; do \ + base=$$$$(basename $$$$dir) ; \ + if [ -d $$$$dest/$$$$base ]; then \ + case $$$$dir in \ + *$(GO_PKG_PATH)/src/$(GO_PKG)) \ + echo "$(GO_PKG) is already installed. Please check for circular dependencies." ;; \ + *) \ + link_contents $$$$src/$$$$base $$$$dest/$$$$base ;; \ + esac ; \ + else \ + echo "...$$$${src#$(GO_PKG_BUILD_DEPENDS_SRC)}/$$$$base" ; \ + $(LN) $$$$src/$$$$base $$$$dest/$$$$base ; \ + fi ; \ + done ; \ + } ; \ + \ + if [ "$(GO_PKG_SOURCE_ONLY)" != 1 ]; then \ + if [ -d $(GO_PKG_BUILD_DEPENDS_SRC) ]; then \ + echo "Symlinking directories from $(GO_PKG_BUILD_DEPENDS_SRC) into $(GO_PKG_BUILD_DIR)/src" ; \ + link_contents $(GO_PKG_BUILD_DEPENDS_SRC) $(GO_PKG_BUILD_DIR)/src ; \ + else \ + echo "$(GO_PKG_BUILD_DEPENDS_SRC) does not exist, skipping symlinks" ; \ + fi ; \ + else \ + echo "Not building binaries, skipping symlinks" ; \ + fi ; \ + ) +endef + +# $(1) additional arguments for go command line (optional) +define GoPackage/Build/Compile + ( \ + cd $(GO_PKG_BUILD_DIR) ; \ + export GOPATH=$(GO_PKG_BUILD_DIR) \ + GOCACHE=$(GO_PKG_CACHE_DIR) \ + GOTMPDIR=$(GO_PKG_TMP_DIR) \ + GOROOT_FINAL=$(GO_TARGET_ROOT) \ + CC=$(TARGET_CC) \ + CXX=$(TARGET_CXX) \ + $(call GoPackage/Environment) ; \ + \ + targets=$$$$(go list $(GO_PKG_BUILD_PKG)) ; \ + for pattern in $(GO_PKG_EXCLUDES); do \ + targets=$$$$(echo "$$$$targets" | grep -v "$$$$pattern") ; \ + done ; \ + \ + if [ "$(GO_PKG_GO_GENERATE)" = 1 ]; then \ + go generate -v $(1) $$$$targets ; \ + fi ; \ + \ + if [ "$(GO_PKG_SOURCE_ONLY)" != 1 ]; then \ + case $(GO_ARCH) in \ + arm) installsuffix="-installsuffix v$(GO_ARM)" ;; \ + mips|mipsle) installsuffix="-installsuffix $(GO_MIPS)" ;; \ + esac ; \ + trimpath="all=-trimpath=$(GO_PKG_BUILD_DIR)" ; \ + ldflags="all=-linkmode external -extldflags '$(TARGET_LDFLAGS)'" ; \ + go install \ + $$$$installsuffix \ + -gcflags "$$$$trimpath" \ + -asmflags "$$$$trimpath" \ + -ldflags "$$$$ldflags" \ + -v \ + $(1) \ + $$$$targets ; \ + retval=$$$$? ; \ + \ + if [ "$$$$retval" -eq 0 ] && [ -z "$(call GoPackage/has_binaries)" ]; then \ + echo "No binaries were generated, consider adding GO_PKG_SOURCE_ONLY:=1 to Makefile" ; \ + fi ; \ + fi ; \ + exit $$$$retval ; \ + ) +endef + +define GoPackage/Build/InstallDev + $(call GoPackage/Package/Install/Src,$(1)) +endef + +define GoPackage/Package/Install/Bin + if [ -n "$(call GoPackage/has_binaries)" ]; then \ + $(INSTALL_DIR) $(1)/usr/bin ; \ + $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/* $(1)/usr/bin/ ; \ + fi +endef + +define GoPackage/Package/Install/Src + dir=$$$$(dirname $(GO_PKG)) ; \ + $(INSTALL_DIR) $(1)$(GO_PKG_PATH)/src/$$$$dir ; \ + $(CP) $(GO_PKG_BUILD_DIR)/src/$(GO_PKG) $(1)$(GO_PKG_PATH)/src/$$$$dir/ +endef + +define GoPackage/Package/Install + $(call GoPackage/Package/Install/Bin,$(1)) + $(call GoPackage/Package/Install/Src,$(1)) +endef + + +ifneq ($(GO_PKG),) + Build/Configure=$(call GoPackage/Build/Configure) + Build/Compile=$(call GoPackage/Build/Compile) + Build/InstallDev=$(call GoPackage/Build/InstallDev,$(1)) +endif + +define GoPackage + ifndef Package/$(1)/install + Package/$(1)/install=$$(call GoPackage/Package/Install,$$(1)) + endif +endef + +define GoBinPackage + ifndef Package/$(1)/install + Package/$(1)/install=$$(call GoPackage/Package/Install/Bin,$$(1)) + endif +endef + +define GoSrcPackage + ifndef Package/$(1)/install + Package/$(1)/install=$$(call GoPackage/Package/Install/Src,$$(1)) + endif +endef diff --git a/lang/golang/golang-values.mk b/lang/golang/golang-values.mk new file mode 100644 index 00000000..13763e36 --- /dev/null +++ b/lang/golang/golang-values.mk @@ -0,0 +1,72 @@ +# +# Copyright (C) 2018 Jeffery To +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +ifeq ($(origin GO_INCLUDE_DIR),undefined) + GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST))) +endif + +include $(GO_INCLUDE_DIR)/golang-version.mk + + +unexport \ + GOARCH GOBIN GOCACHE GODEBUG GOHOSTARCH GOOS GOPATH GORACE GOROOT GOTMPDIR GCCGO \ + CGO_ENABLED \ + CGO_CFLAGS CGO_CFLAGS_ALLOW CGO_CFLAGS_DISALLOW \ + CGO_CPPFLAGS CGO_CPPFLAGS_ALLOW CGO_CPPFLAGS_DISALLOW \ + CGO_CXXFLAGS CGO_CXXFLAGS_ALLOW CGO_CXXFLAGS_DISALLOW \ + CGO_FFLAGS CGO_FFLAGS_ALLOW CGO_FFLAGS_DISALLOW \ + CGO_LDFLAGS CGO_LDFLAGS_ALLOW CGO_LDFLAGS_DISALLOW \ + GOARM GO386 GOMIPS \ + GOROOT_FINAL GO_EXTLINK_ENABLED GIT_ALLOW_PROTOCOL \ + CC_FOR_TARGET CXX_FOR_TARGET GO_DISTFLAGS GO_GCFLAGS GO_LDFLAGS GOBUILDTIMELOGFILE GOROOT_BOOTSTRAP \ + BOOT_GO_GCFLAGS GOEXPERIMENT GOBOOTSTRAP_TOOLEXEC + # there are more magic environment variables to track down, but ain't nobody got time for that + +go_arch=$(subst \ + aarch64,arm64,$(subst \ + i386,386,$(subst \ + mipsel,mipsle,$(subst \ + mips64el,mips64le,$(subst \ + powerpc64,ppc64,$(subst \ + x86_64,amd64,$(1))))))) + +GO_OS:=linux +GO_ARCH:=$(call go_arch,$(ARCH)) +GO_OS_ARCH:=$(GO_OS)_$(GO_ARCH) + +GO_HOST_OS:=$(call tolower,$(HOST_OS)) +GO_HOST_ARCH:=$(call go_arch,$(subst \ + armv6l,arm,$(subst \ + armv7l,arm,$(subst \ + i486,i386,$(subst \ + i586,i386,$(subst \ + i686,i386,$(HOST_ARCH))))))) +GO_HOST_OS_ARCH:=$(GO_HOST_OS)_$(GO_HOST_ARCH) + +GO_HOST_TARGET_SAME:=$(if $(and $(findstring $(GO_OS_ARCH),$(GO_HOST_OS_ARCH)),$(findstring $(GO_HOST_OS_ARCH),$(GO_OS_ARCH))),1) +GO_HOST_TARGET_DIFFERENT:=$(if $(GO_HOST_TARGET_SAME),,1) + +# ensure binaries can run on older CPUs +GO_386:=387 + +GO_ARM:=$(if $(CONFIG_arm_v7),7,$(if $(CONFIG_arm_v6),6,$(if $(findstring $(GO_ARCH),arm),5,))) + +GO_MIPS:=$(if $(filter $(GO_ARCH),mips mipsle),$(if $(CONFIG_HAS_FPU),hardfloat,softfloat),) + +# -fno-plt: causes "unexpected GOT reloc for non-dynamic symbol" errors +# -mips32r2: conflicts with -march=mips32 set by go +GO_CFLAGS_TO_REMOVE:=$(if \ +$(filter $(GO_ARCH),386),-fno-plt,$(if \ +$(filter $(GO_ARCH),mips mipsle),-mips32r2,)) + +# mips64 / mips64el doesn't have softfloat support yet +# https://github.com/golang/go/issues/14635 +GO_ARCH_DEPENDS:=@(aarch64||arm||i386||i686||mips||mipsel||powerpc64||x86_64) + +GO_TARGET_PREFIX:=/usr +GO_TARGET_VERSION_ID:=$(GO_VERSION_MAJOR_MINOR) +GO_TARGET_ROOT:=$(GO_TARGET_PREFIX)/lib/go-$(GO_TARGET_VERSION_ID) diff --git a/lang/golang/golang-version.mk b/lang/golang/golang-version.mk new file mode 100644 index 00000000..27184b7d --- /dev/null +++ b/lang/golang/golang-version.mk @@ -0,0 +1,14 @@ +# +# Copyright (C) 2018 Jeffery To +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +ifeq ($(origin GO_INCLUDE_DIR),undefined) + GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST))) +endif + + +GO_VERSION_MAJOR_MINOR:=1.10 +GO_VERSION_PATCH:=3 diff --git a/lang/golang/golang/Makefile b/lang/golang/golang/Makefile new file mode 100644 index 00000000..898b1db9 --- /dev/null +++ b/lang/golang/golang/Makefile @@ -0,0 +1,272 @@ +# +# Copyright (C) 2018 Jeffery To +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include ../golang-version.mk + +PKG_NAME:=golang +PKG_VERSION:=$(GO_VERSION_MAJOR_MINOR)$(if $(GO_VERSION_PATCH),.$(GO_VERSION_PATCH)) +PKG_RELEASE:=2 + +GO_SOURCE_URLS:=https://dl.google.com/go/ \ + https://mirrors.ustc.edu.cn/golang/ \ + https://mirrors.nju.edu.cn/golang/ + +PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz +PKG_SOURCE_URL:=$(GO_SOURCE_URLS) +PKG_HASH:=567b1cc66c9704d1c019c50bef946272e911ec6baf244310f87f4e678be155f2 + +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Jeffery To + +PKG_BUILD_DEPENDS:=golang/host +PKG_BUILD_DIR:=$(BUILD_DIR)/go-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 + +PKG_GO_WORK_DIR:=$(PKG_BUILD_DIR)/.go_work +PKG_GO_HOST_CACHE_DIR:=$(PKG_GO_WORK_DIR)/host_cache +PKG_GO_TARGET_CACHE_DIR:=$(PKG_GO_WORK_DIR)/target_cache +PKG_GO_TMP_DIR:=$(PKG_GO_WORK_DIR)/tmp + +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/go-$(PKG_VERSION) +HOST_BUILD_PARALLEL:=1 + +HOST_GO_PREFIX:=$(STAGING_DIR_HOSTPKG) +HOST_GO_VERSION_ID:=cross +HOST_GO_ROOT:=$(HOST_GO_PREFIX)/lib/go-$(HOST_GO_VERSION_ID) + +HOST_GO_VALID_OS_ARCH:= \ + android_arm \ + darwin_386 darwin_amd64 darwin_arm darwin_arm64 \ + dragonfly_amd64 \ + freebsd_386 freebsd_amd64 freebsd_arm \ + linux_386 linux_amd64 linux_arm linux_arm64 \ + netbsd_386 netbsd_amd64 netbsd_arm \ + openbsd_386 openbsd_amd64 openbsd_arm \ + plan9_386 plan9_amd64 \ + solaris_amd64 \ + windows_386 windows_amd64 \ + \ + linux_ppc64 linux_ppc64le linux_mips linux_mipsle linux_mips64 linux_mips64le + +BOOTSTRAP_SOURCE:=go1.4-bootstrap-20171003.tar.gz +BOOTSTRAP_SOURCE_URL:=$(GO_SOURCE_URLS) +BOOTSTRAP_HASH:=f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52 + +BOOTSTRAP_BUILD_DIR:=$(HOST_BUILD_DIR)/.go_bootstrap + +BOOTSTRAP_GO_VALID_OS_ARCH:= \ + darwin_386 darwin_amd64 \ + dragonfly_386 dragonfly_amd64 \ + freebsd_386 freebsd_amd64 freebsd_arm \ + linux_386 linux_amd64 linux_arm \ + netbsd_386 netbsd_amd64 netbsd_arm \ + openbsd_386 openbsd_amd64 \ + plan9_386 plan9_amd64 \ + solaris_amd64 \ + windows_386 windows_amd64 + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk +include ../golang-compiler.mk +include ../golang-package.mk + +PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +HOST_UNPACK:=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +BOOTSTRAP_UNPACK:=$(HOST_TAR) -C $(BOOTSTRAP_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(BOOTSTRAP_SOURCE) + +# don't strip ELF executables in test data (and go itself) +RSTRIP:=: +STRIP:=: + +define Package/golang/Default +$(call GoPackage/GoSubMenu) + TITLE:=Go programming language + URL:=https://golang.org/ + DEPENDS:=$(GO_ARCH_DEPENDS) +endef + +define Package/golang/Default/description +The Go programming language is an open source project to make +programmers more productive. + +Go is expressive, concise, clean, and efficient. Its concurrency +mechanisms make it easy to write programs that get the most out of +multicore and networked machines, while its novel type system enables +flexible and modular program construction. Go compiles quickly to +machine code yet has the convenience of garbage collection and the power +of run-time reflection. It's a fast, statically typed, compiled language +that feels like a dynamically typed, interpreted language. +endef + +# go tool requires source present: +# https://github.com/golang/go/issues/4635 +define Package/golang +$(call Package/golang/Default) + TITLE+= (compiler) + DEPENDS+= +golang-src +endef + +define Package/golang/description +$(call Package/golang/Default/description) + +This package provides an assembler, compiler, linker, and compiled +libraries for the Go programming language. +endef + +define Package/golang-doc +$(call Package/golang/Default) + TITLE+= (documentation) +endef + +define Package/golang-doc/description +$(call Package/golang/Default/description) + +This package provides the documentation for the Go programming language. +endef + +define Package/golang-src +$(call Package/golang/Default) + TITLE+= (source files) +endef + +define Package/golang-src/description +$(call Package/golang/Default/description) + +This package provides the Go programming language source files needed +for cross-compilation. +endef + +define Download/golang-bootstrap + FILE:=$(BOOTSTRAP_SOURCE) + URL:=$(BOOTSTRAP_SOURCE_URL) + HASH:=$(BOOTSTRAP_HASH) +endef +$(eval $(call Download,golang-bootstrap)) + +$(eval $(call GoCompiler/AddProfile,Bootstrap,$(BOOTSTRAP_BUILD_DIR),,bootstrap,$(GO_HOST_OS_ARCH))) +$(eval $(call GoCompiler/AddProfile,Host,$(HOST_BUILD_DIR),$(HOST_GO_PREFIX),$(HOST_GO_VERSION_ID),$(GO_HOST_OS_ARCH))) +$(eval $(call GoCompiler/AddProfile,Package,$(PKG_BUILD_DIR),$(GO_TARGET_PREFIX),$(GO_TARGET_VERSION_ID),$(GO_OS_ARCH))) + +define Host/Prepare + $(call Host/Prepare/Default) + mkdir -p $(BOOTSTRAP_BUILD_DIR) + $(BOOTSTRAP_UNPACK) +endef + +define Host/Compile + $(call GoCompiler/Bootstrap/CheckHost,$(BOOTSTRAP_GO_VALID_OS_ARCH)) + $(call GoCompiler/Host/CheckHost,$(HOST_GO_VALID_OS_ARCH)) + + $(call GoCompiler/Bootstrap/Make, \ + CC=$(HOSTCC_NOCACHE) \ + CXX=$(HOSTCXX_NOCACHE) \ + ) + + $(call GoCompiler/Host/Make, \ + GOROOT_BOOTSTRAP=$(BOOTSTRAP_BUILD_DIR) \ + CC=$(HOSTCC_NOCACHE) \ + CXX=$(HOSTCXX_NOCACHE) \ + ) +endef + +# if host and target os/arch are the same, +# when go compiles a program, it will use the host std lib +# so remove it now and force go to rebuild std for target later +define Host/Install + $(call GoCompiler/Host/Install/Bin,) + $(call GoCompiler/Host/Install/Src,) + + $(call GoCompiler/Host/Install/BinLinks,) + + rm -rf $(HOST_GO_ROOT)/pkg/$(GO_HOST_OS_ARCH) + + $(INSTALL_DIR) $(HOST_GO_ROOT)/openwrt + $(INSTALL_BIN) ./files/go-gcc-helper $(HOST_GO_ROOT)/openwrt/ + $(LN) go-gcc-helper $(HOST_GO_ROOT)/openwrt/gcc + $(LN) go-gcc-helper $(HOST_GO_ROOT)/openwrt/g++ +endef + +define Host/Uninstall + rm -rf $(HOST_GO_ROOT)/openwrt + + $(call GoCompiler/Host/Uninstall/BinLinks,) + + $(call GoCompiler/Host/Uninstall,) +endef + +define Build/Compile + mkdir -p \ + $(PKG_GO_HOST_CACHE_DIR) \ + $(PKG_GO_TARGET_CACHE_DIR) \ + $(PKG_GO_TMP_DIR) + + @echo "Building target Go first stage" + + $(call GoCompiler/Package/Make, \ + GOROOT_BOOTSTRAP=$(HOST_GO_ROOT) \ + GOCACHE=$(PKG_GO_HOST_CACHE_DIR) \ + GOTMPDIR=$(PKG_GO_TMP_DIR) \ + GO_GCC_HELPER_CC="$(HOSTCC)" \ + GO_GCC_HELPER_CXX="$(HOSTCXX)" \ + GO_GCC_HELPER_PATH=$$$$PATH \ + CC=gcc \ + CXX=g++ \ + PKG_CONFIG=pkg-config \ + PATH=$(HOST_GO_ROOT)/openwrt:$$$$PATH \ + ) + + @echo "Building target Go second stage" + + ( \ + cd $(PKG_BUILD_DIR)/bin ; \ + $(CP) go go-host ; \ + GOROOT_FINAL=$(GO_TARGET_ROOT) \ + GOCACHE=$(PKG_GO_TARGET_CACHE_DIR) \ + GOTMPDIR=$(PKG_GO_TMP_DIR) \ + GO_GCC_HELPER_CC="$(TARGET_CC)" \ + GO_GCC_HELPER_CXX="$(TARGET_CXX)" \ + GO_GCC_HELPER_PATH=$$$$PATH \ + CC=gcc \ + CXX=g++ \ + PKG_CONFIG=pkg-config \ + PATH=$(HOST_GO_ROOT)/openwrt:$$$$PATH \ + $(call GoPackage/Environment) \ + ./go-host install -a -v std cmd ; \ + retval=$$$$? ; \ + rm -f go-host ; \ + exit $$$$retval ; \ + ) +endef + +define Package/golang/install + $(call GoCompiler/Package/Install/Bin,$(1)$(GO_TARGET_PREFIX)) + $(call GoCompiler/Package/Install/BinLinks,$(1)$(GO_TARGET_PREFIX)) +endef + +define Package/golang-doc/install + $(call GoCompiler/Package/Install/Doc,$(1)$(GO_TARGET_PREFIX)) +endef + +define Package/golang-src/install + $(call GoCompiler/Package/Install/Src,$(1)$(GO_TARGET_PREFIX)) +endef + +# src/debug contains ELF executables as test data +# and they reference these libraries +# we need to call this in Package/$(1)/extra_provides +# to pass CheckDependencies in include/package-ipkg.mk +define Package/golang-src/extra_provides + echo 'libc.so.6' +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,golang)) +$(eval $(call BuildPackage,golang-doc)) +$(eval $(call BuildPackage,golang-src)) diff --git a/lang/golang/golang/files/go-gcc-helper b/lang/golang/golang/files/go-gcc-helper new file mode 100644 index 00000000..3d3f8935 --- /dev/null +++ b/lang/golang/golang/files/go-gcc-helper @@ -0,0 +1,23 @@ +#!/bin/sh + +me=go-gcc-helper +name=$(basename $0) + +case $name in +gcc) + cmd=$GO_GCC_HELPER_CC + ;; +g++) + cmd=$GO_GCC_HELPER_CXX + ;; +*) + echo "$me: unknown command \"$name\"" + exit 1 + ;; +esac + +export PATH="$GO_GCC_HELPER_PATH" + +echo "$me: running $cmd $@" + +$cmd "$@" diff --git a/lang/jamvm/Makefile b/lang/jamvm/Makefile new file mode 100644 index 00000000..e074cb3c --- /dev/null +++ b/lang/jamvm/Makefile @@ -0,0 +1,67 @@ +# +# Copyright (C) 2006-2015 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:=jamvm +PKG_VERSION:=2.0.0 +PKG_RELEASE:=2 +PKG_LICENSE:=GPL-2.0+ +PKG_MAINTAINER:=Dana H. Myers + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_HASH:=76428e96df0ae9dd964c7a7c74c1e9a837e2f312c39e9a357fa8178f7eff80da + +PKG_USE_MIPS16:=0 + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/jamvm + SUBMENU:=Java + SECTION:=lang + CATEGORY:=Languages + TITLE:=A compact Java Virtual Machine + URL:=http://sourceforge.net/projects/jamvm + DEPENDS:=+zlib +libpthread +librt +classpath @!avr32 +endef + +define Package/jamvm/description + JamVM is a new Java Virtual Machine which conforms to the JVM + specification version (blue book). In comparison to most other VM's (free + and commercial) it is extremely small.However, unlike other small VMs + (e.g. KVM) it is designed to support the full specification, and includes + support for object finalisation, Soft/Weak/Phantom References, the Java + Native Interface (JNI) and the Reflection API. +endef + +CONFIGURE_ARGS += \ + --with-java-runtime-library=gnuclasspath \ + --with-classpath-install-dir=/usr \ + --disable-int-inlining \ + --disable-shared \ + --without-pic + +MAKE_FLAGS += \ + GLIBJ_ZIP=$(STAGING_DIR)/usr/share/classpath/glibj.zip + +define Package/jamvm/install + $(INSTALL_DIR) $(1)/usr + $(CP) \ + $(PKG_INSTALL_DIR)/usr/bin \ + $(PKG_INSTALL_DIR)/usr/share \ + $(1)/usr/ +endef + +define Build/InstallDev + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +$(eval $(call BuildPackage,jamvm)) diff --git a/lang/jamvm/patches/001-Use-fenv.h-instead-of-fpu_control.h.patch b/lang/jamvm/patches/001-Use-fenv.h-instead-of-fpu_control.h.patch new file mode 100644 index 00000000..50f95cde --- /dev/null +++ b/lang/jamvm/patches/001-Use-fenv.h-instead-of-fpu_control.h.patch @@ -0,0 +1,86 @@ +From 7152ded5219453c9ff1cd062cecbeaf4d77e4cab Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 26 May 2016 15:05:48 +0200 +Subject: [PATCH] Use instead of + +musl libc (http://musl-libc.org lack the non-standard +header, which is used in src/os/linux/{i386,x86_64}/init.c files to +setup the floating point precision. This patch makes it use the +standard C header instead. + +Original patch at Felix Janda at +https://sourceforge.net/p/jamvm/patches/6/. + +Signed-off-by: Thomas Petazzoni +--- + src/os/linux/i386/init.c | 12 ++++++------ + src/os/linux/x86_64/init.c | 16 ++++++---------- + 2 files changed, 12 insertions(+), 16 deletions(-) + +diff --git a/src/os/linux/i386/init.c b/src/os/linux/i386/init.c +index d9c6648..94a733e 100644 +--- a/src/os/linux/i386/init.c ++++ b/src/os/linux/i386/init.c +@@ -19,18 +19,18 @@ + * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +-#include ++#include + + /* Change floating point precision to double (64-bit) from + * the extended (80-bit) Linux default. */ + + void setDoublePrecision() { +- fpu_control_t cw; ++ fenv_t fenv; + +- _FPU_GETCW(cw); +- cw &= ~_FPU_EXTENDED; +- cw |= _FPU_DOUBLE; +- _FPU_SETCW(cw); ++ fegetenv(&fenv); ++ fenv.__control_word &= ~0x300; /* _FPU_EXTENDED */ ++ fenv.__control_word |= 0x200; /* _FPU_DOUBLE */ ++ fesetenv(&fenv); + } + + void initialisePlatform() { +diff --git a/src/os/linux/x86_64/init.c b/src/os/linux/x86_64/init.c +index 9d55229..a76a923 100644 +--- a/src/os/linux/x86_64/init.c ++++ b/src/os/linux/x86_64/init.c +@@ -19,9 +19,7 @@ + * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +-#ifdef __linux__ +-#include +-#endif ++#include + + /* Change the x87 FPU precision to double (64-bit) from the extended + (80-bit) Linux default. Note, unlike on i386, my testcases pass +@@ -30,14 +28,12 @@ + */ + + void setDoublePrecision() { +-#ifdef __linux__ +- fpu_control_t cw; ++ fenv_t fenv; + +- _FPU_GETCW(cw); +- cw &= ~_FPU_EXTENDED; +- cw |= _FPU_DOUBLE; +- _FPU_SETCW(cw); +-#endif ++ fegetenv(&fenv); ++ fenv.__control_word &= ~0x300; /*_FPU_EXTENDED */ ++ fenv.__control_word |= 0x200; /*_FPU_DOUBLE */ ++ fesetenv(&fenv); + } + + void initialisePlatform() { +-- +2.7.4 + diff --git a/lang/json4lua/Makefile b/lang/json4lua/Makefile new file mode 100644 index 00000000..2e84fce5 --- /dev/null +++ b/lang/json4lua/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2006-2015 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:=json4lua +PKG_VERSION:=0.9.53 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_MIRROR_HASH:=61a9631784aa5d7dd8adfdfa149f0a45deaa4bf80b117e89722702c612afa081 +PKG_SOURCE_PROTO:=git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=https://github.com/amrhassan/json4lua.git +PKG_SOURCE_VERSION:=$(PKG_VERSION) + +PKG_MAINTAINER:=Amr Hassan +PKG_LICENSE=MIT + +LUA_MODULE_PATH:=/usr/lib/lua + +include $(INCLUDE_DIR)/package.mk + +define Package/json4lua + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=json4lua + URL:=https://github.com/amrhassan/json4lua + DEPENDS:=+lua +luasocket +endef + +define Package/json4lua/description + JSON and JSONRPC for Lua +endef + +define Build/Configure +endef + +define Build/Compile +endef + +define Package/json4lua/install + $(INSTALL_DIR) $(1)/$(LUA_MODULE_PATH)/json + $(INSTALL_DATA) $(PKG_BUILD_DIR)/json/json.lua $(1)/$(LUA_MODULE_PATH)/json.lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/json/rpc.lua $(1)/$(LUA_MODULE_PATH)/json/rpc.lua +endef + +$(eval $(call BuildPackage,json4lua)) diff --git a/lang/ldbus/Makefile b/lang/ldbus/Makefile new file mode 100644 index 00000000..a0500a64 --- /dev/null +++ b/lang/ldbus/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2006-2017 OpenWrt.org +# +# This is free software, licensed under the GPL 2 license. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ldbus +PKG_RELEASE:=2 +PKG_MIRROR_HASH:=0e39a80e126a77a937226e49ae0246e1fd4600a03dee6bdee5ac822963a234e1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=f4a1464e915a2313c80fb40c5c40b0bee7583677 +PKG_SOURCE_DATE:=2017-10-03 +PKG_SOURCE_URL=https://github.com/daurnimator/ldbus +PKG_MAINTAINER:=Enrico Mioso +PKG_LICENSE:=MIT + +PKG_BUILD_DEPENDS:=luarocks/host + +include $(INCLUDE_DIR)/package.mk + +define Package/ldbus + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=ldbus Lua DBus bindings + DEPENDS:=+dbus +lua +endef + +define Package/ldbus/description + This package contains "ldbus": LUA bindings to interact with the DBUS + message bus system, and services connected to it. + See https://github.com/daurnimator/ldbus + for details. +endef + +TARGET_CFLAGS += \ + -I$(STAGING_DIR)/usr/include + +MAKE_FLAGS += \ + FPIC="$(FPIC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" + +define Package/ldbus/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ldbus.so $(1)/usr/lib/lua +endef + +define Build/Compile + cd $(PKG_BUILD_DIR) && \ + luarocks make --pack-binary-rock ldbus-scm-0.rockspec \ + DBUS_INCDIR=$(STAGING_DIR)/usr/include/dbus-1.0/ \ + DBUS_ARCH_INCDIR=$(STAGING_DIR)/usr/lib/dbus-1.0/include \ + DBUS_LIBDIR=$(STAGING_DIR)/usr/lib \ + CC="$(TARGET_CC)" LD="$(TARGET_CC)" +endef + +$(eval $(call BuildPackage,ldbus)) diff --git a/lang/lpeg/Makefile b/lang/lpeg/Makefile new file mode 100644 index 00000000..03f8c765 --- /dev/null +++ b/lang/lpeg/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2015 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:=lpeg +PKG_VERSION:=0.12.2 +PKG_RELEASE:=2 +PKG_MAINTAINER:=Dirk Chang +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.inf.puc-rio.br/~roberto/lpeg/ +PKG_HASH:=6aad270b91d1b1c6fd75f68e162329a04a644e50e917d55f46cc8384b7120004 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/lpeg + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=LPeg + URL:=http://www.inf.puc-rio.br/~roberto/lpeg/ + DEPENDS:=+lua +endef + +define Package/lpeg/description + LPeg is a new pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs) +endef + +define Build/Configure +endef + +# add make variable overrides here +MAKE_FLAGS += \ + COPT="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -O2" + +define Package/lpeg/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lpeg.so $(1)/usr/lib/lua +endef + +$(eval $(call BuildPackage,lpeg)) diff --git a/lang/lua-bencode/Makefile b/lang/lua-bencode/Makefile new file mode 100644 index 00000000..a7b898bf --- /dev/null +++ b/lang/lua-bencode/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 20013-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:=lua-bencode +PKG_VERSION:=2.1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=https://bitbucket.org/wilhelmy/lua-bencode/downloads/ +PKG_HASH:=4624f33ff026bc62990a323ee4953e42d68430c38a1a4726c9cfd77c085b1422 +PKG_LICENSE:=MIT + +include $(INCLUDE_DIR)/package.mk + +define Package/lua-bencode + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=lua-bencode + URL:=https://bitbucket.org/wilhelmy/lua-bencode + MAINTAINER:=Lars Gierth + DEPENDS:=+lua +endef + +define Package/lua-bencode/description + This is a module for the lua programming language for decoding and encoding + bencoded data which can be used to read and write torrent files for bittorrent. +endef + +define Build/Configure +endef + +define Build/Compile +endef + + +define Package/lua-bencode/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/bencode.lua $(1)/usr/lib/lua +endef + +$(eval $(call BuildPackage,lua-bencode)) diff --git a/lang/lua-cjson/Makefile b/lang/lua-cjson/Makefile new file mode 100644 index 00000000..aea91a53 --- /dev/null +++ b/lang/lua-cjson/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2015 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:=lua-cjson +PKG_VERSION:=2.1.0 +PKG_RELEASE:=2 +PKG_MAINTAINER:=Dirk Chang +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.kyne.com.au/~mark/software/download/ +PKG_HASH:=51bc69cd55931e0cba2ceae39e9efa2483f4292da3a88a1ed470eda829f6c778 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +HOST_BUILD_DEPENDS:=lua/host + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/lua-cjson + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua CJSON parser + URL:=https://github.com/mpx/lua-cjson + DEPENDS:= +lua +endef + +define Package/lua-cjson/description + Lua CJSON is a fast JSON encoding/parsing module for Lua. +endef + +CMAKE_OPTIONS += \ + -DUSE_LUA=ON + +CMAKE_HOST_OPTIONS += \ + -DLUA_MATH_LIBRARY=m + +define Package/lua-cjson/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/cjson.so $(1)/usr/lib/lua/ + + $(INSTALL_DIR) $(1)/usr/lib/lua/cjson + $(INSTALL_DATA) $(PKG_BUILD_DIR)/lua/cjson/util.lua $(1)/usr/lib/lua/cjson +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,lua-cjson)) diff --git a/lang/lua-copas/Makefile b/lang/lua-copas/Makefile new file mode 100644 index 00000000..314850ec --- /dev/null +++ b/lang/lua-copas/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2009-2013 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:=lua-copas +PKG_VERSION:=2.0.0 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Dirk Chang +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MIRROR_HASH:=a47a8b5f6c1cf0d9fff4770a28bf7a3efdd8f37415dde8e02528f3e63f8a7899 +PKG_SOURCE_URL:=https://github.com/keplerproject/copas.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=f39a80add9f7c010ac979297652bbaaea0360a27 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/lua-copas + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua-Copas + URL:=https://github.com/keplerproject/copas + DEPENDS:=+lua +endef + +define Package/lua-copas/description + Copas is a dispatcher based on coroutines that can be used by TCP/IP servers. +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + T="$(BUILD_VARIANT)" \ + PREFIX="$(PKG_INSTALL_DIR)/usr" \ + install +endef + +# add make variable overrides here +MAKE_FLAGS += + +define Package/lua-copas/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_DIR) $(1)/usr/lib/lua/copas + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas.lua $(1)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/ftp.lua $(1)/usr/lib/lua/copas + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/smtp.lua $(1)/usr/lib/lua/copas + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/http.lua $(1)/usr/lib/lua/copas + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/limit.lua $(1)/usr/lib/lua/copas +endef + +$(eval $(call BuildPackage,lua-copas)) diff --git a/lang/lua-copas/patches/makefile.patch b/lang/lua-copas/patches/makefile.patch new file mode 100644 index 00000000..10e47340 --- /dev/null +++ b/lang/lua-copas/patches/makefile.patch @@ -0,0 +1,15 @@ +--- lua-copas-1.2.1_org/Makefile 2014-06-04 16:39:17.451563827 +0800 ++++ lua-copas-1.2.1/Makefile 2014-06-04 16:39:41.115563309 +0800 +@@ -1,10 +1,10 @@ + # $Id: Makefile,v 1.3 2007/10/29 22:50:16 carregal Exp $ + + # Default prefix +-PREFIX = /usr/local ++PREFIX ?= $(DESTDIR)/usr + + # System's lua directory (where Lua libraries are installed) +-LUA_DIR= $(PREFIX)/share/lua/5.1 ++LUA_DIR= $(PREFIX)/lib/lua + + install: + mkdir -p $(LUA_DIR)/copas diff --git a/lang/lua-coxpcall/Makefile b/lang/lua-coxpcall/Makefile new file mode 100644 index 00000000..95d92aca --- /dev/null +++ b/lang/lua-coxpcall/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2009-2013 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:=lua-coxpcall +PKG_VERSION:=1.15.0 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Dirk Chang +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MIRROR_HASH:=2a99faec759aeb858eca3691a40609dd2710255497011e5754c4a2282232154b +PKG_SOURCE_URL:=https://github.com/keplerproject/coxpcall.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=979257892884816c97391dfd7b0a7b30dcc8f479 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/lua-coxpcall + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua-Coxpcall + URL:=https://github.com/keplerproject/coxpcall + DEPENDS:=+lua +endef + +define Package/lua-coxpcall/description + Coxpcall encapsulates the protected calls with a coroutine based loop, + so errors can be dealed without the usual pcall/xpcall issues with coroutines. +endef + +TARGET_CFLAGS += $(FPIC) +# add make variable overrides here +MAKE_FLAGS += + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + T="$(BUILD_VARIANT)" \ + LUA_DIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \ + install +endef + +define Package/lua-coxpcall/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/coxpcall.lua $(1)/usr/lib/lua +endef + +$(eval $(call BuildPackage,lua-coxpcall)) diff --git a/lang/lua-coxpcall/patches/config.patch b/lang/lua-coxpcall/patches/config.patch new file mode 100644 index 00000000..2a1dbfd9 --- /dev/null +++ b/lang/lua-coxpcall/patches/config.patch @@ -0,0 +1,4 @@ +--- lua-coxpcall-1.15.0_org/config 1970-01-01 08:00:00.000000000 +0800 ++++ lua-coxpcall-1.15.0/config 2014-06-04 16:51:55.487547258 +0800 +@@ -0,0 +1 @@ ++LUA_DIR ?=$(DESTDIR)/usr/lib/lua diff --git a/lang/lua-lsqlite3/Makefile b/lang/lua-lsqlite3/Makefile new file mode 100644 index 00000000..02f4069e --- /dev/null +++ b/lang/lua-lsqlite3/Makefile @@ -0,0 +1,58 @@ +# +# Copyright (C) 2006-2016 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:=lsqlite3 +PKG_VERSION:=0.9.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=http://lua.sqlite.org/index.cgi/zip/lsqlite3_fsl09w.zip +PKG_HASH:=b857df8b66d01a803378cc86e56b787958beffdc8b851ad304f4ce8c7f0e9dbb + +PKG_LICENSE:=MIT +PKG_MAINTAINER:=Oskari Rauta + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)_fsl09w.zip + +include $(INCLUDE_DIR)/package.mk + +define Package/lsqlite3 + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua wrapper for the SQLite3 library + URL:=http://lua.sqlite.org + DEPENDS:= +lua +libsqlite3 +endef + +define Package/lsqlite3/description + LuaSQLite3 is a thin wrapper around the public domain SQLite3 database engine. +endef + +TARGET_CFLAGS += $(FPIC) -std=gnu99 +TARGET_CPPFLAGS += -DLUA_USE_LINUX +TARGET_LDFLAGS += -llua -lsqlite3 -lpthread + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) \ + -c $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.c \ + -o $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.o \ + -DSQLITE_VERSION="$(PKG_VERSION)" + $(TARGET_CC) $(TARGET_LDFLAGS) -shared \ + $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.o \ + -o $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.so +endef + +define Package/lsqlite3/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/*.so $(1)/usr/lib/lua/ +endef + +$(eval $(call BuildPackage,lsqlite3)) diff --git a/lang/lua-lzlib/Makefile b/lang/lua-lzlib/Makefile new file mode 100644 index 00000000..bf84a511 --- /dev/null +++ b/lang/lua-lzlib/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2015 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:=lua-lzlib +PKG_VERSION:=0.4.3 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Dirk Chang +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MIRROR_HASH:=b6ef5e3f04b7f2137b39931a175ee802489a2486e70537770919bcccca10e723 +PKG_SOURCE_URL:=https://github.com/LuaDist/lzlib.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=79329a07d8f79c19eadd7ea2752b4c4e1574b015 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/lua-lzlib + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua zlib binding + URL:=http://github.com/LuaDist/lzlib + DEPENDS:= +lua +zlib +endef + +define Package/lua-lzlib/description + A library to access zlib library functions and also to read/write gzip files using an interface similar to the base io package. +endef + +MAKE_FLAGS += \ + LUA="$(STAGING_DIR)/usr" \ + OFLAGS="$(TARGET_CFLAGS)" \ + +define Package/lua-lzlib/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/zlib.so $(1)/usr/lib/lua/ + + $(INSTALL_DATA) $(PKG_BUILD_DIR)/gzip.lua $(1)/usr/lib/lua/ +endef + +$(eval $(call BuildPackage,lua-lzlib)) diff --git a/lang/lua-lzlib/patches/001-allow_optim_flags.patch b/lang/lua-lzlib/patches/001-allow_optim_flags.patch new file mode 100644 index 00000000..78f981d2 --- /dev/null +++ b/lang/lua-lzlib/patches/001-allow_optim_flags.patch @@ -0,0 +1,12 @@ +--- a/Makefile ++++ b/Makefile +@@ -14,7 +14,8 @@ LUABIN= $(LUA)/bin + ZLIB=../zlib-1.2.3 + + # no need to change anything below here +-CFLAGS= $(INCS) $(DEFS) $(WARN) -O0 -fPIC ++CFLAGS= $(INCS) $(DEFS) $(WARN) $(OFLAGS) -fPIC ++OFLAGS= -O0 + WARN= -g -Werror -Wall -pedantic #-ansi + INCS= -I$(LUAINC) -I$(ZLIB) + LIBS= -L$(ZLIB) -lz -L$(LUALIB) -L$(LUABIN) #-llua51 diff --git a/lang/lua-md5/Makefile b/lang/lua-md5/Makefile new file mode 100644 index 00000000..4e4cae05 --- /dev/null +++ b/lang/lua-md5/Makefile @@ -0,0 +1,76 @@ +# +# Copyright (C) 2015 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:=lua-md5 +PKG_VERSION:=1.2 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Dirk Chang +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MIRROR_HASH:=89a186d9e8bb43a6d45207eeba2883600854ea05befda55b38f7ac215b0d5615 +PKG_SOURCE_URL:=https://github.com/keplerproject/md5.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=024b65738b4434860777fc43d7cacaefea29ec60 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/lua-md5 + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua-MD5 + URL:=https://github.com/keplerproject/md5 + DEPENDS:=+lua +endef + +define Package/lua-md5/description + MD5 offers basic cryptographic facilities for Lua +endef + +TARGET_CFLAGS += $(FPIC) + +# add make variable overrides here +MAKE_FLAGS += + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + PREFIX="$(STAGING_DIR)/usr" \ + LUA_LIBDIR="$(STAGING_DIR)/usr/lib/lua" \ + clean + $(MAKE) -C $(PKG_BUILD_DIR) \ + PREFIX="$(STAGING_DIR)/usr" \ + LUA_LIBDIR="$(STAGING_DIR)/usr/lib/lua" \ + LIB_OPTION="-shared" \ + CC="$(TARGET_CROSS)gcc" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + all +endef + +define Build/Install + $(MAKE) -C $(PKG_BUILD_DIR) \ + LUA_LIBDIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \ + LUA_DIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \ + install +endef + +define Package/lua-md5/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/md5.lua $(1)/usr/lib/lua + $(INSTALL_DIR) $(1)/usr/lib/lua/md5 + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/core.so $(1)/usr/lib/lua/md5/core.so +endef + +$(eval $(call BuildPackage,lua-md5)) diff --git a/lang/lua-md5/patches/config.patch b/lang/lua-md5/patches/config.patch new file mode 100644 index 00000000..abea3a88 --- /dev/null +++ b/lang/lua-md5/patches/config.patch @@ -0,0 +1,19 @@ +--- lua-md5-1.2/config 2014-06-04 16:55:50.000000000 +0800 ++++ lua-md5-1.2_new/config 2014-06-04 16:57:54.223539416 +0800 +@@ -1,13 +1,13 @@ + # Installation directories + + # Default prefix +-PREFIX = /usr/local ++PREFIX = /usr + + # System's libraries directory (where binary libraries are installed) +-LUA_LIBDIR= $(PREFIX)/lib/lua/5.1 ++LUA_LIBDIR= $(PREFIX)/lib/lua + + # System's lua directory (where Lua libraries are installed) +-LUA_DIR= $(PREFIX)/share/lua/5.1 ++LUA_DIR= $(PREFIX)/lib/lua + + # Lua includes directory + LUA_INC= $(PREFIX)/include diff --git a/lang/lua-md5/patches/makefile.patch b/lang/lua-md5/patches/makefile.patch new file mode 100644 index 00000000..89a2e33c --- /dev/null +++ b/lang/lua-md5/patches/makefile.patch @@ -0,0 +1,10 @@ +--- a/Makefile.orig 2014-06-04 17:16:40.083514808 +0800 ++++ b/Makefile 2014-06-04 17:17:27.111513780 +0800 +@@ -1,6 +1,6 @@ + # $Id: Makefile,v 1.7 2007/10/11 00:02:56 carregal Exp $ + +-CONFIG= ./config ++CFLAGS+= -fPIC + + include $(CONFIG) + diff --git a/lang/lua-mobdebug/Makefile b/lang/lua-mobdebug/Makefile new file mode 100644 index 00000000..59b6c0e2 --- /dev/null +++ b/lang/lua-mobdebug/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2015 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:=lua-mobdebug +PKG_VERSION:=0.61 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Dirk Chang +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MIRROR_HASH:=947876d6b8e234a21d1e918523d66546282011718f2260d5e1f10ebf60c851cb +PKG_SOURCE_URL:=https://github.com/pkulchenko/MobDebug.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=9a03aa59696647ba3b7f9ae2f29a9f28532a4feb +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/lua-mobdebug + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua-MobDebug + URL:=https://github.com/pkulchenko/MobDebug + DEPENDS:=+lua +endef + +define Package/lua-mobdebug/description + MobDebug is a remote debugger for Lua (including Lua 5.1, Lua 5.2, Lua 5.3, and LuaJIT 2.x). +endef + +define Build/Configure +endef + +define Build/Compile +endef + +define Build/Install +endef + +# add make variable overrides here +MAKE_FLAGS += + +define Package/lua-mobdebug/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/mobdebug.lua $(1)/usr/lib/lua +endef + +$(eval $(call BuildPackage,lua-mobdebug)) diff --git a/lang/lua-mosquitto/Makefile b/lang/lua-mosquitto/Makefile new file mode 100644 index 00000000..4fbb9dc9 --- /dev/null +++ b/lang/lua-mosquitto/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2013-2015 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:=lua-mosquitto +PKG_VERSION:=0.3 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_MIRROR_HASH:=104a143131812a507e74f9debde45614d006b6ea6c3b0265b83060b14b9d3a34 +PKG_SOURCE_PROTO:=git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=https://github.com/flukso/lua-mosquitto.git +PKG_SOURCE_VERSION:=v$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/lua-mosquitto + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua-mosquitto + DEPENDS:=+libmosquitto +lua + MAINTAINER:=Karl Palsson +endef + +define Package/lua-mosquitto/description + Lua bindings to libmosquitto +endef + +define Package/lua-mosquitto/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/mosquitto.so $(1)/usr/lib/lua +endef + +$(eval $(call BuildPackage,lua-mosquitto)) diff --git a/lang/lua-openssl/Makefile b/lang/lua-openssl/Makefile new file mode 100644 index 00000000..fc0629cf --- /dev/null +++ b/lang/lua-openssl/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2016 Amnon Paz +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lua-openssl +PKG_VERSION:=0.6.0 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Amnon Paz +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_MIRROR_HASH:=33de8fa469f66bbf6df09c4ba4e3386c0613cc061f5adff0928d532af6905773 +PKG_SOURCE_URL:=https://github.com/zhaozg/lua-openssl.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=1b950e6ff8617205cda1a1b612637ef21b9daf96 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/lua-openssl + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua openSSL binding + URL:=http://github.com/zhaozg/lua-openssl + DEPENDS:=+lua +libopenssl +librt +endef + +define Package/lua-openssl/description + A free, MIT-licensed OpenSSL binding for Lua. +endef + +define Package/lua-openssl/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/openssl.so $(1)/usr/lib/lua/ +endef + +$(eval $(call BuildPackage,lua-openssl)) diff --git a/lang/lua-openssl/patches/0001-Revise-Makefile.patch b/lang/lua-openssl/patches/0001-Revise-Makefile.patch new file mode 100644 index 00000000..e084c0bb --- /dev/null +++ b/lang/lua-openssl/patches/0001-Revise-Makefile.patch @@ -0,0 +1,135 @@ +diff --git a/Makefile b/Makefile +index 6cb1176..6605879 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,85 +1,45 @@ +-T=openssl +- +-PREFIX ?=/usr/local +-LIB_OPTION ?= -shared +- +-#Lua auto detect +-LUA_VERSION ?= $(shell pkg-config luajit --print-provides) +-ifeq ($(LUA_VERSION),) ############ Not use luajit +-LUAV ?= $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)") +-LUA_CFLAGS ?= -I$(PREFIX)/include/lua$(LUAV) +-LUA_LIBS ?= -L$(PREFIX)/lib +-LUA_LIBDIR ?= $(PREFIX)/lib/lua/$(LUAV) +-else +-LUAV ?= $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)") +-LUA_CFLAGS ?= $(shell pkg-config luajit --cflags) +-LUA_LIBS ?= $(shell pkg-config luajit --libs) +-LUA_LIBDIR ?= $(PREFIX)/lib/lua/$(LUAV) +-endif +- +-#OS auto detect +-SYS := $(shell gcc -dumpmachine) +- +-ifneq (, $(findstring linux, $(SYS))) +-# Do linux things +-LDFLAGS = -fPIC -lrt -ldl +-OPENSSL_LIBS ?= $(shell pkg-config openssl --libs) +-OPENSSL_CFLAGS ?= $(shell pkg-config openssl --cflags) +-CFLAGS = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS) +-endif +-ifneq (, $(findstring apple, $(SYS))) +-# Do darwin things +-LDFLAGS = -fPIC -lrt -ldl +-OPENSSL_LIBS ?= $(shell pkg-config openssl --libs) +-OPENSSL_CFLAGS ?= $(shell pkg-config openssl --cflags) +-CFLAGS = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS) +-endif +-ifneq (, $(findstring mingw, $(SYS))) +-# Do mingw things +-V = $(shell lua -e "v=string.gsub('$(LUAV)','%.','');print(v)") +-LDFLAGS = -mwindows -lcrypt32 -lssl -lcrypto -lws2_32 $(PREFIX)/bin/lua$(V).dll +-LUA_CFLAGS = -DLUA_LIB -DLUA_BUILD_AS_DLL -I$(PREFIX)/include/ +-CFLAGS = $(OPENSSL_CFLAGS) $(LUA_CFLAGS) +-endif +-ifneq (, $(findstring cygwin, $(SYS))) +-# Do cygwin things +-OPENSSL_LIBS ?= $(shell pkg-config openssl --libs) +-OPENSSL_CFLAGS ?= $(shell pkg-config openssl --cflags) +-CFLAGS = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS) +-endif +-#custome config +-ifeq (.config, $(wildcard .config)) +-include .config +-endif +- +-LIBNAME= $T.so.$V +- +-#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X +- +-# Compilation directives +-WARN_MOST = -Wall -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -pedantic +-WARN = -Wall -Wno-unused-value +-WARN_MIN = +-CFLAGS += $(WARN_MIN) -DPTHREADS +-CC= gcc -g $(CFLAGS) -Ideps +- +- +-OBJS=src/asn1.o src/auxiliar.o src/bio.o src/cipher.o src/cms.o src/compat.o src/crl.o src/csr.o src/dh.o src/digest.o src/dsa.o \ +-src/ec.o src/engine.o src/hmac.o src/lbn.o src/lhash.o src/misc.o src/ocsp.o src/openssl.o src/ots.o src/pkcs12.o src/pkcs7.o \ +-src/pkey.o src/rsa.o src/ssl.o src/th-lock.o src/util.o src/x509.o src/xattrs.o src/xexts.o src/xname.o src/xstore.o src/xalgor.o src/callback.o +- +-.c.o: +- $(CC) -c -o $@ $? +- +-all: $T.so +- echo $(SYS) +- +-$T.so: $(OBJS) +- MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; $(CC) $(CFLAGS) $(LIB_OPTION) -o $T.so $(OBJS) $(OPENSSL_LIBS) $(LUA_LIBS) $(LDFLAGS) +- +-install: all +- mkdir -p $(LUA_LIBDIR) +- cp $T.so $(LUA_LIBDIR) +- +-clean: +- rm -f $T.so $(OBJS) ++.PHONY: install clean ++ ++PKGC ?= pkg-config ++ ++LIBNAME = openssl.so ++LIB_OPTION = -shared ++ ++# lua's package config can be under various names ++LUAPKGC := $(shell for pc in lua lua5.1 lua5.2 lua5.3; do \ ++ $(PKGC) --exists $$pc && echo $$pc && break; \ ++ done) ++ ++BUILD_DIR = $(shell pwd) ++ ++# LUA include/libraries build flags ++LUA_LIBDIR := $(shell $(PKGC) --variable=libdir $(LUAPKGC)) ++LUA_CFLAGS := $(shell $(PKGC) --cflags $(LUAPKGC)) ++LUA_LIBS := $(shell $(PKGC) --libs-only-L $(LUAPKGC)) ++ ++# openssl include/libraries build flags ++OPENSSL_LIBS = $(shell $(PKGC) openssl --libs) ++OPENSSL_CFLAGS = $(shell $(PKGC) openssl --cflags) ++ ++# openssl include/libraries build flags ++LOCAL_INCLUDE = -I$(BUILD_DIR)/deps ++ ++CFLAGS += -fPIC -DPTHREADS -g $(LOCAL_INCLUDE) $(OPENSSL_CFLAGS) $(LUA_CFLAGS) ++LDFLAGS += -lrt -ldl $(OPENSSL_LIBS) $(LUA_LIBS) ++ ++OBJS = src/asn1.o src/auxiliar.o src/bio.o src/cipher.o src/cms.o src/compat.o src/crl.o src/csr.o src/dh.o src/digest.o src/dsa.o src/ec.o src/engine.o src/hmac.o src/lbn.o src/lhash.o src/misc.o src/ocsp.o src/openssl.o src/ots.o src/pkcs12.o src/pkcs7.o src/pkey.o src/rsa.o src/ssl.o src/th-lock.o src/util.o src/x509.o src/xattrs.o src/xexts.o src/xname.o src/xstore.o src/xalgor.o src/callback.o ++ ++all: clean $(LIBNAME) ++ ++$(LIBNAME): $(OBJS) ++ $(CC) $(LDFLAGS) $(LIB_OPTION) $(OBJS) -o $@ ++ ++%.o: %.c ++ $(CC) $(CFLAGS) -c $< -o $@ ++ ++install: all ++ mkdir -p $(LUA_LIBDIR) ++ cp $(LIBNAME) $(LUA_LIBDIR) ++ ++clean: ++ rm -f $(LIBNAME) $(OBJS) diff --git a/lang/lua-openssl/patches/0010-Fix-Linkage.patch b/lang/lua-openssl/patches/0010-Fix-Linkage.patch new file mode 100644 index 00000000..52bcf1ae --- /dev/null +++ b/lang/lua-openssl/patches/0010-Fix-Linkage.patch @@ -0,0 +1,36 @@ +diff --git a/deps/lua-compat/c-api/compat-5.3.c b/deps/lua-compat/c-api/compat-5.3.c +index 4395bbc..4a8877c 100644 +--- a/deps/lua-compat/c-api/compat-5.3.c ++++ b/deps/lua-compat/c-api/compat-5.3.c +@@ -491,17 +491,6 @@ COMPAT53_API int lua_geti (lua_State *L, int index, lua_Integer i) { + } + + +-COMPAT53_API int lua_isinteger (lua_State *L, int index) { +- if (lua_type(L, index) == LUA_TNUMBER) { +- lua_Number n = lua_tonumber(L, index); +- lua_Integer i = lua_tointeger(L, index); +- if (i == n) +- return 1; +- } +- return 0; +-} +- +- + static void compat53_reverse (lua_State *L, int a, int b) { + for (; a < b; ++a, --b) { + lua_pushvalue(L, a); +diff --git a/deps/lua-compat/c-api/compat-5.3.h b/deps/lua-compat/c-api/compat-5.3.h +index 2309294..8e67bae 100644 +--- a/deps/lua-compat/c-api/compat-5.3.h ++++ b/deps/lua-compat/c-api/compat-5.3.h +@@ -244,9 +244,6 @@ typedef int (*lua_KFunction)(lua_State *L, int status, lua_KContext ctx); + #define lua_geti COMPAT53_CONCAT(COMPAT53_PREFIX, _geti) + COMPAT53_API int lua_geti (lua_State *L, int index, lua_Integer i); + +-#define lua_isinteger COMPAT53_CONCAT(COMPAT53_PREFIX, _isinteger) +-COMPAT53_API int lua_isinteger (lua_State *L, int index); +- + #define lua_numbertointeger(n, p) \ + ((*(p) = (lua_Integer)(n)), 1) + diff --git a/lang/lua-openssl/patches/0020-support-OPENSSL_NO_SSL3_METHOD.patch b/lang/lua-openssl/patches/0020-support-OPENSSL_NO_SSL3_METHOD.patch new file mode 100644 index 00000000..2f296801 --- /dev/null +++ b/lang/lua-openssl/patches/0020-support-OPENSSL_NO_SSL3_METHOD.patch @@ -0,0 +1,41 @@ +--- lua-openssl-0.6.0.old/src/ssl.c 2016-09-19 08:30:43.735075695 +0200 ++++ lua-openssl-0.6.0/src/ssl.c 2016-09-19 09:02:45.733813437 +0200 +@@ -24,12 +24,17 @@ + SSL_METHOD* method = NULL; + const char* ciphers; + SSL_CTX* ctx; +- if (strcmp(meth, "SSLv3") == 0) ++ if (0); ++ ++#ifndef OPENSSL_NO_SSL3 ++ else if (strcmp(meth, "SSLv3") == 0) + method = SSLv3_method(); /* SSLv3 */ + else if (strcmp(meth, "SSLv3_server") == 0) + method = SSLv3_server_method(); /* SSLv3 */ + else if (strcmp(meth, "SSLv3_client") == 0) + method = SSLv3_client_method(); /* SSLv3 */ ++#endif ++ + else if (strcmp(meth, "SSLv23") == 0) + method = SSLv23_method(); /* SSLv3 but can rollback to v2 */ + else if (strcmp(meth, "SSLv23_server") == 0) +@@ -79,15 +84,15 @@ + #endif + else + luaL_error(L, "#1:%s not supported\n" +- "Maybe SSLv3 SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n", +- "default is SSLv3", ++ "Maybe [SSLv3] SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n", ++ "default is TLSv1", + meth); + ciphers = luaL_optstring(L, 2, SSL_DEFAULT_CIPHER_LIST); + ctx = SSL_CTX_new(method); + if (!ctx) + luaL_error(L, "#1:%s not supported\n" +- "Maybe SSLv3 SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n", +- "default is SSLv3", ++ "Maybe [SSLv3] SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n", ++ "default is TLSv1", + meth); + openssl_newvalue(L, ctx); + SSL_CTX_set_cipher_list(ctx, ciphers); diff --git a/lang/lua-openssl/patches/0030-support-OPENSSL_NO_COMP.patch b/lang/lua-openssl/patches/0030-support-OPENSSL_NO_COMP.patch new file mode 100644 index 00000000..44e53309 --- /dev/null +++ b/lang/lua-openssl/patches/0030-support-OPENSSL_NO_COMP.patch @@ -0,0 +1,20 @@ +--- lua-openssl-0.6.0.old/src/ssl.c 2016-09-19 08:30:43.735075695 +0200 ++++ lua-openssl-0.6.0/src/ssl.c 2016-09-19 08:48:37.393737125 +0200 +@@ -1245,7 +1250,7 @@ + lua_pushinteger(L, st); + return 2; + } +-#ifndef LIBRESSL_VERSION_NUMBER ++#if !defined(OPENSSL_NO_COMP) && !defined(LIBRESSL_VERSION_NUMBER) + static int openssl_ssl_current_compression(lua_State *L) + { + SSL* s = CHECK_OBJECT(1, SSL, "openssl.ssl"); +@@ -1803,7 +1808,7 @@ + {"getfd", openssl_ssl_getfd}, + + {"current_cipher", openssl_ssl_current_cipher}, +-#ifndef LIBRESSL_VERSION_NUMBER ++#if !defined(OPENSSL_NO_COMP) && !defined(LIBRESSL_VERSION_NUMBER) + {"current_compression", openssl_ssl_current_compression}, + #endif + {"getpeerverification", openssl_ssl_getpeerverification}, diff --git a/lang/lua-penlight/Makefile b/lang/lua-penlight/Makefile new file mode 100644 index 00000000..f7196946 --- /dev/null +++ b/lang/lua-penlight/Makefile @@ -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:=lua-penlight +PKG_VERSION:=1.5.4 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/stevedonovan/Penlight +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_MIRROR_HASH:=cd9f25981b12022b66180a3b8df46840be1b3e2a857b8d9909b2d5601be0ead4 +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE.md + +include $(INCLUDE_DIR)/package.mk + +define Package/lua-penlight + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Penlight + URL:=http://stevedonovan.github.io/Penlight/api/manual/01-introduction.md.html + DEPENDS:=+luafilesystem + MAINTAINER:=Karl Palsson +endef + +define Package/lua-penlight/description + It is often said of Lua that it does not include batteries. + Penlight is the batteries. +endef + +define Build/Compile + echo "Nothing to compile, pure lua package" +endef + +define Package/lua-penlight/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(CP) $(PKG_BUILD_DIR)/lua/pl $(1)/usr/lib/lua +endef + +$(eval $(call BuildPackage,lua-penlight)) diff --git a/lang/lua-rings/Makefile b/lang/lua-rings/Makefile new file mode 100644 index 00000000..53fe67b2 --- /dev/null +++ b/lang/lua-rings/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2015 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:=lua-rings +PKG_VERSION:=1.3.0 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Dirk Chang +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MIRROR_HASH:=7026ce5898d37a4175b7afad693d59ff1fff1a84adafcabfafd065956a03616c +PKG_SOURCE_URL:=https://github.com/keplerproject/rings.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=2b8a900f8b9dbde304859a3ac9d437795c3fdde3 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) + +PKG_FIXUP:=autoreconf + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/lua-rings + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua-Rings + URL:=http://keplerproject.github.io/rings/ + DEPENDS:=+lua +endef + +define Package/lua-rings/description + Rings is a library which provides a way to create new Lua states from within Lua. +endef + +TARGET_CFLAGS += $(FPIC) +# add make variable overrides here +MAKE_FLAGS += + +define Build/Configure +endef + +define Package/lua-rings/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/rings.so $(1)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/stable.lua $(1)/usr/lib/lua +endef + +$(eval $(call BuildPackage,lua-rings)) diff --git a/lang/lua-rings/patches/config.patch b/lang/lua-rings/patches/config.patch new file mode 100644 index 00000000..5740faea --- /dev/null +++ b/lang/lua-rings/patches/config.patch @@ -0,0 +1,28 @@ +--- lua-rings-1.3.0_org/config 2014-06-04 15:24:24.223662038 +0800 ++++ lua-rings-1.3.0/config 2014-06-04 16:16:15.183594040 +0800 +@@ -1,15 +1,15 @@ + # Installation directories + + # Default prefix +-PREFIX ?= /usr/local ++PREFIX ?= /usr + + DESTDIR ?= / + + # System's libraries directory (where binary libraries are installed) +-LUA_LIBDIR ?= $(PREFIX)/lib/lua/5.1 ++LUA_LIBDIR ?= $(PREFIX)/lib/lua + + # System's lua directory (where Lua libraries are installed) +-LUA_DIR ?= $(PREFIX)/share/lua/5.1 ++LUA_DIR ?= $(PREFIX)/lib/lua + + # Lua includes directory + LUA_INC ?= $(PREFIX)/include +@@ -24,6 +24,5 @@ + WARN ?= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -Wpointer-arith -pedantic + INCS ?= -I$(LUA_INC) + CFLAGS ?= $(WARN) $(INCS) +-CC ?= gcc + + # $Id: config,v 1.7 2007/10/29 22:51:39 carregal Exp $ diff --git a/lang/lua-rings/patches/makefile.patch b/lang/lua-rings/patches/makefile.patch new file mode 100644 index 00000000..8bb05512 --- /dev/null +++ b/lang/lua-rings/patches/makefile.patch @@ -0,0 +1,11 @@ +--- lua-rings-1.3.0_org/Makefile 2014-06-04 15:24:37.583661746 +0800 ++++ lua-rings-1.3.0/Makefile 2014-06-04 15:23:41.611662970 +0800 +@@ -3,6 +3,8 @@ + T= rings + CONFIG= ./config + ++CFLAGS+= -fPIC ++ + include $(CONFIG) + + SRCS= src/rings.c diff --git a/lang/lua-rs232/Makefile b/lang/lua-rs232/Makefile new file mode 100644 index 00000000..492d8cc8 --- /dev/null +++ b/lang/lua-rs232/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2015 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:=lua-rs232 +PKG_VERSION:=1.0.3 +PKG_RELEASE:=2 +PKG_MAINTAINER:=Dirk Chang +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MIRROR_HASH:=fb2f6453537e10beb2cd99d30eb1b4259ab75452992ca8a65d621186cf320960 +PKG_SOURCE_URL:=https://github.com/srdgame/librs232.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=a9d463181e7f7034fe6a55bc38e845fb04fa93ba +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/lua-rs232 + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua Serial Library + URL:=https://github.com/srdgame/librs232 + DEPENDS:= +lua +endef + +define Package/lua-rs232/description + multiplatform library for serial communications over RS-232 +endef + +CONFIGURE_ARGS += \ + --with-lua-inc=$(STAGING_DIR)/usr/include \ + --with-lua-lib=$(STAGING_DIR)/usr/lib + +#define Build/Configure +# ( cd "$(PKG_BUILD_DIR)"; ./autogen.sh ) +# $(call Build/Configure/Default) +#endef +define Build/Configure +endef + +define Build/Compile + (cd "$(PKG_BUILD_DIR)"; $(TARGET_CC) src/rs232.c src/rs232_posix.c bindings/lua/luars232.c -DLUAROCKS_HACK -std=gnu99 -I./include -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib -fPIC -shared -o luars232.so) +endef + +define Build/Install +endef + +define Package/lua-rs232/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/luars232.so $(1)/usr/lib/lua/ +endef + +$(eval $(call BuildPackage,lua-rs232)) diff --git a/lang/lua-rs232/patches/100-remove-build-timestamps.patch b/lang/lua-rs232/patches/100-remove-build-timestamps.patch new file mode 100644 index 00000000..fe59e2c7 --- /dev/null +++ b/lang/lua-rs232/patches/100-remove-build-timestamps.patch @@ -0,0 +1,22 @@ +Index: lua-rs232-1.0.3/bindings/lua/luars232.c +=================================================================== +--- lua-rs232-1.0.3.orig/bindings/lua/luars232.c 2014-06-05 09:48:23.000000000 +0200 ++++ lua-rs232-1.0.3/bindings/lua/luars232.c 2017-12-03 13:03:51.008917783 +0100 +@@ -31,7 +31,6 @@ + + #include "librs232/rs232.h" + +-#define MODULE_TIMESTAMP __DATE__ " " __TIME__ + #define MODULE_NAMESPACE "luars232" + #define MODULE_VERSION "1.0.3" + #define MODULE_BUILD "$Id: luars232.c 15 2011-02-23 09:02:20Z sp $" +@@ -483,9 +482,6 @@ + lua_pushstring(L, MODULE_BUILD); + lua_setfield(L, -2, "_BUILD"); + +- lua_pushstring(L, MODULE_TIMESTAMP); +- lua_setfield(L, -2, "_TIMESTAMP"); +- + lua_pushstring(L, MODULE_COPYRIGHT); + lua_setfield(L, -2, "_COPYRIGHT"); + diff --git a/lang/lua-sha2/Makefile b/lang/lua-sha2/Makefile new file mode 100644 index 00000000..e76a5a20 --- /dev/null +++ b/lang/lua-sha2/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 20013-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:=lua-sha2 +PKG_VERSION:=0.2.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MIRROR_HASH:=79e65bd7cb1b8ef64e125c9e57f40b7d38678599587c1894ce57838814403945 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=https://github.com/lgierth/lua-sha2.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=02bd4bfdc8062c7e1ae51c5a72906efc0a6375ee +PKG_LICENSE:=MIT + +include $(INCLUDE_DIR)/package.mk + +define Package/lua-sha2 + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua binding for Aaron Gifford's SHA-2 implementation + URL:=https://code.google.com/p/sha2/ + MAINTAINER:=Lars Gierth + DEPENDS:=+lua +endef + +define Package/lua-sha2/description + Lua Binding for the SHA-2 (SHA-256/384/512) BSD-licensed C implementation by Aaron Gifford. + Also contains a HMAC implementation in Lua. +endef + +TARGET_CFLAGS += -fPIC -DSHA2_USE_INTTYPES_H -DBYTE_ORDER -DLITTLE_ENDIAN +TARGET_LDFLAGS += -fPIC -DSHA2_USE_INTTYPES_H -DBYTE_ORDER -DLITTLE_ENDIAN + +define Build/Configure +endef + +define Package/lua-sha2/install + $(INSTALL_DIR) $(1)/usr/lib/lua/hmac + $(INSTALL_DATA) $(PKG_BUILD_DIR)/sha2.so $(1)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac.lua $(1)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac/sha2.lua $(1)/usr/lib/lua/hmac + $(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac/md5.lua $(1)/usr/lib/lua/hmac +endef + +$(eval $(call BuildPackage,lua-sha2)) diff --git a/lang/lua-sha2/patches/001-makefile.patch b/lang/lua-sha2/patches/001-makefile.patch new file mode 100644 index 00000000..e395044e --- /dev/null +++ b/lang/lua-sha2/patches/001-makefile.patch @@ -0,0 +1,14 @@ +From: Lars Gierth +Date: Tue, 2 Sep 2014 00:05:39 +0200 + + Add rump Makefile + +new file mode 100644 +index 0000000..f081d38 +--- /dev/null ++++ b/Makefile +@@ -0,0 +1,4 @@ ++all: sha2.o sha2lib.o ++ $(CC) -shared -o sha2.so sha2.o sha2lib.o ++ ++.PHONY: all diff --git a/lang/lua-wsapi/Makefile b/lang/lua-wsapi/Makefile new file mode 100644 index 00000000..5e1e6c9d --- /dev/null +++ b/lang/lua-wsapi/Makefile @@ -0,0 +1,96 @@ +# +# Copyright (C) 2015 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:=lua-wsapi +PKG_VERSION:=1.6.1 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Dirk Chang +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MIRROR_HASH:=0e52ca377c135c8db1f824841e1a36c1ef7e4b4a594a5b70a2f402586901ca1f +PKG_SOURCE_URL:=https://github.com/keplerproject/wsapi.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=eed8338401196cc155e59280adbe58d78933ead0 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/lua-wsapi/Default + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua WSAPI + URL:=https://keplerproject.github.io/wsapi/ + DEPENDS:= +lua +endef + +define Package/lua-wsapi/Default/description + WSAPI is an API that abstracts the web server from Lua web applications +endef + + +define Package/lua-wsapi-base +$(call Package/lua-wsapi/Default) + TITLE+= base + DEPENDS+= +luafilesystem + VARIANT:=base +endef + +define Package/lua-wsapi-base/description +$(call Package/lua-wsapi/Default/description) + . + This package contains the basic stuff. +endef + +define Package/lua-wsapi-xavante +$(call Package/lua-wsapi/Default) + TITLE+= xavante + DEPENDS+= +lua-wsapi-base +lua-xavante + VARIANT:=xavante +endef + +define Package/lua-wsapi-xavante/description +$(call Package/lua-wsapi/Default/description) + . + This package contains the Xavante stuff. +endef + +define Build/Configure +endef + +define Build/Compile +endef + +define Build/Install +endef + +define Package/lua-wsapi-base/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi.lua $(1)/usr/lib/lua + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/launcher/wsapi.cgi $(1)/usr/bin + + $(INSTALL_DIR) $(1)/usr/lib/lua/wsapi + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi/{common,request,response,util,cgi,sapi,ringer,mock}.lua $(1)/usr/lib/lua/wsapi +endef + +define Package/lua-wsapi-xavante/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/launcher/wsapi $(1)/usr/bin + + $(INSTALL_DIR) $(1)/usr/lib/lua/wsapi + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi/xavante.lua $(1)/usr/lib/lua/wsapi +endef + + +$(eval $(call BuildPackage,lua-wsapi-base)) +$(eval $(call BuildPackage,lua-wsapi-xavante)) diff --git a/lang/lua-xavante/Makefile b/lang/lua-xavante/Makefile new file mode 100644 index 00000000..73be566a --- /dev/null +++ b/lang/lua-xavante/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2015 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:=lua-xavante +PKG_VERSION:=2.3.0 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Dirk Chang +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MIRROR_HASH:=0ab254d4bb8ce9556ad8fc2a1b4aef739ec3bb3e1f343400b20435e2ab8e686f +PKG_SOURCE_URL:=https://github.com/keplerproject/xavante.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=9825b905133e14d37a4c179f2d02367ab93f1ef6 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/lua-xavante + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Xavante Web Server + URL:=http://keplerproject.github.io/xavante/ + DEPENDS:= +lua +endef + +define Package/lua-xavante/description + Xavante is a Lua HTTP 1.1 Web server that uses a modular architecture based on URI mapped handlers. +endef + + +define Build/Configure +endef + +define Build/Compile +endef + +define Build/Install +endef + +define Package/lua-xavante/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/sajax/sajax.lua $(1)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/xavante/xavante.lua $(1)/usr/lib/lua + + $(INSTALL_DIR) $(1)/usr/lib/lua/xavante + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/xavante/{cgiluahandler,encoding,filehandler,httpd,mime,patternhandler,redirecthandler,vhostshandler,indexhandler,urlhandler,ruleshandler}.lua $(1)/usr/lib/lua/xavante +endef + +$(eval $(call BuildPackage,lua-xavante)) diff --git a/lang/luabitop/Makefile b/lang/luabitop/Makefile new file mode 100644 index 00000000..20f2c391 --- /dev/null +++ b/lang/luabitop/Makefile @@ -0,0 +1,53 @@ +# +# 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:=luabitop +PKG_VERSION:=1.0.2 +PKG_RELEASE:=1 + +_BASENAME:=LuaBitOp + +PKG_MAINTAINER:=Maxim Storchak +PKG_SOURCE:=$(_BASENAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://bitop.luajit.org/download/ +PKG_HASH:=1207c9293dcd52eb9dca6538d1b87352bd510f4e760938f5048433f7f272ce99 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(_BASENAME)-$(PKG_VERSION) +PKG_LICENSE:=MIT + +include $(INCLUDE_DIR)/package.mk + +define Package/luabitop + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=luabitop + URL:=http://bitop.luajit.org/ + DEPENDS:=+liblua +endef + +define Package/luabitop/description +Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise operations on numbers. +endef + +define Build/Configure +endef + + +TARGET_CFLAGS += $(FPIC) -DLUA_USE_LINUX -DLUA_NUMBER_DOUBLE + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_CPPFLAGS) -std=gnu99 $(FPIC) -DLUA_USE_LINUX -shared -o $(PKG_BUILD_DIR)/bit.so $(PKG_BUILD_DIR)/bit.c +endef + +define Package/luabitop/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bit.so $(1)/usr/lib/lua +endef + +$(eval $(call BuildPackage,luabitop)) diff --git a/lang/luaexpat/Makefile b/lang/luaexpat/Makefile new file mode 100644 index 00000000..f4ebef8e --- /dev/null +++ b/lang/luaexpat/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2009 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:=luaexpat +PKG_VERSION:=1.3.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://matthewwild.co.uk/projects/luaexpat +PKG_HASH:=d060397960d87b2c89cf490f330508b7def1a0677bdc120531c571609fc57dc3 + +include $(INCLUDE_DIR)/package.mk + +define Package/luaexpat + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=LuaExpat + URL:=http://matthewwild.co.uk/projects/luaexpat/ + MAINTAINER:=W. Michael Petullo + DEPENDS:=+lua +libexpat +endef + +define Package/luaexpat/description + LuaExpat is a SAX XML parser based on the Expat library. +endef + +define Build/Configure +endef + +define Build/Compile + $(CP) files/compat-5.1r5 $(PKG_BUILD_DIR)/compat-5.1r5 + $(MAKE) -C $(PKG_BUILD_DIR) \ + EXPAT_INC="-I$(STAGING_DIR)/usr/include/" \ + LUA_INC="-I$(STAGING_DIR)/usr/include/" \ + LUA_LIBDIR="$(STAGING_DIR)/usr/lib/" \ + COMPAT_DIR="$(PKG_BUILD_DIR)/compat-5.1r5" \ + LDFLAGS="-shared $(TARGET_LDFLAGS)" \ + CC="$(TARGET_CC) $(TARGET_CFLAGS) $(FPIC) -std=c99" \ + LD="$(TARGET_CROSS)ld -shared" +endef + +define Package/luaexpat/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lxp.so $(1)/usr/lib/lua/lxp.so + $(INSTALL_DIR) $(1)/usr/lib/lua/lxp + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lxp/lom.lua $(1)/usr/lib/lua/lxp +endef + +$(eval $(call BuildPackage,luaexpat)) diff --git a/lang/luaexpat/files/compat-5.1r5/compat-5.1.c b/lang/luaexpat/files/compat-5.1r5/compat-5.1.c new file mode 100644 index 00000000..6fdb8b7b --- /dev/null +++ b/lang/luaexpat/files/compat-5.1r5/compat-5.1.c @@ -0,0 +1,97 @@ +/* +** Compat-5.1 +** Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat) +** $Id: compat-5.1.c,v 1.13 2006/02/20 21:12:47 carregal Exp $ +*/ + +#include +#include +#include "lua.h" +#include "lauxlib.h" +#include "compat-5.1.h" + +static void getfield(lua_State *L, int idx, const char *name) { + const char *end = strchr(name, '.'); + lua_pushvalue(L, idx); + while (end) { + lua_pushlstring(L, name, end - name); + lua_gettable(L, -2); + lua_remove(L, -2); + if (lua_isnil(L, -1)) return; + name = end+1; + end = strchr(name, '.'); + } + lua_pushstring(L, name); + lua_gettable(L, -2); + lua_remove(L, -2); +} + +static void setfield(lua_State *L, int idx, const char *name) { + const char *end = strchr(name, '.'); + lua_pushvalue(L, idx); + while (end) { + lua_pushlstring(L, name, end - name); + lua_gettable(L, -2); + /* create table if not found */ + if (lua_isnil(L, -1)) { + lua_pop(L, 1); + lua_newtable(L); + lua_pushlstring(L, name, end - name); + lua_pushvalue(L, -2); + lua_settable(L, -4); + } + lua_remove(L, -2); + name = end+1; + end = strchr(name, '.'); + } + lua_pushstring(L, name); + lua_pushvalue(L, -3); + lua_settable(L, -3); + lua_pop(L, 2); +} + +LUALIB_API void luaL_module(lua_State *L, const char *libname, + const luaL_reg *l, int nup) { + if (libname) { + getfield(L, LUA_GLOBALSINDEX, libname); /* check whether lib already exists */ + if (lua_isnil(L, -1)) { + int env, ns; + lua_pop(L, 1); /* get rid of nil */ + lua_pushliteral(L, "require"); + lua_gettable(L, LUA_GLOBALSINDEX); /* look for require */ + lua_getfenv(L, -1); /* getfenv(require) */ + lua_remove(L, -2); /* remove function require */ + env = lua_gettop(L); + + lua_newtable(L); /* create namespace for lib */ + ns = lua_gettop(L); + getfield(L, env, "package.loaded"); /* get package.loaded table */ + if (lua_isnil(L, -1)) { /* create package.loaded table */ + lua_pop(L, 1); /* remove previous result */ + lua_newtable(L); + lua_pushvalue(L, -1); + setfield(L, env, "package.loaded"); + } + else if (!lua_istable(L, -1)) + luaL_error(L, "name conflict for library `%s'", libname); + lua_pushstring(L, libname); + lua_pushvalue(L, ns); + lua_settable(L, -3); /* package.loaded[libname] = ns */ + lua_pop(L, 1); /* get rid of package.loaded table */ + lua_pushvalue(L, ns); /* copy namespace */ + setfield(L, LUA_GLOBALSINDEX, libname); + lua_remove (L, env); /* remove env */ + } + lua_insert(L, -(nup+1)); /* move library table to below upvalues */ + } + for (; l->name; l++) { + int i; + lua_pushstring(L, l->name); + for (i=0; ifunc, nup); + lua_settable(L, -(nup+3)); + } + lua_pop(L, nup); /* remove upvalues */ +} + diff --git a/lang/luaexpat/files/compat-5.1r5/compat-5.1.h b/lang/luaexpat/files/compat-5.1r5/compat-5.1.h new file mode 100644 index 00000000..97570d9c --- /dev/null +++ b/lang/luaexpat/files/compat-5.1r5/compat-5.1.h @@ -0,0 +1,13 @@ +/* +** Compat-5.1 +** Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat/) +** $Id: compat-5.1.h,v 1.8 2006/02/20 21:12:47 carregal Exp $ +*/ + +#ifndef COMPAT_H + +LUALIB_API void luaL_module(lua_State *L, const char *libname, + const luaL_reg *l, int nup); +#define luaL_openlib luaL_module + +#endif diff --git a/lang/luaexpat/files/compat-5.1r5/compat-5.1.lua b/lang/luaexpat/files/compat-5.1r5/compat-5.1.lua new file mode 100644 index 00000000..0938d56a --- /dev/null +++ b/lang/luaexpat/files/compat-5.1r5/compat-5.1.lua @@ -0,0 +1,267 @@ +-- +-- Compat-5.1 +-- Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat) +-- According to Lua 5.1 +-- $Id: compat-5.1.lua,v 1.22 2006/02/20 21:12:47 carregal Exp $ +-- + +_COMPAT51 = "Compat-5.1 R5" + +local LUA_DIRSEP = '/' +local LUA_OFSEP = '_' +local OLD_LUA_OFSEP = '' +local POF = 'luaopen_' +local LUA_PATH_MARK = '?' +local LUA_IGMARK = ':' + +local assert, error, getfenv, ipairs, loadfile, loadlib, pairs, setfenv, setmetatable, type = assert, error, getfenv, ipairs, loadfile, loadlib, pairs, setfenv, setmetatable, type +local find, format, gfind, gsub, sub = string.find, string.format, string.gfind, string.gsub, string.sub + +-- +-- avoid overwriting the package table if it's already there +-- +package = package or {} +local _PACKAGE = package + +package.path = LUA_PATH or os.getenv("LUA_PATH") or + ("./?.lua;" .. + "/usr/local/share/lua/5.0/?.lua;" .. + "/usr/local/share/lua/5.0/?/?.lua;" .. + "/usr/local/share/lua/5.0/?/init.lua" ) + +package.cpath = LUA_CPATH or os.getenv("LUA_CPATH") or + "./?.so;" .. + "./l?.so;" .. + "/usr/local/lib/lua/5.0/?.so;" .. + "/usr/local/lib/lua/5.0/l?.so" + +-- +-- make sure require works with standard libraries +-- +package.loaded = package.loaded or {} +package.loaded.debug = debug +package.loaded.string = string +package.loaded.math = math +package.loaded.io = io +package.loaded.os = os +package.loaded.table = table +package.loaded.base = _G +package.loaded.coroutine = coroutine +local _LOADED = package.loaded + +-- +-- avoid overwriting the package.preload table if it's already there +-- +package.preload = package.preload or {} +local _PRELOAD = package.preload + + +-- +-- looks for a file `name' in given path +-- +local function findfile (name, pname) + name = gsub (name, "%.", LUA_DIRSEP) + local path = _PACKAGE[pname] + assert (type(path) == "string", format ("package.%s must be a string", pname)) + for c in gfind (path, "[^;]+") do + c = gsub (c, "%"..LUA_PATH_MARK, name) + local f = io.open (c) + if f then + f:close () + return c + end + end + return nil -- not found +end + + +-- +-- check whether library is already loaded +-- +local function loader_preload (name) + assert (type(name) == "string", format ( + "bad argument #1 to `require' (string expected, got %s)", type(name))) + assert (type(_PRELOAD) == "table", "`package.preload' must be a table") + return _PRELOAD[name] +end + + +-- +-- Lua library loader +-- +local function loader_Lua (name) + assert (type(name) == "string", format ( + "bad argument #1 to `require' (string expected, got %s)", type(name))) + local filename = findfile (name, "path") + if not filename then + return false + end + local f, err = loadfile (filename) + if not f then + error (format ("error loading module `%s' (%s)", name, err)) + end + return f +end + + +local function mkfuncname (name) + name = gsub (name, "^.*%"..LUA_IGMARK, "") + name = gsub (name, "%.", LUA_OFSEP) + return POF..name +end + +local function old_mkfuncname (name) + --name = gsub (name, "^.*%"..LUA_IGMARK, "") + name = gsub (name, "%.", OLD_LUA_OFSEP) + return POF..name +end + +-- +-- C library loader +-- +local function loader_C (name) + assert (type(name) == "string", format ( + "bad argument #1 to `require' (string expected, got %s)", type(name))) + local filename = findfile (name, "cpath") + if not filename then + return false + end + local funcname = mkfuncname (name) + local f, err = loadlib (filename, funcname) + if not f then + funcname = old_mkfuncname (name) + f, err = loadlib (filename, funcname) + if not f then + error (format ("error loading module `%s' (%s)", name, err)) + end + end + return f +end + + +local function loader_Croot (name) + local p = gsub (name, "^([^.]*).-$", "%1") + if p == "" then + return + end + local filename = findfile (p, "cpath") + if not filename then + return + end + local funcname = mkfuncname (name) + local f, err, where = loadlib (filename, funcname) + if f then + return f + elseif where ~= "init" then + error (format ("error loading module `%s' (%s)", name, err)) + end +end + +-- create `loaders' table +package.loaders = package.loaders or { loader_preload, loader_Lua, loader_C, loader_Croot, } +local _LOADERS = package.loaders + + +-- +-- iterate over available loaders +-- +local function load (name, loaders) + -- iterate over available loaders + assert (type (loaders) == "table", "`package.loaders' must be a table") + for i, loader in ipairs (loaders) do + local f = loader (name) + if f then + return f + end + end + error (format ("module `%s' not found", name)) +end + +-- sentinel +local sentinel = function () end + +-- +-- new require +-- +function _G.require (modname) + assert (type(modname) == "string", format ( + "bad argument #1 to `require' (string expected, got %s)", type(name))) + local p = _LOADED[modname] + if p then -- is it there? + if p == sentinel then + error (format ("loop or previous error loading module '%s'", modname)) + end + return p -- package is already loaded + end + local init = load (modname, _LOADERS) + _LOADED[modname] = sentinel + local actual_arg = _G.arg + _G.arg = { modname } + local res = init (modname) + if res then + _LOADED[modname] = res + end + _G.arg = actual_arg + if _LOADED[modname] == sentinel then + _LOADED[modname] = true + end + return _LOADED[modname] +end + + +-- findtable +local function findtable (t, f) + assert (type(f)=="string", "not a valid field name ("..tostring(f)..")") + local ff = f.."." + local ok, e, w = find (ff, '(.-)%.', 1) + while ok do + local nt = rawget (t, w) + if not nt then + nt = {} + t[w] = nt + elseif type(t) ~= "table" then + return sub (f, e+1) + end + t = nt + ok, e, w = find (ff, '(.-)%.', e+1) + end + return t +end + +-- +-- new package.seeall function +-- +function _PACKAGE.seeall (module) + local t = type(module) + assert (t == "table", "bad argument #1 to package.seeall (table expected, got "..t..")") + local meta = getmetatable (module) + if not meta then + meta = {} + setmetatable (module, meta) + end + meta.__index = _G +end + + +-- +-- new module function +-- +function _G.module (modname, ...) + local ns = _LOADED[modname] + if type(ns) ~= "table" then + ns = findtable (_G, modname) + if not ns then + error (string.format ("name conflict for module '%s'", modname)) + end + _LOADED[modname] = ns + end + if not ns._NAME then + ns._NAME = modname + ns._M = ns + ns._PACKAGE = gsub (modname, "[^.]*$", "") + end + setfenv (2, ns) + for i, f in ipairs (arg) do + f (ns) + end +end diff --git a/lang/luafilesystem/Makefile b/lang/luafilesystem/Makefile new file mode 100644 index 00000000..55bb95e3 --- /dev/null +++ b/lang/luafilesystem/Makefile @@ -0,0 +1,67 @@ +# +# 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:=luafilesystem +PKG_VERSION:=1.6.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MIRROR_HASH:=b366bce608e6f18f1b3cb32c6eb6a78d78d17c3598a0d54c493601f9aadefdd8 +PKG_SOURCE_URL:=https://github.com/keplerproject/luafilesystem.git +PKG_SOURCE_VERSION:=2fd989cd6c777583be1c93616018c55b2cbb1bcf +PKG_SOURCE_PROTO:=git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/luafilesystem + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=LuaFileSystem + URL:=http://keplerproject.github.com/luafilesystem/ + MAINTAINER:=W. Michael Petullo + DEPENDS:=+liblua +endef + +define Package/luafilesystem/description + This package contains the LuaFileSystem library, a set of portable + functions for directory creation, listing and deletion and for file + locking. +endef + +define Build/Configure +endef + +TARGET_CFLAGS += $(FPIC) $(TARGET_CPPFLAGS) + +TARGET_LDFLAGS += -llua + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -std=gnu99" \ + LDFLAGS="$(TARGET_LDFLAGS)" + $(TARGET_CROSS)ar r $(PKG_BUILD_DIR)/src/luafilesystem.a $(PKG_BUILD_DIR)/src/lfs.o +endef + +define Build/InstallDev + $(INSTALL_DIR) $(STAGING_DIR)/usr/include + $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lfs.h $(STAGING_DIR)/usr/include + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lfs.so $(STAGING_DIR)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/luafilesystem.a $(STAGING_DIR)/usr/lib/lua +endef + +define Package/luafilesystem/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lfs.so $(1)/usr/lib/lua/lfs.so +endef + +$(eval $(call BuildPackage,luafilesystem)) diff --git a/lang/luai2c/Makefile b/lang/luai2c/Makefile new file mode 100644 index 00000000..08525d96 --- /dev/null +++ b/lang/luai2c/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2017 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:=luai2c +PKG_VERSION:=1.1.2 +PKG_RELEASE:=4 +PKG_MAINTAINER:=Frank Edelhaeuser +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_MIRROR_HASH:=1c25062e95064cda4866243ff6797ef597dd57260da559ca68129aa7a72a9cda +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/mrpace2/lua-i2c.git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=v$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/luai2c + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua I2C binding + URL:=https://github.com/mrpace2/lua-i2c/ + DEPENDS:=+liblua +kmod-i2c-core + MAINTAINER:=Frank Edelhaeuser +endef + +define Package/luai2c/description + This is the Lua binding for I2C. It provides access to I2C slaves supported by the kernel. +endef + +define Package/luai2c/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/i2c.so $(1)/usr/lib/lua + $(INSTALL_DIR) $(1)/usr/lib/lua/i2c + $(INSTALL_DATA) $(PKG_BUILD_DIR)/examples/* $(1)/usr/lib/lua/i2c +endef + +$(eval $(call BuildPackage,luai2c)) diff --git a/lang/luajit/Makefile b/lang/luajit/Makefile new file mode 100644 index 00000000..e5dfa953 --- /dev/null +++ b/lang/luajit/Makefile @@ -0,0 +1,92 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=luajit +PKG_VERSION:=2017-01-17-71ff7ef +PKG_RELEASE:=1 +PKG_MAINTAINER:=Morteza Milani +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=COPYRIGHT + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/LuaJIT/LuaJIT.git +PKG_SOURCE_VERSION:=71ff7ef8a7e0592dedb3527d4aacc68bf04af0bd +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_MIRROR_HASH:=543994d0822515d9b7dc7cbaa7737c48258403d56a3b30e729267421265d4618 +PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_USE_MIPS16:=0 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk + +define Package/luajit + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=LuaJIT + URL:=http://www.luajit.org + DEPENDS:=@(i386||x86_64||arm||armeb||powerpc||mips||mipsel) +endef + +define Package/luajit/description + LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language. *** Requires GCC Multilib on host system to build! *** +endef + +TARGET_CFLAGS += $(FPIC) -std=gnu99 +HOST_CFLAGS += $(FPIC) -std=gnu99 + +ifeq ($(HOST_ARCH),x86_64) + ifeq ($(CONFIG_x86_64),) + HOST_BITS := -m32 + endif +endif + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + HOST_CC="$(HOSTCC) $(HOST_CFLAGS) $(HOST_BITS)" \ + CROSS="$(TARGET_CROSS)" \ + DPREFIX=$(PKG_INSTALL_DIR)/usr \ + PREFIX=/usr \ + TARGET_CFLAGS="$(TARGET_CFLAGS)" + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR) + $(MAKE) -C $(PKG_BUILD_DIR) \ + DPREFIX=$(PKG_INSTALL_DIR)/usr \ + PREFIX=/usr \ + install +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/luajit-2.1 + $(CP) $(PKG_INSTALL_DIR)/usr/include/luajit-2.1/*.h $(1)/usr/include/luajit-2.1 + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{a,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/luajit.pc $(1)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/luajit-2.1.0-beta2 $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) +endef + +define Package/luajit/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/luajit-2.1.0-beta2 $(1)/usr/bin/$(PKG_NAME) +endef + +define Host/Compile + $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \ + DPREFIX=$(STAGING_DIR_HOSTPKG) \ + TARGET_CFLAGS="$(HOST_CFLAGS)" \ + TARGET_LDFLAGS="$(HOST_LDFLAGS)" +endef + +define Host/Install + $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \ + DPREFIX=$(STAGING_DIR_HOSTPKG) \ + install + $(CP) $(STAGING_DIR_HOSTPKG)/bin/luajit-2.1.0-beta2 $(STAGING_DIR_HOSTPKG)/bin/$(PKG_NAME) +endef + +$(eval $(call HostBuild,luajit)) +$(eval $(call BuildPackage,luajit)) diff --git a/lang/luajit/patches/010-lua-path.patch b/lang/luajit/patches/010-lua-path.patch new file mode 100644 index 00000000..63df9a11 --- /dev/null +++ b/lang/luajit/patches/010-lua-path.patch @@ -0,0 +1,13 @@ +--- a/src/luaconf.h ++++ b/src/luaconf.h +@@ -35,8 +35,8 @@ + #ifndef LUA_LMULTILIB + #define LUA_LMULTILIB "lib" + #endif +-#define LUA_LROOT "/usr/local" +-#define LUA_LUADIR "/lua/5.1/" ++#define LUA_LROOT "/usr" ++#define LUA_LUADIR "/lua/" + #define LUA_LJDIR "/luajit-2.1.0-beta2/" + + #ifdef LUA_ROOT diff --git a/lang/lualanes/Makefile b/lang/lualanes/Makefile new file mode 100644 index 00000000..ca4573b4 --- /dev/null +++ b/lang/lualanes/Makefile @@ -0,0 +1,58 @@ +# +# Copyright (C) 2007-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:=lualanes +PKG_REV:=aa9bfcf2dd49f55f11b27e7c21d5b75d81ccfc7e +PKG_VERSION:=3.9.4 +PKG_RELEASE=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz +PKG_MIRROR_HASH:=e9b053e627edaf7ef229af176177bf2bd0edd31b69690ba7c1e6be41041ffd07 +PKG_SOURCE_URL:=https://github.com/LuaLanes/lanes.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +PKG_BUILD_DEPENDS:=lua/host + +include $(INCLUDE_DIR)/package.mk + +define Package/lualanes + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=LuaLanes + URL:=http://luaforge.net/projects/lanes/ + DEPENDS:=+lua +luac +liblua +libpthread + MAINTAINER:=Vladimir Malyutin +endef + +define Package/lualanes/description + Lanes is a lightweight, native, lazy evaluating multithreading library for Lua 5.1 and 5.2. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) all \ + CC="$(TARGET_CC)" \ + LUA="$(STAGING_DIR_HOSTPKG)/bin/lua" \ + LUAC="$(STAGING_DIR_HOSTPKG)/bin/luac" \ + OPT_FLAGS="$(TARGET_CFLAGS) --std=c99 -Dpthread_yield=sched_yield" +endef + +define Package/lualanes/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lanes.lua $(1)/usr/lib/lua/ + $(INSTALL_DIR) $(1)/usr/lib/lua/lanes + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lanes/core.so $(1)/usr/lib/lua/lanes/core.so +endef + +$(eval $(call BuildPackage,lualanes)) diff --git a/lang/lualanes/patches/100-musl-compat.patch b/lang/lualanes/patches/100-musl-compat.patch new file mode 100644 index 00000000..ba3f49f9 --- /dev/null +++ b/lang/lualanes/patches/100-musl-compat.patch @@ -0,0 +1,13 @@ +diff --git a/src/threading.h b/src/threading.h +index bfa9ab8..7b3d6a1 100644 +--- a/src/threading.h ++++ b/src/threading.h +@@ -128,7 +128,7 @@ enum e_status { PENDING, RUNNING, WAITING, DONE, ERROR_ST, CANCELLED }; + #endif // PLATFORM_WIN32 + #include + +- #ifdef PLATFORM_LINUX ++ #if defined(PLATFORM_LINUX) && defined(__UCLIBC__) + # define _MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP + #else + /* OS X, ... */ diff --git a/lang/luaposix/Makefile b/lang/luaposix/Makefile new file mode 100644 index 00000000..92ff86d0 --- /dev/null +++ b/lang/luaposix/Makefile @@ -0,0 +1,65 @@ +# +# 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:=luaposix +PKG_VERSION:=v33.2.1 +PKG_RELEASE:=5 + +PKG_SOURCE:=release-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/luaposix/luaposix/archive/ +PKG_HASH:=4fb34dfea67f4cf3194cdecc6614c9aea67edc3c4093d34137669ea869c358e1 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION) +PKG_REMOVE_FILES:=aclocal.m4 +PKG_FIXUP:=autoreconf +PKG_MAINTAINER:=Maxim Storchak +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_DEPENDS:=lua/host + +include $(INCLUDE_DIR)/package.mk + +define Package/luaposix + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=luaposix + URL:=http://luaforge.net/projects/luaposix/ + DEPENDS:=+lua +librt +endef + +define Package/luaposix/description + luaposix is a general POSIX library for Lua providing access + to various low level libc functions. +endef + +CONFIGURE_VARS += ac_cv_path_LDOC="true" + +TARGET_CFLAGS += -DLUA_USE_LINUX $(FPIC) -std=gnu99 +ifeq ($(CONFIG_USE_MUSL),y) + TARGET_CFLAGS += -D_POSIX_PRIORITY_SCHEDULING + # Musl doesn't do all of XOPEN_REALTIME, but it does for luaposix. + # see https://github.com/luaposix/luaposix/issues/295 + TARGET_CFLAGS += -D_XOPEN_REALTIME=1 +endif + +ifneq ($(CONFIG_USE_GLIBC),) + ifeq ($(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),) + TARGET_CFLAGS += -DNO_GETLOGIN + endif +endif + + +define Package/luaposix/install + $(INSTALL_DIR) $(1)/usr/lib/lua/posix + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ext/posix/.libs/posix.so $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/posix.lua $(1)/usr/lib/lua +endef + +$(eval $(call BuildPackage,luaposix)) diff --git a/lang/luaposix/patches/100-eglibc-compat.patch b/lang/luaposix/patches/100-eglibc-compat.patch new file mode 100644 index 00000000..e4df63bf --- /dev/null +++ b/lang/luaposix/patches/100-eglibc-compat.patch @@ -0,0 +1,30 @@ +diff --git a/ext/posix/unistd.c b/ext/posix/unistd.c +index 9276640..69c8cef 100644 +--- a/ext/posix/unistd.c ++++ b/ext/posix/unistd.c +@@ -525,6 +525,7 @@ Pgetgroups(lua_State *L) + #endif + + ++#ifndef NO_GETLOGIN + /*** + Current logged-in user. + @treturn[1] string username, if successful +@@ -537,6 +538,7 @@ Pgetlogin(lua_State *L) + checknargs(L, 0); + return pushstringresult(getlogin()); + } ++#endif + + + /*** +@@ -1044,7 +1046,9 @@ static const luaL_Reg posix_unistd_fns[] = + LPOSIX_FUNC( Pgetegid ), + LPOSIX_FUNC( Pgeteuid ), + LPOSIX_FUNC( Pgetgid ), ++#ifndef NO_GETLOGIN + LPOSIX_FUNC( Pgetlogin ), ++#endif + LPOSIX_FUNC( Pgetpgrp ), + LPOSIX_FUNC( Pgetpid ), + LPOSIX_FUNC( Pgetppid ), diff --git a/lang/luaposix/patches/101-disable-curses.patch b/lang/luaposix/patches/101-disable-curses.patch new file mode 100644 index 00000000..6412799b --- /dev/null +++ b/lang/luaposix/patches/101-disable-curses.patch @@ -0,0 +1,32 @@ +diff --git a/configure.ac b/configure.ac +index dfd4199..19924d0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -153,15 +153,6 @@ AC_CHECK_LIB([rt], [clock_gettime]) + AC_SUBST([LIBRT], [$LIBS]) + LIBS=$save_LIBS + +-## Curses +-AX_WITH_CURSES +-AC_ARG_VAR(CURSES_LIB, [linker flags for curses library]) +- +-save_LIBS=$LIBS +-LIBS="$CURSES_LIB $LIBS" +-AC_CHECK_FUNCS([resizeterm]) +-LIBS=$save_LIBS +- + ## Use system implementation, or bundled replacement? + AC_CHECK_FUNCS([strlcpy]) + +diff --git a/ext/posix/posix.c b/ext/posix/posix.c +index 6019df0..2d75487 100644 +--- a/ext/posix/posix.c ++++ b/ext/posix/posix.c +@@ -12,7 +12,6 @@ + + #include "bit32.c" + #include "ctype.c" +-#include "curses.c" + #include "dirent.c" + #include "errno.c" + #include "fcntl.c" diff --git a/lang/luaposix/patches/102-disable-compat-deprecated.diff b/lang/luaposix/patches/102-disable-compat-deprecated.diff new file mode 100644 index 00000000..7c58be48 --- /dev/null +++ b/lang/luaposix/patches/102-disable-compat-deprecated.diff @@ -0,0 +1,20 @@ +diff --git a/lib/posix.lua.in b/lib/posix.lua.in +index 17ef39a..a248d9b 100644 +--- a/lib/posix.lua.in ++++ b/lib/posix.lua.in +@@ -35,15 +35,6 @@ for _, sub in ipairs { + end + end + +- +--- Inject deprecated APIs (overwriting submodules) for backwards compatibility. +-for k, v in pairs (require "posix.deprecated") do +- M[k] = v +-end +-for k, v in pairs (require "posix.compat") do +- M[k] = v +-end +- + M.version = "posix for " .. _VERSION .. " / @PACKAGE_STRING@" + + diff --git a/lang/luarocks/Makefile b/lang/luarocks/Makefile new file mode 100644 index 00000000..3428ef83 --- /dev/null +++ b/lang/luarocks/Makefile @@ -0,0 +1,81 @@ +# +# Copyright (C) 2006-2015 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:=luarocks +PKG_VERSION:=2.2.2 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_MIRROR_HASH:=e4cf874c9bce34a5accd41daaf51a3213763b8b6f7f658ca4d13a70a7ddb1c0c +PKG_SOURCE_PROTO:=git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=https://github.com/keplerproject/luarocks.git +PKG_SOURCE_VERSION:=v$(PKG_VERSION) + +PKG_MAINTAINER:=Amr Hassan +PKG_INSTALL=1 +PKG_BUILD_DEPENDS:=lua/host +HOST_BUILD_DEPENDS:=$(PKG_BUILD_DEPENDS) +PKG_LICENSE=GPL +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk + +define Package/luarocks + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=luarocks + URL:=https://github.com/keplerproject/luarocks + DEPENDS:=+lua +luac +liblua +luasocket +unzip +curl +luasec +endef + +define Package/luarocks/description + LuaRocks is a deployment and management system for Lua modules. +endef + +# My custom args, copied and modified from SDK_ROOT/include/package-defaults.mk +CONFIGURE_ARGS = \ + --prefix=$(CONFIGURE_PREFIX) \ + --sysconfdir=/etc \ + --with-lua=$(STAGING_DIR_HOSTPKG) + +HOST_CONFIGURE_ARGS= \ + --prefix=$(STAGING_DIR_HOSTPKG) \ + --sysconfdir=$(STAGING_DIR_HOSTPKG)/etc \ + --with-lua=$(STAGING_DIR_HOSTPKG) + +CONFIGURE_VARS = \ + LUAROCKS_UNAME_S="Linux" \ + LUAROCKS_UNAME_M="$(ARCH)" + +define Build/Compile + $(call Build/Compile/Default,build) +endef + +define Host/Compile + $(call Host/Compile/Default,build) +endef + +define Package/luarocks/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luarocks-5.1 $(1)/usr/bin/luarocks + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luarocks-admin-5.1 $(1)/usr/bin/luarocks-admin + $(CP) $(PKG_INSTALL_DIR)/usr/share $(1)/usr/share + $(CP) $(PKG_INSTALL_DIR)/etc $(1)/etc +endef + +define Host/Install + $(MAKE) -C $(HOST_BUILD_DIR) install +endef + +$(eval $(call BuildPackage,luarocks)) + +$(eval $(call HostBuild)) diff --git a/lang/luarocks/patches/01_dont_modify_bin_shebang.diff b/lang/luarocks/patches/01_dont_modify_bin_shebang.diff new file mode 100644 index 00000000..a1bad215 --- /dev/null +++ b/lang/luarocks/patches/01_dont_modify_bin_shebang.diff @@ -0,0 +1,13 @@ +diff -rupN luarocks/Makefile luarocks.new/Makefile +--- luarocks/Makefile 2015-02-19 13:24:07.027310956 +0200 ++++ luarocks.new/Makefile 2015-02-22 13:28:24.497353543 +0200 +@@ -104,7 +104,7 @@ build_bins: cleanup_bins + for f in $(BIN_FILES) ;\ + do \ + sed "1d" src/bin/$$f > src/bin/$$f.bak ;\ +- echo "#!$(LUA_BINDIR)/lua$(LUA_SUFFIX)" > src/bin/$$f ;\ ++ echo "#!/usr/bin/env lua" > src/bin/$$f ;\ + echo "package.path = [[$(LUADIR)/?.lua;]]..package.path" | sed "s,//,/,g" >> src/bin/$$f ;\ + cat src/bin/$$f.bak >> src/bin/$$f ;\ + chmod +x src/bin/$$f ;\ +Binary files luarocks/src/bin/.luarocks.swp and luarocks.new/src/bin/.luarocks.swp differ diff --git a/lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch b/lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch new file mode 100644 index 00000000..5c9c9688 --- /dev/null +++ b/lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch @@ -0,0 +1,37 @@ +Index: luarocks-2.2.2/configure +=================================================================== +--- luarocks-2.2.2.orig/configure ++++ luarocks-2.2.2/configure +@@ -388,18 +388,22 @@ then + fi + + echo_n "Configuring for system... " +-if uname -s +-then +- LUAROCKS_UNAME_S=`uname -s` +-else +- die "Could not determine operating system. 'uname -s' failed." ++if [ -z "$LUAROCKS_UNAME_S" ]; then ++ if uname -s ++ then ++ LUAROCKS_UNAME_S=`uname -s` ++ else ++ die "Could not determine operating system. 'uname -s' failed." ++ fi + fi + echo_n "Configuring for architecture... " +-if uname -m +-then +- LUAROCKS_UNAME_M=`uname -m` +-else +- die "Could not determine processor architecture. 'uname -m' failed." ++if [ -z "$LUAROCKS_UNAME_M" ]; then ++ if uname -m ++ then ++ LUAROCKS_UNAME_M=`uname -m` ++ else ++ die "Could not determine processor architecture. 'uname -m' failed." ++ fi + fi + + for v in 5.1 5.2 5.3; do diff --git a/lang/luasec/Makefile b/lang/luasec/Makefile new file mode 100644 index 00000000..4bf05acc --- /dev/null +++ b/lang/luasec/Makefile @@ -0,0 +1,61 @@ +# +# 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:=luasec +PKG_VERSION:=0.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/brunoos/luasec/archive/ +PKG_HASH:=cef3a35c18beb8a54d9c8ce6260a4cabbd9a386de8711320d084daffad0aed5d +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION) + +MAINTAINER:=W. Michael Petullo +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/luasec + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=LuaSec + URL:=https://github.com/brunoos/luasec + DEPENDS:=+lua +libopenssl +luasocket +endef + +define Package/luasec/description + LuaSec is a binding for OpenSSL library to provide TLS/SSL communication. +endef + +define Build/Configure +endef + +MAKE_FLAGS += \ + INCDIR="$(TARGET_CPPFLAGS) -I." \ + LIBDIR="$(TARGET_LDFLAGS) -L./luasocket" \ + LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \ + LUAPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" + +define Build/Compile +$(call Build/Compile/Default,linux) +endef + +define Package/luasec/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.so $(1)/usr/lib/lua/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.lua $(1)/usr/lib/lua/ + $(INSTALL_DIR) $(1)/usr/lib/lua/ssl + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl/https.lua $(1)/usr/lib/lua/ssl/ +endef + +$(eval $(call BuildPackage,luasec)) diff --git a/lang/luasoap/Makefile b/lang/luasoap/Makefile new file mode 100644 index 00000000..de88fcf9 --- /dev/null +++ b/lang/luasoap/Makefile @@ -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_HASH:=839317e9a12c0723cf15eb5cea8d249e3f666a077585018fb8757aa1fb47d4e8 + +PKG_MAINTAINER:=Liu Peng +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)) diff --git a/lang/luasocket/Makefile b/lang/luasocket/Makefile new file mode 100644 index 00000000..ba8ca2a6 --- /dev/null +++ b/lang/luasocket/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2009-2013 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:=luasocket +PKG_SOURCE_VERSION:=6d5e40c324c84d9c1453ae88e0ad5bdd0a631448 +PKG_VERSION:=3.0-rc1-20130909 +PKG_RELEASE:=4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MIRROR_HASH:=d2fa075d8bd026c41e0eb1a634ac2ad8115dee8abb070720e8e91fab51f86ee4 +PKG_SOURCE_URL:=https://github.com/diegonehab/luasocket.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/luasocket + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=LuaSocket + URL:=http://luasocket.luaforge.net/ + MAINTAINER:=W. Michael Petullo + DEPENDS:=+lua +endef + +define Package/luasocket/description + LuaSocket is the most comprehensive networking support + library for the Lua language. It provides easy access to + TCP, UDP, DNS, SMTP, FTP, HTTP, MIME and much more. +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/ \ + LIBDIR="$(TARGET_LDFLAGS)" \ + CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \ + LD="$(TARGET_CROSS)ld -shared" \ + all +endef + + +define Package/luasocket/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ltn12,mime,socket}.lua $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mime.so.1.0.3 $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/socket.so.3.0-rc1 $(1)/usr/lib/lua + $(INSTALL_DIR) $(1)/usr/lib/lua/mime + ln -sf ../mime.so.1.0.3 $(1)/usr/lib/lua/mime/core.so + $(INSTALL_DIR) $(1)/usr/lib/lua/socket + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ftp,http,smtp,tp,url,headers}.lua $(1)/usr/lib/lua/socket + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/unix.so $(1)/usr/lib/lua/socket + ln -sf ../socket.so.3.0-rc1 $(1)/usr/lib/lua/socket/core.so +endef + +$(eval $(call BuildPackage,luasocket)) diff --git a/lang/luasocket/patches/0001-Add-interface-support.patch b/lang/luasocket/patches/0001-Add-interface-support.patch new file mode 100644 index 00000000..3be42ed5 --- /dev/null +++ b/lang/luasocket/patches/0001-Add-interface-support.patch @@ -0,0 +1,237 @@ +From 96fdf07acf78ecfc9be76a8b0591f38fe6f1a875 Mon Sep 17 00:00:00 2001 +From: Steven Barth +Date: Sat, 9 Nov 2013 12:01:42 +0100 +Subject: [PATCH] Add interface resolving + +--- + src/if.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + src/if.h | 27 ++++++++++++++ + src/luasocket.c | 2 + + src/makefile | 2 + + src/options.c | 9 +++++ + 5 files changed, 153 insertions(+) + create mode 100644 src/if.c + create mode 100644 src/if.h + +diff --git a/src/if.c b/src/if.c +new file mode 100644 +index 0000000..db231aa +--- /dev/null ++++ b/src/if.c +@@ -0,0 +1,113 @@ ++/* ++ * $Id: if.c $ ++ * ++ * Author: Markus Stenberg ++ * ++ * Copyright (c) 2012 cisco Systems, Inc. ++ * ++ * Created: Tue Dec 4 14:50:34 2012 mstenber ++ * Last modified: Wed Dec 5 18:51:08 2012 mstenber ++ * Edit time: 24 min ++ * ++ */ ++ ++#include ++#include ++#include ++ ++#include "if.h" ++ ++#include "lauxlib.h" ++ ++static int if_global_indextoname(lua_State *L); ++static int if_global_nametoindex(lua_State *L); ++static int if_global_nameindex(lua_State *L); ++ ++static luaL_Reg func[] = { ++ { "indextoname", if_global_indextoname}, ++ { "nametoindex", if_global_nametoindex}, ++ { "nameindex", if_global_nameindex}, ++ { NULL, NULL} ++}; ++ ++int if_open(lua_State *L) ++{ ++ lua_pushstring(L, "iface"); ++ lua_newtable(L); ++ luaL_openlib(L, NULL, func, 0); ++ lua_settable(L, -3); ++ return 0; ++} ++ ++int if_global_indextoname(lua_State *L) ++{ ++ unsigned int ifnumber; ++ const char *name; ++ char buf[IF_NAMESIZE+1]; ++ ++ if (!lua_isnumber(L, 1)) ++ { ++ lua_pushnil(L); ++ lua_pushstring(L, "indextoname expects only number argument"); ++ return 2; ++ } ++ ifnumber = lua_tonumber(L, 1); ++ if (!(name = if_indextoname(ifnumber, buf))) ++ { ++ lua_pushnil(L); ++ lua_pushstring(L, "nonexistent interface"); ++ return 2; ++ } ++ lua_pushstring(L, name); ++ return 1; ++} ++ ++int if_global_nametoindex(lua_State *L) ++{ ++ unsigned int ifnumber; ++ if (!lua_isstring(L, 1)) ++ { ++ lua_pushnil(L); ++ lua_pushstring(L, "nametoindex expects only string argument"); ++ return 2; ++ } ++ if (!(ifnumber = if_nametoindex(lua_tostring(L, 1)))) ++ { ++ lua_pushnil(L); ++ lua_pushstring(L, "nonexistent interface"); ++ return 2; ++ } ++ lua_pushnumber(L, ifnumber); ++ return 1; ++} ++ ++int if_global_nameindex(lua_State *L) ++{ ++ struct if_nameindex *ni, *oni; ++ int i = 1; ++ oni = ni = if_nameindex(); ++ lua_newtable(L); ++ while (ni && ni->if_index && *(ni->if_name)) ++ { ++ /* at result[i], we store.. */ ++ lua_pushnumber(L, i); ++ ++ /* new table with two items - index, name*/ ++ lua_newtable(L); ++ lua_pushstring(L, "index"); ++ lua_pushnumber(L, ni->if_index); ++ lua_settable(L, -3); ++ ++ lua_pushstring(L, "name"); ++ lua_pushstring(L, ni->if_name); ++ lua_settable(L, -3); ++ ++ /* Then, actually store it */ ++ lua_settable(L, -3); ++ ++ i++; ++ ni++; ++ } ++ if_freenameindex(oni); ++ return 1; ++} +diff --git a/src/if.h b/src/if.h +new file mode 100644 +index 0000000..dc7faf8 +--- /dev/null ++++ b/src/if.h +@@ -0,0 +1,27 @@ ++/* ++ * $Id: if.h $ ++ * ++ * Author: Markus Stenberg ++ * ++ * Copyright (c) 2012 cisco Systems, Inc. ++ * ++ * Created: Tue Dec 4 14:37:24 2012 mstenber ++ * Last modified: Tue Dec 4 14:51:43 2012 mstenber ++ * Edit time: 7 min ++ * ++ */ ++ ++/* This module provides Lua wrapping for the advanced socket API ++ * defined in RFC3542, or mainly, the access to the system's interface ++ * list. It is necessary for use of recvmsg/sendmsg. ++ * ++ * TODO - Do something clever with Windows? ++ */ ++#ifndef IF_H ++#define IF_H ++ ++#include "lua.h" ++ ++int if_open(lua_State *L); ++ ++#endif /* IF_H */ +diff --git a/src/luasocket.c b/src/luasocket.c +index e6ee747..85d41a6 100644 +--- a/src/luasocket.c ++++ b/src/luasocket.c +@@ -31,6 +31,7 @@ + #include "tcp.h" + #include "udp.h" + #include "select.h" ++#include "if.h" + + /*-------------------------------------------------------------------------*\ + * Internal function prototypes +@@ -51,6 +52,7 @@ static const luaL_Reg mod[] = { + {"tcp", tcp_open}, + {"udp", udp_open}, + {"select", select_open}, ++ {"iface", if_open}, + {NULL, NULL} + }; + +diff --git a/src/makefile b/src/makefile +index 8d3521e..09d4882 100644 +--- a/src/makefile ++++ b/src/makefile +@@ -262,6 +262,7 @@ SOCKET_OBJS= \ + auxiliar.$(O) \ + options.$(O) \ + inet.$(O) \ ++ if.$(O) \ + $(SOCKET) \ + except.$(O) \ + select.$(O) \ +@@ -387,6 +388,7 @@ auxiliar.$(O): auxiliar.c auxiliar.h + buffer.$(O): buffer.c buffer.h io.h timeout.h + except.$(O): except.c except.h + inet.$(O): inet.c inet.h socket.h io.h timeout.h usocket.h ++if.$(O): if.c if.h + io.$(O): io.c io.h timeout.h + luasocket.$(O): luasocket.c luasocket.h auxiliar.h except.h \ + timeout.h buffer.h io.h inet.h socket.h usocket.h tcp.h \ +diff --git a/src/options.c b/src/options.c +index 8ac2a14..1c73e6f 100644 +--- a/src/options.c ++++ b/src/options.c +@@ -3,6 +3,9 @@ + * LuaSocket toolkit + \*=========================================================================*/ + #include ++#include ++#include ++#include + + #include "lauxlib.h" + +@@ -285,6 +288,12 @@ static int opt_ip6_setmembership(lua_State *L, p_socket ps, int level, int name) + if (!lua_isnil(L, -1)) { + if (lua_isnumber(L, -1)) { + val.ipv6mr_interface = (unsigned int) lua_tonumber(L, -1); ++ } else if (lua_isstring(L, -1)) { ++ if (!(val.ipv6mr_interface = if_nametoindex(lua_tostring(L, -1)))) { ++ lua_pushnil(L); ++ lua_pushstring(L, "nonexistent interface"); ++ return 2; ++ } + } else + luaL_argerror(L, -1, "number 'interface' field expected"); + } +-- +1.8.4.rc3 + diff --git a/lang/luasocket/patches/0301-Fix-mpc85xx-build.patch b/lang/luasocket/patches/0301-Fix-mpc85xx-build.patch new file mode 100644 index 00000000..c3bf949c --- /dev/null +++ b/lang/luasocket/patches/0301-Fix-mpc85xx-build.patch @@ -0,0 +1,25 @@ +--- a/src/makefile ++++ b/src/makefile +@@ -345,18 +345,18 @@ none: + all: $(SOCKET_SO) $(MIME_SO) + + $(SOCKET_SO): $(SOCKET_OBJS) +- $(LD) $(SOCKET_OBJS) $(LDFLAGS)$@ ++ $(CC) $(SOCKET_OBJS) $(LDFLAGS)$@ + + $(MIME_SO): $(MIME_OBJS) +- $(LD) $(MIME_OBJS) $(LDFLAGS)$@ ++ $(CC) $(MIME_OBJS) $(LDFLAGS)$@ + + all-unix: all $(UNIX_SO) $(SERIAL_SO) + + $(UNIX_SO): $(UNIX_OBJS) +- $(LD) $(UNIX_OBJS) $(LDFLAGS)$@ ++ $(CC) $(UNIX_OBJS) $(LDFLAGS)$@ + + $(SERIAL_SO): $(SERIAL_OBJS) +- $(LD) $(SERIAL_OBJS) $(LDFLAGS)$@ ++ $(CC) $(SERIAL_OBJS) $(LDFLAGS)$@ + + install: + $(INSTALL_DIR) $(INSTALL_TOP_LDIR) diff --git a/lang/luasql/Makefile b/lang/luasql/Makefile new file mode 100644 index 00000000..3f904f8c --- /dev/null +++ b/lang/luasql/Makefile @@ -0,0 +1,119 @@ +# +# 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.3.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_MIRROR_HASH:=b6251065656bf3e066d90d492dd06eec2c2cc76ab4b94187ce3ed9620d41f741 +PKG_SOURCE_PROTO:=git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=https://github.com/keplerproject/luasql.git +PKG_SOURCE_VERSION:=v$(PKG_VERSION) + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=docs/us/license.html +PKG_MAINTAINER:=Nicolas Thill + +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://keplerproject.github.io/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)) diff --git a/lang/luv/Config.in b/lang/luv/Config.in new file mode 100644 index 00000000..076473f3 --- /dev/null +++ b/lang/luv/Config.in @@ -0,0 +1,11 @@ +menu "Configuration" + depends on PACKAGE_luv + +config LUV_USE_LUAJIT_ENGINE + bool "Use luajit engine" + select PACKAGE_luajit + help + If selected, luv will be compiled against luajit. If not selected, luv will use Lua as engine. + default n + +endmenu diff --git a/lang/luv/Makefile b/lang/luv/Makefile new file mode 100644 index 00000000..a0057f1c --- /dev/null +++ b/lang/luv/Makefile @@ -0,0 +1,61 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=luv +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/luvit/luv.git +PKG_SOURCE_VERSION:=1.9.1-1 +PKG_SOURCE_DATE:=2016-12-16 + +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +PKG_USE_MIPS16:=0 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/luv + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Luv + URL:=https://github.com/luvit/luv + MAINTAINER:=Morteza Milani + DEPENDS:=+libuv +!LUV_USE_LUAJIT_ENGINE:lua +endef + +define Package/luv/description + Bare libuv bindings for lua +endef + +define Package/luv/config + source "$(SOURCE)/Config.in" +endef + +CMAKE_OPTIONS += -DLUA_BUILD_TYPE=System +CMAKE_OPTIONS += -DWITH_SHARED_LIBUV=ON +CMAKE_OPTIONS += -DBUILD_MODULE=OFF +CMAKE_OPTIONS += -DBUILD_SHARED_LIBS=ON + +ifeq ($(CONFIG_LUV_USE_LUAJIT_ENGINE),y) + CMAKE_OPTIONS += -DWITH_LUA_ENGINE=Luajit +else + CMAKE_OPTIONS += -DWITH_LUA_ENGINE=Lua +endif + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/luv + $(CP) $(PKG_INSTALL_DIR)/usr/include/luv/*.h $(1)/usr/include/luv + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib +endef + +define Package/luv/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libluv.so.1.9.1 $(1)/usr/lib/lua/luv.so +endef + + +$(eval $(call BuildPackage,luv)) diff --git a/lang/lzmq/Makefile b/lang/lzmq/Makefile new file mode 100644 index 00000000..8ac4453a --- /dev/null +++ b/lang/lzmq/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2015 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:=lzmq +PKG_VERSION:=0.4.3 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Dirk Chang +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/zeromq/lzmq/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=51ec00117b0570db82b1eba7b62e95d7e98c880a028584b195a98b433dd8edd1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/lzmq + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua ZeroMQ binding + URL:=https://github.com/moteus/lzmq/ + DEPENDS:= +lua +libzmq +endef + +define Package/lzmq/description + LZMQ is a Lua binding to ZeroMQ. +endef + +CMAKE_OPTIONS += \ + -DUSE_LUA=ON + +define Package/lzmq/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lzmq.so $(1)/usr/lib/lua/ + + $(INSTALL_DIR) $(1)/usr/lib/lua/lzmq + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lzmq/timer.so $(1)/usr/lib/lua/lzmq + $(CP) -R $(PKG_BUILD_DIR)/src/lua/lzmq/* $(1)/usr/lib/lua/lzmq +endef + +$(eval $(call BuildPackage,lzmq)) diff --git a/lang/node-arduino-firmata/Makefile b/lang/node-arduino-firmata/Makefile new file mode 100644 index 00000000..d8ce5886 --- /dev/null +++ b/lang/node-arduino-firmata/Makefile @@ -0,0 +1,68 @@ +# +# Copyright (C) 2014 Arduino LLC +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NPM_NAME:=arduino-firmata +PKG_NAME:=node-$(PKG_NPM_NAME) +PKG_VERSION:=0.3.4 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/shokai/node-arduino-firmata.git +PKG_SOURCE_VERSION:=v0.3.4 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz +#PKG_MIRROR_HASH:=b7a498ccf70e466503e72d38ae5b474e91416b6c9842fd167dff249357b0dc37 + +PKG_BUILD_DEPENDS:=node/host +PKG_NODE_VERSION:=8.10.0 + +PKG_MAINTAINER:=John Crispin +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE.txt + +include $(INCLUDE_DIR)/package.mk + +define Package/node-arduino-firmata + SUBMENU:=Node.js + SECTION:=lang + CATEGORY:=Languages + TITLE:=Node.js package to access serial ports for reading and writing + URL:=https://www.npmjs.org/package/serialport + DEPENDS:=+node +node-npm +node-serialport +endef + +define Package/node-arduino-firmata/description + Node.js package to access serial ports for reading and writing OR Welcome your robotic JavaScript overlords. Better yet, program them! +endef + +define Build/Prepare + /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1 + $(Build/Patch) +endef + +EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \ + +define Build/Compile + $(MAKE_FLAGS) \ + npm_config_arch=$(CONFIG_ARCH) \ + npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \ + npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \ + PREFIX="$(PKG_INSTALL_DIR)/usr/" \ + npm install -g $(PKG_BUILD_DIR) +endef + +define Package/node-arduino-firmata/install + mkdir -p $(1)/usr/lib/node + $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/ $(1)/usr/lib/node + rm -rf $(1)/usr/lib/node/arduino-firmata/node_modules/serialport/ + $(CP) ./files/* $(1)/ +endef + +$(eval $(call BuildPackage,node-arduino-firmata)) + diff --git a/lang/node-arduino-firmata/files/usr/lib/node/arduino-firmata/lib/arduino-firmata.js b/lang/node-arduino-firmata/files/usr/lib/node/arduino-firmata/lib/arduino-firmata.js new file mode 100644 index 00000000..578bd402 --- /dev/null +++ b/lang/node-arduino-firmata/files/usr/lib/node/arduino-firmata/lib/arduino-firmata.js @@ -0,0 +1,306 @@ +(function() { + 'use strict'; + var ArduinoFirmata, SerialPort, debug, events, exports, serialport, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + events = require('eventemitter2'); + + SerialPort = (serialport = require('serialport')).SerialPort; + + debug = require('debug')('arduino-firmata'); + + exports = module.exports = ArduinoFirmata = (function(superClass) { + extend(ArduinoFirmata, superClass); + + ArduinoFirmata.Status = { + CLOSE: 0, + OPEN: 1 + }; + + ArduinoFirmata.INPUT = 0; + + ArduinoFirmata.OUTPUT = 1; + + ArduinoFirmata.ANALOG = 2; + + ArduinoFirmata.PWM = 3; + + ArduinoFirmata.SERVO = 4; + + ArduinoFirmata.SHIFT = 5; + + ArduinoFirmata.I2C = 6; + + ArduinoFirmata.LOW = 0; + + ArduinoFirmata.HIGH = 1; + + ArduinoFirmata.MAX_DATA_BYTES = 32; + + ArduinoFirmata.DIGITAL_MESSAGE = 0x90; + + ArduinoFirmata.ANALOG_MESSAGE = 0xE0; + + ArduinoFirmata.REPORT_ANALOG = 0xC0; + + ArduinoFirmata.REPORT_DIGITAL = 0xD0; + + ArduinoFirmata.SET_PIN_MODE = 0xF4; + + ArduinoFirmata.REPORT_VERSION = 0xF9; + + ArduinoFirmata.SYSTEM_RESET = 0xFF; + + ArduinoFirmata.START_SYSEX = 0xF0; + + ArduinoFirmata.END_SYSEX = 0xF7; + + ArduinoFirmata.list = function(callback) { + return serialport.list(function(err, ports) { + var devices, j, len, port; + if (err) { + return callback(err); + } + devices = []; + for (j = 0, len = ports.length; j < len; j++) { + port = ports[j]; + if (/usb|acm|com\d+/i.test(port.comName)) { + devices.push(port.comName); + } + } + return callback(null, devices); + }); + }; + + function ArduinoFirmata() { + this.status = ArduinoFirmata.Status.CLOSE; + this.wait_for_data = 0; + this.execute_multi_byte_command = 0; + this.multi_byte_channel = 0; + this.stored_input_data = []; + this.parsing_sysex = false; + this.sysex_bytes_read = 0; + this.digital_output_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + this.digital_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + this.analog_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + this.boardVersion = null; + } + + ArduinoFirmata.prototype.isOldArduinoDevice = function() { + return /usbserial|USB/.test(this.serialport_name); + }; + + ArduinoFirmata.prototype.connect = function(serialport_name, opts) { + this.serialport_name = serialport_name; + if (opts == null) { + opts = { + baudrate: 57600 + }; + } + opts.parser = serialport.parsers.raw; + if (!this.serialport_name) { + ArduinoFirmata.list((function(_this) { + return function(err, devices) { + return _this.connect(devices[0], opts); + }; + })(this)); + return this; + } + this.once('boardReady', function() { + var io_init_wait; + debug('boardReady'); + io_init_wait = this.isOldArduinoDevice() ? (debug("old arduino device found " + this.serialport_name), 3000) : (debug("new arduino device found " + this.serialport_name), 100); + debug("wait " + io_init_wait + "(msec)"); + return setTimeout((function(_this) { + return function() { + var i, j, k; + for (i = j = 0; j < 6; i = ++j) { + _this.write([ArduinoFirmata.REPORT_ANALOG | i, 1]); + } + for (i = k = 0; k < 2; i = ++k) { + _this.write([ArduinoFirmata.REPORT_DIGITAL | i, 1]); + } + debug('init IO ports'); + return _this.emit('connect'); + }; + })(this), io_init_wait); + }); + this.serialport = new SerialPort(this.serialport_name, opts); + this.serialport.once('open', (function(_this) { + return function() { + var cid; + cid = setInterval(function() { + debug('request REPORT_VERSION'); + return _this.write([ArduinoFirmata.REPORT_VERSION]); + }, 500); + _this.once('boardVersion', function(version) { + clearInterval(cid); + _this.status = ArduinoFirmata.Status.OPEN; + return _this.emit('boardReady'); + }); + return _this.serialport.on('data', function(data) { + var byte, j, len, results; + results = []; + for (j = 0, len = data.length; j < len; j++) { + byte = data[j]; + results.push(_this.process_input(byte)); + } + return results; + }); + }; + })(this)); + return this; + }; + + ArduinoFirmata.prototype.isOpen = function() { + return this.status === ArduinoFirmata.Status.OPEN; + }; + + ArduinoFirmata.prototype.close = function(callback) { + this.status = ArduinoFirmata.Status.CLOSE; + return this.serialport.close(callback); + }; + + ArduinoFirmata.prototype.reset = function(callback) { + return this.write([ArduinoFirmata.SYSTEM_RESET], callback); + }; + + ArduinoFirmata.prototype.write = function(bytes, callback) { + return this.serialport.write(bytes, callback); + }; + + ArduinoFirmata.prototype.sysex = function(command, data, callback) { + var write_data; + if (data == null) { + data = []; + } + data = data.map(function(i) { + return i & 0x7f; + }); + write_data = [ArduinoFirmata.START_SYSEX, command].concat(data, [ArduinoFirmata.END_SYSEX]); + return this.write(write_data, callback); + }; + + ArduinoFirmata.prototype.pinMode = function(pin, mode, callback) { + switch (mode) { + case true: + mode = ArduinoFirmata.OUTPUT; + break; + case false: + mode = ArduinoFirmata.INPUT; + } + return this.write([ArduinoFirmata.SET_PIN_MODE, pin, mode], callback); + }; + + ArduinoFirmata.prototype.digitalWrite = function(pin, value, callback) { + var port_num; + this.pinMode(pin, ArduinoFirmata.OUTPUT); + port_num = (pin >>> 3) & 0x0F; + if (value === 0 || value === false) { + this.digital_output_data[port_num] &= ~(1 << (pin & 0x07)); + } else { + this.digital_output_data[port_num] |= 1 << (pin & 0x07); + } + return this.write([ArduinoFirmata.DIGITAL_MESSAGE | port_num, this.digital_output_data[port_num] & 0x7F, this.digital_output_data[port_num] >>> 7], callback); + }; + + ArduinoFirmata.prototype.analogWrite = function(pin, value, callback) { + value = Math.floor(value); + this.pinMode(pin, ArduinoFirmata.PWM); + return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), value & 0x7F, value >>> 7], callback); + }; + + ArduinoFirmata.prototype.servoWrite = function(pin, angle, callback) { + this.pinMode(pin, ArduinoFirmata.SERVO); + return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), angle & 0x7F, angle >>> 7], callback); + }; + + ArduinoFirmata.prototype.digitalRead = function(pin) { + return ((this.digital_input_data[pin >>> 3] >>> (pin & 0x07)) & 0x01) > 0; + }; + + ArduinoFirmata.prototype.analogRead = function(pin) { + return this.analog_input_data[pin]; + }; + + ArduinoFirmata.prototype.process_input = function(input_data) { + var analog_value, command, diff, i, j, old_analog_value, results, stat, sysex_command, sysex_data; + if (this.parsing_sysex) { + if (input_data === ArduinoFirmata.END_SYSEX) { + this.parsing_sysex = false; + sysex_command = this.stored_input_data[0]; + sysex_data = this.stored_input_data.slice(1, this.sysex_bytes_read); + return this.emit('sysex', { + command: sysex_command, + data: sysex_data + }); + } else { + this.stored_input_data[this.sysex_bytes_read] = input_data; + return this.sysex_bytes_read += 1; + } + } else if (this.wait_for_data > 0 && input_data < 128) { + this.wait_for_data -= 1; + this.stored_input_data[this.wait_for_data] = input_data; + if (this.execute_multi_byte_command !== 0 && this.wait_for_data === 0) { + switch (this.execute_multi_byte_command) { + case ArduinoFirmata.DIGITAL_MESSAGE: + input_data = (this.stored_input_data[0] << 7) + this.stored_input_data[1]; + diff = this.digital_input_data[this.multi_byte_channel] ^ input_data; + this.digital_input_data[this.multi_byte_channel] = input_data; + if (this.listeners('digitalChange').length > 0) { + results = []; + for (i = j = 0; j <= 13; i = ++j) { + if (((0x01 << i) & diff) > 0) { + stat = (input_data & diff) > 0; + results.push(this.emit('digitalChange', { + pin: i + this.multi_byte_channel * 8, + value: stat, + old_value: !stat + })); + } else { + results.push(void 0); + } + } + return results; + } + break; + case ArduinoFirmata.ANALOG_MESSAGE: + analog_value = (this.stored_input_data[0] << 7) + this.stored_input_data[1]; + old_analog_value = this.analogRead(this.multi_byte_channel); + this.analog_input_data[this.multi_byte_channel] = analog_value; + if (old_analog_value !== analog_value) { + return this.emit('analogChange', { + pin: this.multi_byte_channel, + value: analog_value, + old_value: old_analog_value + }); + } + break; + case ArduinoFirmata.REPORT_VERSION: + this.boardVersion = this.stored_input_data[1] + "." + this.stored_input_data[0]; + return this.emit('boardVersion', this.boardVersion); + } + } + } else { + if (input_data < 0xF0) { + command = input_data & 0xF0; + this.multi_byte_channel = input_data & 0x0F; + } else { + command = input_data; + } + if (command === ArduinoFirmata.START_SYSEX) { + this.parsing_sysex = true; + return this.sysex_bytes_read = 0; + } else if (command === ArduinoFirmata.DIGITAL_MESSAGE || command === ArduinoFirmata.ANALOG_MESSAGE || command === ArduinoFirmata.REPORT_VERSION) { + this.wait_for_data = 2; + return this.execute_multi_byte_command = command; + } + } + }; + + return ArduinoFirmata; + + })(events.EventEmitter2); + +}).call(this); diff --git a/lang/node-arduino-firmata/patches/000-new-serialport.patch b/lang/node-arduino-firmata/patches/000-new-serialport.patch new file mode 100644 index 00000000..10eab644 --- /dev/null +++ b/lang/node-arduino-firmata/patches/000-new-serialport.patch @@ -0,0 +1,10 @@ +--- a/package.json ++++ b/package.json +@@ -30,7 +30,6 @@ + "author": "Sho Hashimoto ", + "license": "MIT", + "dependencies": { +- "serialport": "*", + "eventemitter2": "*", + "debug": "*" + }, diff --git a/lang/node-cylon/Makefile b/lang/node-cylon/Makefile new file mode 100644 index 00000000..97916088 --- /dev/null +++ b/lang/node-cylon/Makefile @@ -0,0 +1,100 @@ +# +# Copyright (C) 2014 Arduino LLC +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NPM_NAME:=cylon +PKG_NAME:=node-$(PKG_NPM_NAME) +PKG_VERSION:=0.24.0 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/hybridgroup/cylon-firmata.git +PKG_SOURCE_VERSION:=a930f8446f23ec2cb28aadeff54b79ab7704e3a0 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz +PKG_MIRROR_HASH:=dceb75539d32f402db0a5f68f2c7e2b52e5547a5ac2dec875d34fd3cc95cce00 + +PKG_BUILD_DEPENDS:=node/host +PKG_NODE_VERSION:=8.10.0 + +PKG_MAINTAINER:=John Crispin +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +include $(INCLUDE_DIR)/package.mk + +define Package/node-cylon/default + SUBMENU:=Node.js + SECTION:=lang + CATEGORY:=Languages + TITLE:=CylonJS - $(1) + URL:=https://www.npmjs.org/package/cylon + DEPENDS:=+node +node-npm $(2) +endef + +define Package/node-cylon + $(call Package/node-cylon/default,Core) +endef + +define Package/node-cylon-i2c + $(call Package/node-cylon/default,I2C,+node-cylon) +endef + +define Package/node-cylon-gpio + $(call Package/node-cylon/default,GPIO,+node-cylon) +endef + +define Package/node-cylon-firmata + $(call Package/node-cylon/default,Firmata,+node-cylon-gpio +node-cylon-i2c +node-arduino-firmata) +endef + +define Package/node-cylon/description + JavaScript Robotics, By Your Command Next generation robotics framework with support for 36 different platforms Get Started +endef + +define Build/Prepare + /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1 + $(Build/Patch) +endef + +EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \ + +define Build/Compile + $(MAKE_FLAGS) \ + npm_config_arch=$(CONFIG_ARCH) \ + npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \ + npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \ + PREFIX="$(PKG_INSTALL_DIR)/usr/" \ + npm install -g $(PKG_BUILD_DIR) +endef + +define Package/node-cylon/install + mkdir -p $(1)/usr/lib/node/cylon + $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon/* $(1)/usr/lib/node/cylon/ +endef + +define Package/node-cylon-i2c/install + mkdir -p $(1)/usr/lib/node/cylon-i2c + $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon-i2c/* $(1)/usr/lib/node/cylon-i2c/ +endef + +define Package/node-cylon-gpio/install + mkdir -p $(1)/usr/lib/node/cylon-gpio + $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon-gpio/* $(1)/usr/lib/node/cylon-gpio/ +endef + +define Package/node-cylon-firmata/install + mkdir -p $(1)/usr/lib/node/cylon-firmata + $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/{index.js,lib,LICENSE,package.json,README.md,RELEASES.md,spec} $(1)/usr/lib/node/cylon-firmata/ +endef + +$(eval $(call BuildPackage,node-cylon)) +$(eval $(call BuildPackage,node-cylon-i2c)) +$(eval $(call BuildPackage,node-cylon-gpio)) +$(eval $(call BuildPackage,node-cylon-firmata)) + diff --git a/lang/node-cylon/patches/0001-serialport.patch b/lang/node-cylon/patches/0001-serialport.patch new file mode 100644 index 00000000..0e7803e2 --- /dev/null +++ b/lang/node-cylon/patches/0001-serialport.patch @@ -0,0 +1,13 @@ +--- a/package.json ++++ b/package.json +@@ -41,7 +41,8 @@ + }, + + "dependencies": { +- "firmata": ">= 0.8.0", +- "cylon": "^1.3.0" ++ "cylon": "^1.3.0", ++ "cylon-gpio": "0.30.1", ++ "cylon-i2c": "0.26.1" + } + } diff --git a/lang/node-hid/Makefile b/lang/node-hid/Makefile new file mode 100644 index 00000000..afcda102 --- /dev/null +++ b/lang/node-hid/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NPM_NAME:=hid +PKG_NAME:=node-$(PKG_NPM_NAME) +PKG_VERSION:=0.7.2 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/node-hid/node-hid.git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=v0.7.2 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz +PKG_MIRROR_HASH:=ede801a26a23290ab76d64ab636c3c3e2788030bb830af7006d37444c2a7b2c4 + +PKG_BUILD_DEPENDS:=node/host libudev-fbsd +PKG_NODE_VERSION:=8.10.0 + +PKG_MAINTAINER:=John Crispin +PKG_LICENSE:=Custom +PKG_LICENSE_FILES:= + +include $(INCLUDE_DIR)/package.mk + +define Package/node-hid + SUBMENU:=Node.js + SECTION:=lang + CATEGORY:=Languages + TITLE:=Node.js package to access HID devices + URL:=https://github.com/node-hid/node-hid + DEPENDS:=+node +node-npm +libusb-1.0 +hidapi +libstdcpp +endef + +define Package/node-hid/description + Node.js package to access HID devices +endef + +CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))) + +EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include/libusb-1.0 + +define Build/Compile + git init $(PKG_BUILD_DIR) + $(MAKE_VARS) \ + $(MAKE_FLAGS) \ + npm_config_arch=$(CONFIG_ARCH) \ + npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \ + npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \ + PREFIX="$(PKG_INSTALL_DIR)/usr/" \ + npm install --build-from-source --target_arch=$(CPU) -g $(PKG_BUILD_DIR) +endef + +define Package/node-hid/install + mkdir -p $(1)/usr/lib/node/node-hid/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/ $(1)/usr/lib/node/ +endef + +$(eval $(call BuildPackage,node-hid)) + diff --git a/lang/node-mozilla-iot-gateway/Makefile b/lang/node-mozilla-iot-gateway/Makefile new file mode 100644 index 00000000..5b5e5001 --- /dev/null +++ b/lang/node-mozilla-iot-gateway/Makefile @@ -0,0 +1,71 @@ +# +# Copyright (C) 2018 Sartura Ltd. +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NPM_NAME:=mozilla-iot-gateway +PKG_NAME:=node-$(PKG_NPM_NAME) +PKG_VERSION:=0.3.1 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/mozilla-iot/gateway.git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=v$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MIRROR_HASH:=ba05bc3e93c36768244df922434e7132c2dae85a1ff9e3213beea087a4844d11 + +PKG_BUILD_DEPENDS:=node/host openzwave + +PKG_MAINTAINER:=Marko Ratkaj +PKG_LICENSE:=MPL-2.0 +PKG_LICENSE_FILES:=LICENSE + +include $(INCLUDE_DIR)/package.mk + +define Package/node-mozilla-iot-gateway + SUBMENU:=Node.js + SECTION:=lang + CATEGORY:=Languages + TITLE:=Things Gateway by Mozilla + URL:=https://iot.mozilla.org/gateway/ + DEPENDS:=+node +node-npm +libopenzwave +python +openssl-util +endef + +define Package/node-mozilla-iot-gateway/description + Build Your Own Web of Things Gateway. The "Web of Things" (WoT) is the + idea of taking the lessons learned from the World Wide Web and applying + them to IoT. It's about creating a decentralized Internet of Things by + giving Things URLs on the web to make them linkable and discoverable, + and defining a standard data model and APIs to make them interoperable. +endef + +CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) + +define Build/Compile + $(MAKE_VARS) \ + $(MAKE_FLAGS) \ + npm_config_arch=$(CONFIG_ARCH) \ + npm_config_nodedir=$(STAGING_DIR)/usr/ \ + npm_config_cache=$(TMP_DIR)/npm-cache \ + npm_config_tmp=$(TMP_DIR)/npm-tmp \ + PREFIX="$(PKG_INSTALL_DIR)/usr/" \ + $(STAGING_DIR_HOSTPKG)/bin/npm install --build-from-source --target_arch=$(CPU) -g $(DL_DIR)/$(PKG_SOURCE) +endef + +define Package/node-mozilla-iot-gateway/install + $(INSTALL_DIR) $(1)/opt/mozilla-iot/gateway + $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/things-gateway/* $(1)/opt/mozilla-iot/gateway + $(STAGING_DIR_HOSTPKG)/bin/npm --prefix=$(1)/opt/mozilla-iot/gateway install $(1)/opt/mozilla-iot/gateway + $(LN) ../constants.js $(1)/opt/mozilla-iot/gateway/src/addons/addon-constants.js + $(LN) /tmp/mozilla-iot/gateway/run-app.log $(1)/opt/mozilla-iot/gateway/run-app.log + + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/mozilla-iot-gateway.init $(1)/etc/init.d/mozilla-iot-gateway +endef + +$(eval $(call BuildPackage,node-mozilla-iot-gateway)) diff --git a/lang/node-mozilla-iot-gateway/files/mozilla-iot-gateway.init b/lang/node-mozilla-iot-gateway/files/mozilla-iot-gateway.init new file mode 100644 index 00000000..f2663d5a --- /dev/null +++ b/lang/node-mozilla-iot-gateway/files/mozilla-iot-gateway.init @@ -0,0 +1,12 @@ +#!/bin/sh /etc/rc.common + +START=99 + +_npm=/usr/bin/npm + +start() +{ + mkdir -p /tmp/mozilla-iot/gateway/ + cd /opt/mozilla-iot/gateway/ + $_npm start &> /tmp/mozilla-iot/gateway/run-app.log & +} diff --git a/lang/node-serialport/Makefile b/lang/node-serialport/Makefile new file mode 100644 index 00000000..1fec2e47 --- /dev/null +++ b/lang/node-serialport/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2014 Arduino LLC +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NPM_NAME:=serialport +PKG_NAME:=node-$(PKG_NPM_NAME) +PKG_VERSION:=6.1.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/ +PKG_HASH:=b58c326d217fb0af1639e4ea834d9fca4be16934c486499e2ddac6e52b8dd560 + +PKG_BUILD_DEPENDS:=node/host +PKG_NODE_VERSION:=8.10.0 + +PKG_MAINTAINER:=John Crispin +PKG_LICENSE:=Custom +PKG_LICENSE_FILES:=LICENSE + +include $(INCLUDE_DIR)/package.mk + +define Package/node-serialport + SUBMENU:=Node.js + SECTION:=lang + CATEGORY:=Languages + TITLE:=Node.js package to access serial ports for reading and writing + URL:=https://www.npmjs.org/package/serialport + DEPENDS:=+node +node-npm +endef + +define Package/node-serialport/description + Node.js package to access serial ports for reading and writing OR Welcome your robotic JavaScript overlords. Better yet, program them! +endef + +define Build/Prepare + /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1 + $(Build/Patch) +endef + +CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))) + +EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \ + +define Build/Compile + $(MAKE_FLAGS) \ + npm_config_arch=$(CONFIG_ARCH) \ + npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \ + npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \ + PREFIX="$(PKG_INSTALL_DIR)/usr/" \ + npm install --build-from-source --target_arch=$(CPU) -g $(PKG_BUILD_DIR) +endef + +define Package/node-serialport/install + mkdir -p $(1)/usr/lib/node/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node/ +endef + +$(eval $(call BuildPackage,node-serialport)) + diff --git a/lang/node/Makefile b/lang/node/Makefile new file mode 100644 index 00000000..1274caba --- /dev/null +++ b/lang/node/Makefile @@ -0,0 +1,128 @@ +# +# Copyright (C) 2006-2017 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:=node +PKG_VERSION:=v8.10.0 +PKG_RELEASE:=3 +PKG_SOURCE:=node-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=http://nodejs.org/dist/${PKG_VERSION} +PKG_HASH:=b72d4e71618d6bcbd039b487b51fa7543631a4ac3331d7caf69bdf55b5b2901a + +HOST_BUILD_DEPENDS:=python/host +PKG_BUILD_DEPENDS:=python/host + +PKG_INSTALL:=1 +PKG_USE_MIPS16:=0 + +HOST_BUILD_PARALLEL:=1 +PKG_BUILD_PARALLEL:=1 + +PKG_MAINTAINER:=John Crispin , Adrian Panella +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk + +define Package/node + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Node.js + TITLE:=Node.js is a platform built on Chrome's JavaScript runtime + URL:=http://nodejs.org/ + DEPENDS:=@(HAS_FPU||KERNEL_MIPS_FPU_EMULATOR) +libstdcpp +libopenssl +zlib +USE_UCLIBC:libpthread +USE_UCLIBC:librt +NODEJS_ICU:icu +endef + +define Package/node/description + Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses + an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' + package ecosystem, npm, is the largest ecosystem of open source libraries in the world. +endef + +define Package/node-npm + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Node.js + TITLE:=NPM stands for Node Package Manager + URL:=http://npmjs.com/ + DEPENDS:=+node +endef + +define Package/node-npm/description + NPM is the package manager for NodeJS +endef + +define Package/node/config + menu "Module Selection" + + config NODEJS_ICU + bool "enable i18n features" + default n + + endmenu +endef + +NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))) + +MAKE_VARS+= \ + DESTCPU=$(NODEJS_CPU) + +CONFIGURE_VARS:= \ + CC="$(TARGET_CC) $(TARGET_OPTIMIZATION)" \ + CXX="$(TARGET_CXX) $(TARGET_OPTIMIZATION)" \ + CC_host="$(HOSTCC)" \ + CXX_host="$(HOSTCXX)" + +CONFIGURE_ARGS:= \ + --dest-cpu=$(NODEJS_CPU) \ + --dest-os=linux \ + --without-snapshot \ + --shared-zlib \ + --shared-openssl \ + --with-intl=$(if $(CONFIG_NODEJS_ICU),system-icu,none) \ + $(if $(findstring mips,$(NODEJS_CPU)), \ + $(if $(CONFIG_SOFT_FLOAT),--with-mips-float-abi=soft)) \ + $(if $(findstring +neon,$(CONFIG_CPU_TYPE)),--with-arm-fpu=neon) \ + $(if $(findstring +vfp",$(CONFIG_CPU_TYPE)),--with-arm-fpu=vfp) \ + $(if $(findstring +vfpv3",$(CONFIG_CPU_TYPE)),--with-arm-fpu=vfpv3-d16) \ + $(if $(findstring +vfpv4",$(CONFIG_CPU_TYPE)),--with-arm-fpu=vfpv3) \ + --prefix=/usr + +HOST_CONFIGURE_VARS:= + +HOST_CONFIGURE_ARGS:= \ + --dest-os=linux \ + --without-snapshot \ + --prefix=$(STAGING_DIR_HOSTPKG) + +HOST_CONFIGURE_CMD:=python ./configure + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ +endef + +define Package/node/install + mkdir -p $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/node $(1)/usr/bin/ +endef + +define Package/node-npm/install + mkdir -p $(1)/usr/bin $(1)/usr/lib/node_modules/npm/{bin,lib,node_modules} + $(CP) $(PKG_INSTALL_DIR)/usr/bin/{npm,npx} $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/{package.json,LICENSE} $(1)/usr/lib/node_modules/npm + $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/bin/npm-cli.js $(1)/usr/lib/node_modules/npm/bin + $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/bin/npx-cli.js $(1)/usr/lib/node_modules/npm/bin + $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/lib/* $(1)/usr/lib/node_modules/npm/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/node_modules/* $(1)/usr/lib/node_modules/npm/node_modules/ +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,node)) +$(eval $(call BuildPackage,node-npm)) diff --git a/lang/node/patches/001-hardfloat.patch b/lang/node/patches/001-hardfloat.patch new file mode 100644 index 00000000..1a573cb5 --- /dev/null +++ b/lang/node/patches/001-hardfloat.patch @@ -0,0 +1,10 @@ +--- a/deps/v8/src/base/cpu.cc ++++ b/deps/v8/src/base/cpu.cc +@@ -144,6 +144,7 @@ + ".set push\n\t" + ".set noreorder\n\t" + ".set oddspreg\n\t" ++ ".set hardfloat\n\t" + "lui $t0, 0x3FF0\n\t" + "ldc1 $f0, %0\n\t" + "mtc1 $t0, $f1\n\t" diff --git a/lang/node/patches/002-addr_info.patch b/lang/node/patches/002-addr_info.patch new file mode 100644 index 00000000..3e4e583a --- /dev/null +++ b/lang/node/patches/002-addr_info.patch @@ -0,0 +1,10 @@ +--- a/deps/uv/src/unix/getaddrinfo.c ++++ b/deps/uv/src/unix/getaddrinfo.c +@@ -100,6 +100,7 @@ + int err; + + req = container_of(w, uv_getaddrinfo_t, work_req); ++ req->hints->ai_flags &= ~AI_V4MAPPED; + err = getaddrinfo(req->hostname, req->service, req->hints, &req->addrinfo); + req->retcode = uv__getaddrinfo_translate_error(err); + } diff --git a/lang/node/patches/003-path.patch b/lang/node/patches/003-path.patch new file mode 100644 index 00000000..d9f0eb7a --- /dev/null +++ b/lang/node/patches/003-path.patch @@ -0,0 +1,12 @@ +--- a/lib/module.js ++++ b/lib/module.js +@@ -714,7 +714,8 @@ + } else { + prefixDir = path.resolve(process.execPath, '..', '..'); + } +- var paths = [path.resolve(prefixDir, 'lib', 'node')]; ++ var paths = [path.resolve(prefixDir, 'lib', 'node'), ++ path.resolve(prefixDir, 'lib', 'node_modules')]; + + if (homeDir) { + paths.unshift(path.resolve(homeDir, '.node_libraries')); diff --git a/lang/node/patches/004-node_crypto_include_cmath.patch b/lang/node/patches/004-node_crypto_include_cmath.patch new file mode 100644 index 00000000..77b309f6 --- /dev/null +++ b/lang/node/patches/004-node_crypto_include_cmath.patch @@ -0,0 +1,25 @@ +From 34825d50db18631a92902af3f51ddd27aa074c90 Mon Sep 17 00:00:00 2001 +From: Jeroen Roovers +Date: Fri, 13 Apr 2018 05:54:42 +0200 +Subject: [PATCH 2/2] Include cmath ... + +... instead of using the C implementations of isnan and isinf +--- + src/node_crypto.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/node_crypto.cc b/src/node_crypto.cc +index 7c0f65a5735..0aa4adbd467 100644 +--- a/src/node_crypto.cc ++++ b/src/node_crypto.cc +@@ -44,9 +44,9 @@ + #include "StartComAndWoSignData.inc" + + #include ++#include + #include + #include // INT_MAX +-#include + #include + #include + #include diff --git a/lang/perl-authen-sasl-xs/Makefile b/lang/perl-authen-sasl-xs/Makefile new file mode 100644 index 00000000..e7e0083f --- /dev/null +++ b/lang/perl-authen-sasl-xs/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2017 Philip Prindeville +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=perl-authen-sasl-xs +PKG_VERSION:=1.00 +PKG_RELEASE:=1 + +PKG_SOURCE_NAME:=Authen-SASL-XS +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GB/GBARR/ +PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=1b0eaa0e7ac3a45857147d837e3d34c80c6eca1d9fdcb826a213c2a105454234 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Philip Prindeville + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_SOURCE_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-authen-sasl-xs + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Authen::XS hooks into libsasl. + URL:=http://search.cpan.org/dist/$(PKG_SOURCE_NAME)/ + # DEPENDS:=perl +perl-authen-sasl +libsasl2 +perl-devel-checklib/host + DEPENDS:=perl +perl-authen-sasl +libsasl2 +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-authen-sasl-xs/install + $(call perlmod/Install,$(1),Authen) +endef + + +$(eval $(call BuildPackage,perl-authen-sasl-xs)) diff --git a/lang/perl-authen-sasl-xs/patches/100-remove-devel-checklib-checks.patch b/lang/perl-authen-sasl-xs/patches/100-remove-devel-checklib-checks.patch new file mode 100644 index 00000000..b4efa9e5 --- /dev/null +++ b/lang/perl-authen-sasl-xs/patches/100-remove-devel-checklib-checks.patch @@ -0,0 +1,49 @@ +--- a/Makefile.PL 2009-09-22 16:22:09.000000000 -0600 ++++ b/Makefile.PL 2018-01-01 18:54:13.023366252 -0700 +@@ -1,7 +1,6 @@ + # Do yourself a favour, and don't edit this file, see README for build instructions + + use ExtUtils::MakeMaker; +-use Devel::CheckLib; + + my @inc_search = qw(/opt/local/include /usr/local/include); + my @lib_search = qw(/opt/local/lib64 /usr/local/lib64 /opt/local/lib /usr/local/lib); +@@ -12,15 +12,7 @@ unless (exists $args{INC} or exists $arg + + my @incpath = grep {-d} @inc_search; + my @libpath = grep {-d} @lib_search; +- my $have_sasl2 = eval { +- assert_lib( +- lib => "sasl2", +- header => "sasl/sasl.h", +- libpath => \@libpath, +- incpath => \@incpath +- ); +- 1; +- }; ++ my $have_sasl2 = 1; + + if ($have_sasl2) { + $mmopt{DEFINE} = "-DSASL2" unless $use_sasl2; +@@ -28,13 +27,6 @@ unless (exists $args{INC} or exists $arg + } + else { + exit(0) if $use_sasl2; +- @incpath = grep {-d} map { ("$_/sasl", $_) } @inc_search; +- check_lib_or_exit( +- lib => "sasl", +- header => "sasl.h", +- libpath => \@libpath, +- incpath => \@incpath +- ); + } + + $mmopt{INC} = join " ", map {"-I$_"} @incpath; +@@ -58,7 +50,6 @@ WriteMakefile( + repository => 'http://github.com/gbarr/perl-authen-sasl-xs', + }, + build_requires => { +- 'Devel::CheckLib' => 0, + }, + } + ) diff --git a/lang/perl-authen-sasl/Makefile b/lang/perl-authen-sasl/Makefile new file mode 100644 index 00000000..434ec088 --- /dev/null +++ b/lang/perl-authen-sasl/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2017 Philip Prindeville +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=perl-authen-sasl +PKG_VERSION:=2.16 +PKG_RELEASE:=1 + +PKG_SOURCE_NAME:=Authen-SASL +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GB/GBARR/ +PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=6614fa7518f094f853741b63c73f3627168c5d3aca89b1d02b1016dc32854e09 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Philip Prindeville + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_SOURCE_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-authen-sasl + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Generic network authentication protocol framework. + URL:=http://search.cpan.org/dist/$(PKG_SOURCE_NAME)/ + DEPENDS:=perl +perlbase-digest +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-authen-sasl/install + $(call perlmod/Install,$(1),Authen) +endef + + +$(eval $(call BuildPackage,perl-authen-sasl)) diff --git a/lang/perl-cgi/Makefile b/lang/perl-cgi/Makefile new file mode 100644 index 00000000..54dee23e --- /dev/null +++ b/lang/perl-cgi/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2016 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:=perl-cgi +PKG_VERSION:=4.38 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEEJO +PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz +PKG_HASH:=8c58f4a529bb92a914b22b7e64c5e31185c9854a4070a6dfad44fe5cc248e7d4 + +PKG_LICENSE:=GPL Artistic-2.0 +PKG_MAINTAINER:=Marcel Denia , \ + Philip Prindeville + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/CGI-$(PKG_VERSION) + +# don't strip comments because that will mangle this module +PKG_LEAVE_COMMENTS:=1 + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-cgi + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Handle Common Gateway Interface requests and responses + URL:=http://search.cpan.org/dist/CGI/ + DEPENDS:=perl +perl-html-parser +perlbase-base +perlbase-config +perlbase-encode +perlbase-essential +perlbase-file +perlbase-if +perlbase-utf8 +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-cgi/install + $(call perlmod/Install,$(1),CGI CGI.pm auto/CGI) +endef + + +$(eval $(call BuildPackage,perl-cgi)) diff --git a/lang/perl-compress-bzip2/Makefile b/lang/perl-compress-bzip2/Makefile new file mode 100644 index 00000000..1d9342d0 --- /dev/null +++ b/lang/perl-compress-bzip2/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2014, 2015 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:=perl-compress-bzip2 +PKG_VERSION:=2.24 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/R/RU/RURBAN/ +PKG_SOURCE:=Compress-Bzip2-$(PKG_VERSION).tar.gz +PKG_HASH:=7956ac627fb373fae6effede3d21b3157122800224491b124afdd7bb426c8c3f + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Compress-Bzip2-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-compress-bzip2 + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Perl interface to bzip2 compression library + URL:=http://search.cpan.org/dist/Compress-Bzip2/ + DEPENDS:=perl +libbz2 +perlbase-autoloader +perlbase-config +perlbase-essential +perlbase-fcntl +perlbase-file +perlbase-getopt +perlbase-test +perlbase-xsloader +endef + +define Build/Configure + $(call perlmod/Configure,,BUILD_BZLIB=0) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-compress-bzip2/install + $(call perlmod/Install,$(1),Compress auto/Compress) +endef + + +$(eval $(call BuildPackage,perl-compress-bzip2)) diff --git a/lang/perl-dbi/Makefile b/lang/perl-dbi/Makefile new file mode 100644 index 00000000..eef2b345 --- /dev/null +++ b/lang/perl-dbi/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2014, 2015 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:=perl-dbi +PKG_VERSION:=1.634 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TI/TIMB/ +PKG_SOURCE:=DBI-$(PKG_VERSION).tar.gz +PKG_HASH:=250712f385864818abfba409420d16d9ee61f1cc73ac85159d054a5ee86d1450 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/DBI-$(PKG_VERSION) +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/DBI-$(PKG_VERSION) + +HOST_BUILD_DEPENDS:=perl/host + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk +include ../perl/perlmod.mk + +define Package/perl-dbi + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Database independent interface for Perl + URL:=http://search.cpan.org/dist/DBI/ + DEPENDS:=perl +perlbase-base +perlbase-config +perlbase-cwd +perlbase-data +perlbase-dynaloader +perlbase-errno +perlbase-essential +perlbase-fcntl +perlbase-file +perlbase-io +perlbase-ipc +perlbase-scalar +perlbase-storable +perlbase-symbol +perlbase-tie +perlbase-universal +perlbase-utf8 +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Host/Configure + $(call perlmod/host/Configure,,) +endef + +define Host/Compile + $(call perlmod/host/Compile,,) +endef + +define Host/Install + $(call perlmod/host/Install,$(1),) +endef + +define Package/perl-dbi/install + $(call perlmod/Install,$(1),DB* auto/DBI,DBI/W32ODBC.pm auto/DBI/*.h) +endef + + +$(eval $(call BuildPackage,perl-dbi)) +$(eval $(call HostBuild)) diff --git a/lang/perl-device-serialport/Makefile b/lang/perl-device-serialport/Makefile new file mode 100644 index 00000000..97b46e85 --- /dev/null +++ b/lang/perl-device-serialport/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2014, 2015 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:=perl-device-serialport +PKG_VERSION:=1.04 +PKG_RELEASE:=3 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/C/CO/COOK/ +PKG_SOURCE:=Device-SerialPort-$(PKG_VERSION).tar.gz +PKG_HASH:=d392567cb39b4ea606c0e0acafd8ed72320311b995336ece5fcefcf9b150e9d7 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Paul Oranje + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Device-SerialPort-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-device-serialport + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=A POSIX-based version of the Win32::SerialPort module + URL:=http://search.cpan.org/dist/Device-SerialPort/ + DEPENDS:=perl +perlbase-essential +perlbase-io +perlbase-posix +perlbase-test +perlbase-xsloader +endef + +define Package/perl-device-serialport/description + A POSIX-based version of the Win32::SerialPort module + that provides modem support to Perl applications +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-device-serialport/install + $(call perlmod/Install,$(1),Device auto/Device) +endef + + +$(eval $(call BuildPackage,perl-device-serialport)) diff --git a/lang/perl-device-usb/Makefile b/lang/perl-device-usb/Makefile new file mode 100644 index 00000000..754ed074 --- /dev/null +++ b/lang/perl-device-usb/Makefile @@ -0,0 +1,73 @@ +# +# Copyright (C) 2015 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:=perl-device-usb +PKG_VERSION:=0.36 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GW/GWADEJ/ +PKG_SOURCE:=Device-USB-$(PKG_VERSION).tar.gz +PKG_HASH:=fac2eb4f9e8db08b46d734ba8a2076598f974c274a91b248613fcecd7c9fc175 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Device-USB-$(PKG_VERSION) +PKG_BUILD_DEPENDS:=perl-inline-c/host + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-device-usb + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=libusb library wrapper + URL:=http://search.cpan.org/dist/Device-USB/ + DEPENDS:=perl +libusb-compat +perl-inline +perl-inline-c +perlbase-essential +perlbase-test +endef + +# Device::USB will generate a second Makefile.PL to build it's native code +# using Inline::C under _Inline/. The goal here is to prevent Inline::C from +# running that one automatically, as we need to supply a bunch of overrides via +# perlmod/Configure. +# _INLINE_C_NO_COMPILE_ is an OpenWRT-specific environment variable to Inline::C +# that does just that. +define Build/Configure + $(call perlmod/Configure,,) + + # Prepare a library directory where we can link againt lusb-0.1(as + # opposed to -lusb) to avoid confusion at runtime + mkdir $(PKG_BUILD_DIR)/syslib + $(LN) $(STAGING_DIR)/usr/lib/libusb.so $(PKG_BUILD_DIR)/syslib/libusb-0.1.so + + # Generate _Inline + $(call perlmod/Compile,config,LIBUSB_LIBDIR=$(PKG_BUILD_DIR)/syslib \ + _INLINE_C_NO_COMPILE_=1 \ + _INLINE_C_SYSTEM_TYPEMAP_=$(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)/ExtUtils/typemap) + $(call perlmod/Compile,dynamic,_INLINE_C_NO_COMPILE_=1) + + # Configure _Inline + $(call perlmod/Configure,,,$(PKG_BUILD_DIR)/_Inline/build/Device/USB) + + # Prevent re-configuring Inline code + sed 's/^dynamic :: D.*$$$$//' -i $(PKG_BUILD_DIR)/Makefile +endef + +define Build/Compile + $(call perlmod/Compile,,,$(PKG_BUILD_DIR)/_Inline/build/Device/USB) + $(call perlmod/Compile,,) +endef + +define Package/perl-device-usb/install + $(call perlmod/Install,$(1),Device auto/Device) +endef + + +$(eval $(call BuildPackage,perl-device-usb)) diff --git a/lang/perl-device-usb/README.patches b/lang/perl-device-usb/README.patches new file mode 100644 index 00000000..66ece00d --- /dev/null +++ b/lang/perl-device-usb/README.patches @@ -0,0 +1,8 @@ +This package contains some patches taken directly from Debian Jessie(stable at +the time of writing). +Namely, these are: +- 100-fix_buildsystem.patch +- 110-just_assume_libusb_is_there.diff + +The other patches are specific to OpenWRT, fixing bugs and resolving conflicts +where necessary. \ No newline at end of file diff --git a/lang/perl-device-usb/patches/100-fix_buildsystem.patch b/lang/perl-device-usb/patches/100-fix_buildsystem.patch new file mode 100644 index 00000000..5201894f --- /dev/null +++ b/lang/perl-device-usb/patches/100-fix_buildsystem.patch @@ -0,0 +1,20 @@ +Description: Ignore files we do not want installed. +Forwarded: not-needed +Author: Tim Retout +Reviewed-by: gregor herrmann +Last-Update: 2013-10-28 + +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -2,6 +2,11 @@ + use warnings; + use Inline::MakeMaker; + ++sub MY::libscan { ++ return if ($_[1] eq 'USB.pm' or $_[1] eq 'dump_usb.pl'); ++ return $_[1]; ++} ++ + if($^O eq 'MSWin32') + { + if(!$ENV{LIBUSB_LIBDIR} or !$ENV{LIBUSB_INCDIR}) diff --git a/lang/perl-device-usb/patches/110-just_assume_libusb_is_there.diff b/lang/perl-device-usb/patches/110-just_assume_libusb_is_there.diff new file mode 100644 index 00000000..9365eb40 --- /dev/null +++ b/lang/perl-device-usb/patches/110-just_assume_libusb_is_there.diff @@ -0,0 +1,30 @@ +Subject: Just assume libusb is out there + Makefile.PL should not try to check for libusb in a given list of directories + as the compiler might look in other places as well. +Origin: vendor +Bug-Debian: http://bugs.debian.org/639677 +Forwarded: not-needed +From: Ansgar Burchardt +Reviewed-by: gregor herrmann +Last-Update: 2013-10-28 + +--- libdevice-usb-perl.orig/Makefile.PL ++++ libdevice-usb-perl/Makefile.PL +@@ -21,7 +21,7 @@ + } + } + +-unless(header_found()) ++unless(1 || header_found()) + { + die <<"END"; + ERROR: Can't find usb.h header. +@@ -36,7 +36,7 @@ + END + } + +-unless(lib_found()) ++unless(1 || lib_found()) + { + die <<"END"; + ERROR: Can't find libusb library. diff --git a/lang/perl-device-usb/patches/120-use_libusb_0_1.patch b/lang/perl-device-usb/patches/120-use_libusb_0_1.patch new file mode 100644 index 00000000..7d43e739 --- /dev/null +++ b/lang/perl-device-usb/patches/120-use_libusb_0_1.patch @@ -0,0 +1,13 @@ +--- a/lib/Device/USB.pm ++++ b/lib/Device/USB.pm +@@ -9,8 +9,8 @@ use Inline ( + C => "DATA", + ($ENV{LIBUSB_LIBDIR} + ? ( LIBS => "-L\"$ENV{LIBUSB_LIBDIR}\" " . +- ($^O eq 'MSWin32' ? ' -llibusb -L\"$ENV{WINDDK}\\lib\\crt\\i386\" -lmsvcrt ' : '-lusb') ) +- : ( LIBS => '-lusb', ) ++ ($^O eq 'MSWin32' ? ' -llibusb -L\"$ENV{WINDDK}\\lib\\crt\\i386\" -lmsvcrt ' : '-lusb-0.1') ) ++ : ( LIBS => '-lusb-0.1', ) + ), + ($ENV{LIBUSB_INCDIR} ? ( INC => "-I\"$ENV{LIBUSB_INCDIR}\"" ) : () ), + NAME => 'Device::USB', diff --git a/lang/perl-device-usb/patches/130-provide-proper-library-paths.patch b/lang/perl-device-usb/patches/130-provide-proper-library-paths.patch new file mode 100644 index 00000000..3fce75ab --- /dev/null +++ b/lang/perl-device-usb/patches/130-provide-proper-library-paths.patch @@ -0,0 +1,13 @@ +--- a/lib/Device/USB.pm ++++ b/lib/Device/USB.pm +@@ -8,8 +8,8 @@ use Carp; + use Inline ( + C => "DATA", + ($ENV{LIBUSB_LIBDIR} +- ? ( LIBS => "-L\"$ENV{LIBUSB_LIBDIR}\" " . +- ($^O eq 'MSWin32' ? ' -llibusb -L\"$ENV{WINDDK}\\lib\\crt\\i386\" -lmsvcrt ' : '-lusb-0.1') ) ++ ? ( LIBS => "-L$ENV{LIBUSB_LIBDIR} " . ++ ($^O eq 'MSWin32' ? ' -llibusb -L$ENV{WINDDK}\\lib\\crt\\i386 -lmsvcrt ' : '-lusb-0.1') ) + : ( LIBS => '-lusb-0.1', ) + ), + ($ENV{LIBUSB_INCDIR} ? ( INC => "-I\"$ENV{LIBUSB_INCDIR}\"" ) : () ), diff --git a/lang/perl-device-usb/patches/140-avoid-libusb-name-conflicts.patch b/lang/perl-device-usb/patches/140-avoid-libusb-name-conflicts.patch new file mode 100644 index 00000000..55e5cc3a --- /dev/null +++ b/lang/perl-device-usb/patches/140-avoid-libusb-name-conflicts.patch @@ -0,0 +1,219 @@ +--- a/lib/Device/USB.pm ++++ b/lib/Device/USB.pm +@@ -15,6 +15,7 @@ use Inline ( + ($ENV{LIBUSB_INCDIR} ? ( INC => "-I\"$ENV{LIBUSB_INCDIR}\"" ) : () ), + NAME => 'Device::USB', + VERSION => '0.36', ++ PREFIX => 'deviceusb_', + ); + + Inline->init(); +@@ -540,74 +541,74 @@ unsigned DeviceUSBDebugLevel() + return debugLevel; + } + +-void libusb_init() ++void deviceusb_libusb_init() + { + usb_init(); + } + +-int libusb_find_busses() ++int deviceusb_libusb_find_busses() + { + return usb_find_busses(); + } + +-int libusb_find_devices() ++int deviceusb_libusb_find_devices() + { + return usb_find_devices(); + } + +-void *libusb_get_busses() ++void *deviceusb_libusb_get_busses() + { + return usb_get_busses(); + } + +-void *libusb_open(void *dev) ++void *deviceusb_libusb_open(void *dev) + { + return usb_open( (struct usb_device*)dev ); + } + +-int libusb_close(void *dev) ++int deviceusb_libusb_close(void *dev) + { + return usb_close((usb_dev_handle *)dev); + } + +-int libusb_set_configuration(void *dev, int configuration) ++int deviceusb_libusb_set_configuration(void *dev, int configuration) + { + if(DeviceUSBDebugLevel()) + { +- printf( "libusb_set_configuration( %d )\n", configuration ); ++ printf( "deviceusb_libusb_set_configuration( %d )\n", configuration ); + } + return usb_set_configuration((usb_dev_handle *)dev, configuration); + } + +-int libusb_set_altinterface(void *dev, int alternate) ++int deviceusb_libusb_set_altinterface(void *dev, int alternate) + { + if(DeviceUSBDebugLevel()) + { +- printf( "libusb_set_altinterface( %d )\n", alternate ); ++ printf( "deviceusb_libusb_set_altinterface( %d )\n", alternate ); + } + return usb_set_altinterface((usb_dev_handle *)dev, alternate); + } + +-int libusb_clear_halt(void *dev, unsigned int ep) ++int deviceusb_libusb_clear_halt(void *dev, unsigned int ep) + { + if(DeviceUSBDebugLevel()) + { +- printf( "libusb_clear_halt( %d )\n", ep ); ++ printf( "deviceusb_libusb_clear_halt( %d )\n", ep ); + } + return usb_clear_halt((usb_dev_handle *)dev, ep); + } + +-int libusb_reset(void *dev) ++int deviceusb_libusb_reset(void *dev) + { + return usb_reset((usb_dev_handle *)dev); + } + +-int libusb_get_driver_np(void *dev, int interface, char *name, unsigned int namelen) ++int deviceusb_libusb_get_driver_np(void *dev, int interface, char *name, unsigned int namelen) + { + int ret = 0; + if(DeviceUSBDebugLevel()) + { +- printf( "libusb_get_driver_np( %d )\n", interface ); ++ printf( "deviceusb_libusb_get_driver_np( %d )\n", interface ); + } + #if LIBUSB_HAS_GET_DRIVER_NP + ret = usb_get_driver_np((usb_dev_handle *)dev, interface, name, namelen); +@@ -618,11 +619,11 @@ int libusb_get_driver_np(void *dev, int + #endif + } + +-int libusb_detach_kernel_driver_np(void *dev, int interface) ++int deviceusb_libusb_detach_kernel_driver_np(void *dev, int interface) + { + if(DeviceUSBDebugLevel()) + { +- printf( "libusb_detach_kernel_driver_np( %d )\n", interface ); ++ printf( "deviceusb_libusb_detach_kernel_driver_np( %d )\n", interface ); + } + #if LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP + return usb_detach_kernel_driver_np((usb_dev_handle *)dev, interface); +@@ -631,25 +632,25 @@ int libusb_detach_kernel_driver_np(void + #endif + } + +-int libusb_claim_interface(void *dev, int interface) ++int deviceusb_libusb_claim_interface(void *dev, int interface) + { + if(DeviceUSBDebugLevel()) + { +- printf( "libusb_claim_interface( %d )\n", interface ); ++ printf( "deviceusb_libusb_claim_interface( %d )\n", interface ); + } + return usb_claim_interface((usb_dev_handle *)dev, interface); + } + +-int libusb_release_interface(void *dev, int interface) ++int deviceusb_libusb_release_interface(void *dev, int interface) + { + if(DeviceUSBDebugLevel()) + { +- printf( "libusb_release_interface( %d )\n", interface ); ++ printf( "deviceusb_libusb_release_interface( %d )\n", interface ); + } + return usb_release_interface((usb_dev_handle *)dev, interface); + } + +-void libusb_control_msg(void *dev, int requesttype, int request, int value, int index, char *bytes, int size, int timeout) ++void deviceusb_libusb_control_msg(void *dev, int requesttype, int request, int value, int index, char *bytes, int size, int timeout) + { + int i = 0; + int retval = 0; +@@ -658,7 +659,7 @@ void libusb_control_msg(void *dev, int r + + if(DeviceUSBDebugLevel()) + { +- printf( "libusb_control_msg( %#04x, %#04x, %#04x, %#04x, %p, %d, %d )\n", ++ printf( "deviceusb_libusb_control_msg( %#04x, %#04x, %#04x, %#04x, %p, %d, %d )\n", + requesttype, request, value, index, bytes, size, timeout + ); + /* maybe need to add support for printing the bytes string. */ +@@ -691,54 +692,54 @@ void libusb_control_msg(void *dev, int r + Inline_Stack_Done; + } + +-int libusb_get_string(void *dev, int index, int langid, char *buf, size_t buflen) ++int deviceusb_libusb_get_string(void *dev, int index, int langid, char *buf, size_t buflen) + { + if(DeviceUSBDebugLevel()) + { +- printf( "libusb_get_string( %d, %d, %p, %lu )\n", ++ printf( "deviceusb_libusb_get_string( %d, %d, %p, %lu )\n", + index, langid, buf, (unsigned long)buflen + ); + } + return usb_get_string((usb_dev_handle *)dev, index, langid, buf, buflen); + } + +-int libusb_get_string_simple(void *dev, int index, char *buf, size_t buflen) ++int deviceusb_libusb_get_string_simple(void *dev, int index, char *buf, size_t buflen) + { + if(DeviceUSBDebugLevel()) + { +- printf( "libusb_get_string_simple( %d, %p, %lu )\n", ++ printf( "deviceusb_libusb_get_string_simple( %d, %p, %lu )\n", + index, buf, (unsigned long)buflen + ); + } + return usb_get_string_simple((usb_dev_handle *)dev, index, buf, buflen); + } + +-int libusb_get_descriptor(void *dev, unsigned char type, unsigned char index, char *buf, int size) ++int deviceusb_libusb_get_descriptor(void *dev, unsigned char type, unsigned char index, char *buf, int size) + { + return usb_get_descriptor((usb_dev_handle *)dev, type, index, buf, size); + } + +-int libusb_get_descriptor_by_endpoint(void *dev, int ep, unsigned char type, unsigned char index, char *buf, int size) ++int deviceusb_libusb_get_descriptor_by_endpoint(void *dev, int ep, unsigned char type, unsigned char index, char *buf, int size) + { + return usb_get_descriptor_by_endpoint((usb_dev_handle *)dev, ep, type, index, buf, size); + } + +-int libusb_bulk_write(void *dev, int ep, char *bytes, int size, int timeout) ++int deviceusb_libusb_bulk_write(void *dev, int ep, char *bytes, int size, int timeout) + { + return usb_bulk_write((usb_dev_handle *)dev, ep, bytes, size, timeout); + } + +-int libusb_bulk_read(void *dev, int ep, char *bytes, int size, int timeout) ++int deviceusb_libusb_bulk_read(void *dev, int ep, char *bytes, int size, int timeout) + { + return usb_bulk_read((usb_dev_handle *)dev, ep, bytes, size, timeout); + } + +-int libusb_interrupt_write(void *dev, int ep, char *bytes, int size, int timeout) ++int deviceusb_libusb_interrupt_write(void *dev, int ep, char *bytes, int size, int timeout) + { + return usb_interrupt_write((usb_dev_handle *)dev, ep, bytes, size, timeout); + } + +-int libusb_interrupt_read(void *dev, int ep, char *bytes, int size, int timeout) ++int deviceusb_libusb_interrupt_read(void *dev, int ep, char *bytes, int size, int timeout) + { + return usb_interrupt_read((usb_dev_handle *)dev, ep, bytes, size, timeout); + } diff --git a/lang/perl-encode-locale/Makefile b/lang/perl-encode-locale/Makefile new file mode 100644 index 00000000..48eafa81 --- /dev/null +++ b/lang/perl-encode-locale/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2015 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:=perl-encode-locale +PKG_VERSION:=1.05 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS +PKG_SOURCE:=Encode-Locale-$(PKG_VERSION).tar.gz +PKG_HASH:=176fa02771f542a4efb1dbc2a4c928e8f4391bf4078473bd6040d8f11adb0ec1 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Encode-Locale-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-encode-locale + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Determine the locale encoding + URL:=http://search.cpan.org/dist/Encode-Locale/ + DEPENDS:=perl +perlbase-base +perlbase-encode +perlbase-essential +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-encode-locale/install + $(call perlmod/Install,$(1),Encode auto/Encode) +endef + + +$(eval $(call BuildPackage,perl-encode-locale)) diff --git a/lang/perl-file-listing/Makefile b/lang/perl-file-listing/Makefile new file mode 100644 index 00000000..2725cedb --- /dev/null +++ b/lang/perl-file-listing/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2015 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:=perl-file-listing +PKG_VERSION:=6.04 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS +PKG_SOURCE:=File-Listing-$(PKG_VERSION).tar.gz +PKG_HASH:=1e0050fcd6789a2179ec0db282bf1e90fb92be35d1171588bd9c47d52d959cf5 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/File-Listing-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-file-listing + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Parse directory listing + URL:=http://search.cpan.org/dist/File-Listing/ + DEPENDS:=perl +perl-http-date +perlbase-essential +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-file-listing/install + $(call perlmod/Install,$(1),File auto/File) +endef + + +$(eval $(call BuildPackage,perl-file-listing)) diff --git a/lang/perl-file-sharedir-install/Makefile b/lang/perl-file-sharedir-install/Makefile new file mode 100644 index 00000000..f37d41af --- /dev/null +++ b/lang/perl-file-sharedir-install/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2015 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:=perl-file-sharedir-install +PKG_VERSION:=0.10 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GW/GWYN +PKG_SOURCE:=File-ShareDir-Install-$(PKG_VERSION).tar.gz +PKG_HASH:=708af71dec4dfb5a8cf9a5e863b566714c3f65f0a76722302de5a07ee202e6f7 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/File-ShareDir-Install-$(PKG_VERSION) +HOST_BUILD_DEPENDS:=perl/host +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/File-ShareDir-Install-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk +include ../perl/perlmod.mk + +define Package/perl-file-sharedir-install + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Install read-only data files + URL:=http://search.cpan.org/dist/File-ShareDir-Install/ + DEPENDS:=perl +perlbase-essential +perlbase-extutils +perlbase-file +perlbase-io +endef + +define Host/Configure + $(call perlmod/host/Configure,,,) +endef + +define Host/Compile + $(call perlmod/host/Compile,,) +endef + +define Host/Install + $(call perlmod/host/Install,$(1),) +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-file-sharedir-install/install + $(call perlmod/Install,$(1),File auto/File) +endef + + +$(eval $(call BuildPackage,perl-file-sharedir-install)) +$(eval $(call HostBuild)) diff --git a/lang/perl-html-form/Makefile b/lang/perl-html-form/Makefile new file mode 100644 index 00000000..022c3b7c --- /dev/null +++ b/lang/perl-html-form/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2015 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:=perl-html-form +PKG_VERSION:=6.03 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS +PKG_SOURCE:=HTML-Form-$(PKG_VERSION).tar.gz +PKG_HASH:=68c01d94f005d5ca9c4d55ad2a1bf3a8d034a5fc6db187d91a4c42f3fdc9fc36 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Form-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-html-form + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Class that represents an HTML form element + URL:=http://search.cpan.org/dist/HTML-Form/ + DEPENDS:=perl +perl-html-parser +perl-http-message +perl-uri +perlbase-encode +perlbase-essential +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-html-form/install + $(call perlmod/Install,$(1),HTML auto/HTML) +endef + + +$(eval $(call BuildPackage,perl-html-form)) diff --git a/lang/perl-html-parser/Makefile b/lang/perl-html-parser/Makefile new file mode 100644 index 00000000..c769ccc9 --- /dev/null +++ b/lang/perl-html-parser/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2014 - 2016 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:=perl-html-parser +PKG_VERSION:=3.72 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS/ +PKG_SOURCE:=HTML-Parser-$(PKG_VERSION).tar.gz +PKG_HASH:=ec28c7e1d9e67c45eca197077f7cdc41ead1bb4c538c7f02a3296a4bb92f608b + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Parser-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-html-parser + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=A collection of modules that parse HTML text documents + URL:=http://search.cpan.org/dist/HTML-Parser/ + DEPENDS:=perl +perl-html-tagset +perlbase-essential +perlbase-xsloader +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-html-parser/install + $(call perlmod/Install,$(1),HTML auto/HTML) +endef + + +$(eval $(call BuildPackage,perl-html-parser)) diff --git a/lang/perl-html-tagset/Makefile b/lang/perl-html-tagset/Makefile new file mode 100644 index 00000000..01410585 --- /dev/null +++ b/lang/perl-html-tagset/Makefile @@ -0,0 +1,48 @@ +# +# 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:=perl-html-tagset +PKG_VERSION:=3.20 +PKG_RELEASE:=3 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/P/PE/PETDANCE/ +PKG_SOURCE:=HTML-Tagset-$(PKG_VERSION).tar.gz +PKG_HASH:=adb17dac9e36cd011f5243881c9739417fd102fce760f8de4e9be4c7131108e2 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Tagset-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-html-tagset + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Data tables pertaining to HTML + URL:=http://search.cpan.org/dist/HTML-Tagset/ + DEPENDS:=perl +perlbase-essential +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-html-tagset/install + $(call perlmod/Install,$(1),HTML) +endef + + +$(eval $(call BuildPackage,perl-html-tagset)) diff --git a/lang/perl-html-tree/Makefile b/lang/perl-html-tree/Makefile new file mode 100644 index 00000000..20839e62 --- /dev/null +++ b/lang/perl-html-tree/Makefile @@ -0,0 +1,48 @@ +# +# 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:=perl-html-tree +PKG_VERSION:=3.23 +PKG_RELEASE:=4 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/P/PE/PETEK/ +PKG_SOURCE:=HTML-Tree-$(PKG_VERSION).tar.gz +PKG_HASH:=f5175acf262f3710dce899796ea3e353049939400b100706d03df2f08803c8de + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Tree-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-html-tree + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Represent and create HTML syntax trees + URL:=http://search.cpan.org/dist/HTML-Tree/ + DEPENDS:=perl +perl-html-parser +perl-html-tagset +perlbase-essential +perlbase-integer +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-html-tree/install + $(call perlmod/Install,$(1),HTML) +endef + + +$(eval $(call BuildPackage,perl-html-tree)) diff --git a/lang/perl-http-cookies/Makefile b/lang/perl-http-cookies/Makefile new file mode 100644 index 00000000..712cfbd2 --- /dev/null +++ b/lang/perl-http-cookies/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2015 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:=perl-http-cookies +PKG_VERSION:=6.01 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS +PKG_SOURCE:=HTTP-Cookies-$(PKG_VERSION).tar.gz +PKG_HASH:=f5d3ade383ce6389d80cb0d0356b643af80435bb036afd8edce335215ec5eb20 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Cookies-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-http-cookies + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=HTTP cookie jars + URL:=http://search.cpan.org/dist/HTTP-Cookies/ + DEPENDS:=perl +perl-http-date +perl-http-message +perlbase-essential +perlbase-time +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-http-cookies/install + $(call perlmod/Install,$(1),HTTP auto/HTTP) +endef + + +$(eval $(call BuildPackage,perl-http-cookies)) diff --git a/lang/perl-http-daemon/Makefile b/lang/perl-http-daemon/Makefile new file mode 100644 index 00000000..ed9d2925 --- /dev/null +++ b/lang/perl-http-daemon/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2015 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:=perl-http-daemon +PKG_VERSION:=6.01 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS +PKG_SOURCE:=HTTP-Daemon-$(PKG_VERSION).tar.gz +PKG_HASH:=43fd867742701a3f9fcc7bd59838ab72c6490c0ebaf66901068ec6997514adc2 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Daemon-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-http-daemon + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=A simple http server class + URL:=http://search.cpan.org/dist/HTTP-Daemon/ + DEPENDS:=perl +perl-http-date +perl-http-message +perl-lwp-mediatypes +perlbase-essential +perlbase-io +perlbase-sys +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-http-daemon/install + $(call perlmod/Install,$(1),HTTP auto/HTTP) +endef + + +$(eval $(call BuildPackage,perl-http-daemon)) diff --git a/lang/perl-http-date/Makefile b/lang/perl-http-date/Makefile new file mode 100644 index 00000000..4801ac1f --- /dev/null +++ b/lang/perl-http-date/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2015 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:=perl-http-date +PKG_VERSION:=6.02 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS +PKG_SOURCE:=HTTP-Date-$(PKG_VERSION).tar.gz +PKG_HASH:=e8b9941da0f9f0c9c01068401a5e81341f0e3707d1c754f8e11f42a7e629e333 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Date-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-http-date + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Date conversion routines + URL:=http://search.cpan.org/dist/HTTP-Date/ + DEPENDS:=perl +perlbase-essential +perlbase-time +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-http-date/install + $(call perlmod/Install,$(1),HTTP auto/HTTP) +endef + + +$(eval $(call BuildPackage,perl-http-date)) diff --git a/lang/perl-http-message/Makefile b/lang/perl-http-message/Makefile new file mode 100644 index 00000000..c6a2469d --- /dev/null +++ b/lang/perl-http-message/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2015 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:=perl-http-message +PKG_VERSION:=6.11 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER +PKG_SOURCE:=HTTP-Message-$(PKG_VERSION).tar.gz +PKG_HASH:=e7b368077ae6a188d99920411d8f52a8e5acfb39574d4f5c24f46fd22533d81b + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Message-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-http-message + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=HTTP style messages + URL:=http://search.cpan.org/dist/HTTP-Message/ + DEPENDS:=perl +perl-encode-locale +perl-http-date +perl-io-html +perl-lwp-mediatypes +perl-uri +perlbase-base +perlbase-compress +perlbase-encode +perlbase-essential +perlbase-io +perlbase-mime +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-http-message/install + $(call perlmod/Install,$(1),HTTP auto/HTTP) +endef + + +$(eval $(call BuildPackage,perl-http-message)) diff --git a/lang/perl-http-negotiate/Makefile b/lang/perl-http-negotiate/Makefile new file mode 100644 index 00000000..6503e394 --- /dev/null +++ b/lang/perl-http-negotiate/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2015 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:=perl-http-negotiate +PKG_VERSION:=6.01 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS +PKG_SOURCE:=HTTP-Negotiate-$(PKG_VERSION).tar.gz +PKG_HASH:=1c729c1ea63100e878405cda7d66f9adfd3ed4f1d6cacaca0ee9152df728e016 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Negotiate-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-http-negotiate + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Choose a variant to serve + URL:=http://search.cpan.org/dist/HTTP-Negotiate/ + DEPENDS:=perl +perl-http-message +perlbase-essential +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-http-negotiate/install + $(call perlmod/Install,$(1),HTTP auto/HTTP) +endef + + +$(eval $(call BuildPackage,perl-http-negotiate)) diff --git a/lang/perl-http-server-simple/Makefile b/lang/perl-http-server-simple/Makefile new file mode 100644 index 00000000..aab1dfd6 --- /dev/null +++ b/lang/perl-http-server-simple/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2015 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:=perl-http-server-simple +PKG_VERSION:=0.51 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/B/BP/BPS +PKG_SOURCE:=HTTP-Server-Simple-$(PKG_VERSION).tar.gz +PKG_HASH:=b9dc5c9f12c16ca39a96f0ede1e27a18a5594274ff8f583000788a7fca136dfb + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Server-Simple-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-http-server-simple + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lightweight HTTP server + URL:=http://search.cpan.org/dist/HTTP-Server-Simple/ + DEPENDS:=perl +perl-cgi +perlbase-base +perlbase-essential +perlbase-filehandle +perlbase-socket +perlbase-test +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-http-server-simple/install + $(call perlmod/Install,$(1),HTTP auto/HTTP) +endef + + +$(eval $(call BuildPackage,perl-http-server-simple)) diff --git a/lang/perl-inline-c/Makefile b/lang/perl-inline-c/Makefile new file mode 100644 index 00000000..bc5913da --- /dev/null +++ b/lang/perl-inline-c/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2015 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:=perl-inline-c +PKG_VERSION:=0.78 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TI/TINITA +PKG_SOURCE:=Inline-C-$(PKG_VERSION).tar.gz +PKG_HASH:=9a7804d85c01a386073d2176582b0262b6374c5c0341049da3ef84c6f53efbc7 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/Inline-C-$(PKG_VERSION) +HOST_BUILD_DEPENDS:=perl/host perl-inline/host perl-parse-recdescent/host perl-file-sharedir-install/host +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Inline-C-$(PKG_VERSION) +PKG_BUILD_DEPENDS:=perl-inline/host perl-parse-recdescent/host perl-file-sharedir-install/host + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk +include ../perl/perlmod.mk + +define Package/perl-inline-c + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=C Language Support for Inline + URL:=http://search.cpan.org/dist/Inline-C/ + DEPENDS:=perl +perl-inline +perl-parse-recdescent +perlbase-config +perlbase-cwd +perlbase-data +perlbase-essential +perlbase-file +perlbase-if +endef + +define Host/Configure + $(call perlmod/host/Configure,,,) +endef + +define Host/Compile + $(call perlmod/host/Compile,,) +endef + +define Host/Install + $(call perlmod/host/Install,$(1),) +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-inline-c/install + $(call perlmod/Install,$(1),Inline auto/Inline) +endef + + +$(eval $(call BuildPackage,perl-inline-c)) +$(eval $(call HostBuild)) diff --git a/lang/perl-inline-c/patches/100-inline_c-no_compile_hack.patch b/lang/perl-inline-c/patches/100-inline_c-no_compile_hack.patch new file mode 100644 index 00000000..dcfe2bb5 --- /dev/null +++ b/lang/perl-inline-c/patches/100-inline_c-no_compile_hack.patch @@ -0,0 +1,11 @@ +--- a/lib/Inline/C.pm ++++ b/lib/Inline/C.pm +@@ -361,7 +361,7 @@ sub build { + $o->call('write_XS', 'Build Glue 1'); + $o->call('write_Inline_headers', 'Build Glue 2'); + $o->call('write_Makefile_PL', 'Build Glue 3'); +- $o->call('compile', 'Build Compile'); ++ $o->call('compile', 'Build Compile') unless $ENV{'_INLINE_C_NO_COMPILE_'}; + if (IS_WIN32) { + $lockfh->release or die "releasemutex $file: $^E"; + } diff --git a/lang/perl-inline-c/patches/110-inline_c-make_system_typemap_overridable.patch b/lang/perl-inline-c/patches/110-inline_c-make_system_typemap_overridable.patch new file mode 100644 index 00000000..b2ae09e6 --- /dev/null +++ b/lang/perl-inline-c/patches/110-inline_c-make_system_typemap_overridable.patch @@ -0,0 +1,46 @@ +--- a/lib/Inline/C.pm ++++ b/lib/Inline/C.pm +@@ -438,22 +438,28 @@ sub get_maps { + print STDERR "get_maps Stage\n" if $o->{CONFIG}{BUILD_NOISY}; + my $typemap = ''; + my $file; +- $file = File::Spec->catfile( +- $Config::Config{installprivlib}, +- "ExtUtils", +- "typemap", +- ); +- $typemap = $file if -f $file; +- $file = File::Spec->catfile( +- $Config::Config{privlibexp} +- ,"ExtUtils","typemap" +- ); +- $typemap = $file +- if (not $typemap and -f $file); +- warn "Can't find the default system typemap file" +- if (not $typemap and $^W); ++ ++ unless ($ENV{'_INLINE_C_SYSTEM_TYPEMAP_'}) { ++ $file = File::Spec->catfile( ++ $Config::Config{installprivlib}, ++ "ExtUtils", ++ "typemap", ++ ); ++ $typemap = $file if -f $file; ++ $file = File::Spec->catfile( ++ $Config::Config{privlibexp} ++ ,"ExtUtils","typemap" ++ ); ++ $typemap = $file ++ if (not $typemap and -f $file); ++ warn "Can't find the default system typemap file" ++ if (not $typemap and $^W); + +- unshift(@{$o->{ILSM}{MAKEFILE}{TYPEMAPS}}, $typemap) if $typemap; ++ unshift(@{$o->{ILSM}{MAKEFILE}{TYPEMAPS}}, $typemap) if $typemap; ++ } ++ else { ++ unshift(@{$o->{ILSM}{MAKEFILE}{TYPEMAPS}}, $ENV{'_INLINE_C_SYSTEM_TYPEMAP_'}); ++ } + + if (not $o->UNTAINT) { + require FindBin; diff --git a/lang/perl-inline/Makefile b/lang/perl-inline/Makefile new file mode 100644 index 00000000..c6de5b32 --- /dev/null +++ b/lang/perl-inline/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2015 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:=perl-inline +PKG_VERSION:=0.80 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/I/IN/INGY +PKG_SOURCE:=Inline-$(PKG_VERSION).tar.gz +PKG_HASH:=7e2bd984b1ebd43e336b937896463f2c6cb682c956cbd2c311a464363d2ccef6 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Inline-$(PKG_VERSION) +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/Inline-$(PKG_VERSION) + +HOST_BUILD_DEPENDS:=perl/host + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk +include ../perl/perlmod.mk + +define Package/perl-inline + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Write subroutines in other languages + URL:=http://search.cpan.org/dist/Inline/ + DEPENDS:=perl +perlbase-base +perlbase-config +perlbase-cwd +perlbase-digest +perlbase-essential +perlbase-fcntl +perlbase-file +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-inline/install + $(call perlmod/Install,$(1),Inline.pm Inline auto/Inline) +endef + +define Host/Configure + $(call perlmod/host/Configure,,,) +endef + +define Host/Compile + $(call perlmod/host/Compile,,) +endef + +define Host/Install + $(call perlmod/host/Install,$(1),) +endef + + +$(eval $(call BuildPackage,perl-inline)) +$(eval $(call HostBuild)) diff --git a/lang/perl-io-html/Makefile b/lang/perl-io-html/Makefile new file mode 100644 index 00000000..1e280d84 --- /dev/null +++ b/lang/perl-io-html/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2015 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:=perl-io-html +PKG_VERSION:=1.001 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/C/CJ/CJM +PKG_SOURCE:=IO-HTML-$(PKG_VERSION).tar.gz +PKG_HASH:=ea78d2d743794adc028bc9589538eb867174b4e165d7d8b5f63486e6b828e7e0 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/IO-HTML-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-io-html + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Open an HTML file with automatic charset detection + URL:=http://search.cpan.org/dist/IO-HTML/ + DEPENDS:=perl +perlbase-encode +perlbase-essential +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-io-html/install + $(call perlmod/Install,$(1),IO auto/IO) +endef + + +$(eval $(call BuildPackage,perl-io-html)) diff --git a/lang/perl-lockfile-simple/Makefile b/lang/perl-lockfile-simple/Makefile new file mode 100644 index 00000000..1bd5aca1 --- /dev/null +++ b/lang/perl-lockfile-simple/Makefile @@ -0,0 +1,48 @@ +# +# 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:=perl-lockfile-simple +PKG_VERSION:=0.208 +PKG_RELEASE:=3 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/S/SC/SCHWIGON/lockfile-simple/ +PKG_SOURCE:=LockFile-Simple-$(PKG_VERSION).tar.gz +PKG_HASH:=45c77896b2a5a0a45f6202a6f813f437ff8b283f84a1c60d0c4f3730802af3a2 + +PKG_LICENSE:=GPL-2.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/LockFile-Simple-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-lockfile-simple + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Simple advisory file locking + URL:=http://search.cpan.org/dist/LockFile-Simple/ + DEPENDS:=perl +perlbase-essential +perlbase-sys +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-lockfile-simple/install + $(call perlmod/Install,$(1),LockFile auto/LockFile) +endef + + +$(eval $(call BuildPackage,perl-lockfile-simple)) diff --git a/lang/perl-lwp-mediatypes/Makefile b/lang/perl-lwp-mediatypes/Makefile new file mode 100644 index 00000000..375b3a4e --- /dev/null +++ b/lang/perl-lwp-mediatypes/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2015 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:=perl-lwp-mediatypes +PKG_VERSION:=6.02 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS +PKG_SOURCE:=LWP-MediaTypes-$(PKG_VERSION).tar.gz +PKG_HASH:=18790b0cc5f0a51468495c3847b16738f785a2d460403595001e0b932e5db676 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/LWP-MediaTypes-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-lwp-mediatypes + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Guess media type for a file or a URL + URL:=http://search.cpan.org/dist/LWP-MediaTypes/ + DEPENDS:=perl +perlbase-essential +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-lwp-mediatypes/install + $(call perlmod/Install,$(1),LWP auto/LWP) +endef + + +$(eval $(call BuildPackage,perl-lwp-mediatypes)) diff --git a/lang/perl-net-http/Makefile b/lang/perl-net-http/Makefile new file mode 100644 index 00000000..8bd32e7d --- /dev/null +++ b/lang/perl-net-http/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2015 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:=perl-net-http +PKG_VERSION:=6.09 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER +PKG_SOURCE:=Net-HTTP-$(PKG_VERSION).tar.gz +PKG_HASH:=52762b939d84806908ba544581c5708375f7938c3c0e496c128ca3fbc425e58d + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Net-HTTP-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-net-http + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Low-level HTTP connection (client) + URL:=http://search.cpan.org/dist/Net-HTTP/ + DEPENDS:=perl +perl-uri +perlbase-compress +perlbase-essential +perlbase-io +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-net-http/install + $(call perlmod/Install,$(1),Net auto/Net) +endef + + +$(eval $(call BuildPackage,perl-net-http)) diff --git a/lang/perl-net-telnet/Makefile b/lang/perl-net-telnet/Makefile new file mode 100644 index 00000000..d3b4cfa3 --- /dev/null +++ b/lang/perl-net-telnet/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2011-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:=perl-net-telnet +PKG_VERSION:=3.04 +PKG_RELEASE:=3 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/J/JR/JROGERS/ +PKG_SOURCE:=Net-Telnet-$(PKG_VERSION).tar.gz +PKG_HASH:=e64d567a4e16295ecba949368e7a6b8b5ae2a16b3ad682121d9b007dc5d2a37a + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Net-Telnet-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-net-telnet + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Telnet client + URL:=http://search.cpan.org/dist/Net-Telnet/ + DEPENDS:=perl +perlbase-essential +perlbase-socket +perlbase-symbol +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-net-telnet/install + $(call perlmod/Install,$(1),Net auto/Net) +endef + + +$(eval $(call BuildPackage,perl-net-telnet)) diff --git a/lang/perl-parse-recdescent/Makefile b/lang/perl-parse-recdescent/Makefile new file mode 100644 index 00000000..d7dff8db --- /dev/null +++ b/lang/perl-parse-recdescent/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2015 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:=perl-parse-recdescent +PKG_VERSION:=1.967013 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/J/JT/JTBRAUN +PKG_SOURCE:=Parse-RecDescent-$(PKG_VERSION).tar.gz +PKG_HASH:=226590d3850cd1678deb0190d5207b3477fb9070a8ca6f18d8999daf44485930 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/Parse-RecDescent-$(PKG_VERSION) +HOST_BUILD_DEPENDS:=perl/host +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Parse-RecDescent-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk +include ../perl/perlmod.mk + +define Package/perl-parse-recdescent + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Generate Recursive-Descent Parsers + URL:=http://search.cpan.org/dist/Parse-RecDescent/ + DEPENDS:=perl +perlbase-essential +perlbase-test +perlbase-text +endef + +define Host/Configure + $(call perlmod/host/Configure,,,) +endef + +define Host/Compile + $(call perlmod/host/Compile,,) +endef + +define Host/Install + $(call perlmod/host/Install,$(1),) +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-parse-recdescent/install + $(call perlmod/Install,$(1),Parse auto/Parse) +endef + + +$(eval $(call BuildPackage,perl-parse-recdescent)) +$(eval $(call HostBuild)) diff --git a/lang/perl-sub-uplevel/Makefile b/lang/perl-sub-uplevel/Makefile new file mode 100644 index 00000000..f078f77e --- /dev/null +++ b/lang/perl-sub-uplevel/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2015 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:=perl-sub-uplevel +PKG_VERSION:=0.25 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/D/DA/DAGOLDEN +PKG_SOURCE:=Sub-Uplevel-$(PKG_VERSION).tar.gz +PKG_HASH:=2dcca582a7ea5bada576eb27c4be1d1b064fb22175bdbd6d696c45d083560505 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Sub-Uplevel-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-sub-uplevel + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Apparently run a function in a higher stack frame + URL:=http://search.cpan.org/dist/Sub-Uplevel/ + DEPENDS:=perl +perlbase-essential +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-sub-uplevel/install + $(call perlmod/Install,$(1),Sub auto/Sub) +endef + + +$(eval $(call BuildPackage,perl-sub-uplevel)) diff --git a/lang/perl-test-harness/Makefile b/lang/perl-test-harness/Makefile new file mode 100644 index 00000000..36a00545 --- /dev/null +++ b/lang/perl-test-harness/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2014 - 2016 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:=perl-test-harness +PKG_VERSION:=3.36 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEONT/ +PKG_SOURCE:=Test-Harness-$(PKG_VERSION).tar.gz +PKG_HASH:=e7566f13b041d028b56f184b77ec2545ec6f0bb5a0f8f5368f7e4a08b496b63e + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Test-Harness-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-test-harness + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Perl Test Harness + URL:=http://search.cpan.org/dist/Test-Harness/ + DEPENDS:=perl +perlbase-base +perlbase-benchmark +perlbase-config +perlbase-essential +perlbase-file +perlbase-getopt +perlbase-io +perlbase-posix +perlbase-text +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-test-harness/install + $(call perlmod/Install,$(1),App auto/Test TAP Test) +endef + + +$(eval $(call BuildPackage,perl-test-harness)) diff --git a/lang/perl-test-warn/Makefile b/lang/perl-test-warn/Makefile new file mode 100644 index 00000000..94409e1f --- /dev/null +++ b/lang/perl-test-warn/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2015 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:=perl-test-warn +PKG_VERSION:=0.30 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/C/CH/CHORNY +PKG_SOURCE:=Test-Warn-$(PKG_VERSION).tar.gz +PKG_HASH:=8197555b94189d919349a03f7058f83861f145af9bee59f505bfe47562144e41 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Test-Warn-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-test-warn + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Perl extension to test methods for warnings + URL:=http://search.cpan.org/dist/Test-Warn/ + DEPENDS:=perl +perl-sub-uplevel +perlbase-essential +perlbase-test +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-test-warn/install + $(call perlmod/Install,$(1),Test auto/Test) +endef + + +$(eval $(call BuildPackage,perl-test-warn)) diff --git a/lang/perl-text-csv_xs/Makefile b/lang/perl-text-csv_xs/Makefile new file mode 100644 index 00000000..158cb0ec --- /dev/null +++ b/lang/perl-text-csv_xs/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2017 Philip Prindeville, Redfish Solutions, LLC +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=perl-text-csv_xs +PKG_VERSION:=1.35 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/H/HM/HMBRAND/ +PKG_SOURCE:=Text-CSV_XS-$(PKG_VERSION).tgz +PKG_HASH:=2b4f111e9486b230b02bfabbbf50c453f959d18ec17351a930e41f0959b358b7 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Philip Prindeville + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Text-CSV_XS-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-text-csv_xs + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Text comma-separated values manipulation routines + URL:=http://search.cpan.org/dist/Text-CSV_XS/ + DEPENDS:=perl +perlbase-essential +perlbase-config +perlbase-io +perlbase-dynaloader +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-text-csv_xs/install + $(call perlmod/Install,$(1),Text Text/CSV_XS.pm auto/Text/CSV_XS) +endef + + +$(eval $(call BuildPackage,perl-text-csv_xs)) diff --git a/lang/perl-uri/Makefile b/lang/perl-uri/Makefile new file mode 100644 index 00000000..3f043e4f --- /dev/null +++ b/lang/perl-uri/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2015 - 2016 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:=perl-uri +PKG_VERSION:=1.72 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/ +PKG_SOURCE:=URI-$(PKG_VERSION).tar.gz +PKG_HASH:=35f14431d4b300de4be1163b0b5332de2d7fbda4f05ff1ed198a8e9330d40a32 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/URI-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-uri + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Manipulates and accesses URI strings + URL:=http://search.cpan.org/dist/URI/ + DEPENDS:=perl +perlbase-essential +perlbase-integer +perlbase-mime +perlbase-scalar +perlbase-utf8 +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-uri/install + $(call perlmod/Install,$(1),URI URI.pm) +endef + + +$(eval $(call BuildPackage,perl-uri)) diff --git a/lang/perl-www-curl/Makefile b/lang/perl-www-curl/Makefile new file mode 100644 index 00000000..9a7ad5fa --- /dev/null +++ b/lang/perl-www-curl/Makefile @@ -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:=perl-www-curl +PKG_VERSION:=4.17 +PKG_RELEASE:=4 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/S/SZ/SZBALINT/ +PKG_SOURCE:=WWW-Curl-$(PKG_VERSION).tar.gz +PKG_HASH:=52ffab110e32348d775f241c973eb56f96b08eedbc110d77d257cdb0a24ab7ba + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/WWW-Curl-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-www-curl + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Perl bindings to libcurl + URL:=http://search.cpan.org/dist/WWW-Curl/ + DEPENDS:=perl +libcurl +perlbase-essential +perlbase-xsloader +endef + +define Build/Configure + $(call perlmod/Configure,$(STAGING_DIR)/usr/include,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-www-curl/install + $(call perlmod/Install,$(1),WWW/Curl WWW/Curl.pm auto/WWW/Curl) +endef + + +$(eval $(call BuildPackage,perl-www-curl)) diff --git a/lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch b/lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch new file mode 100644 index 00000000..568b65c2 --- /dev/null +++ b/lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch @@ -0,0 +1,74 @@ +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -12,31 +12,31 @@ no_index directory => 'template'; + repository 'http://github.com/szbalint/WWW--Curl'; + # This is a hack. If you have libcurl installed, just specify curl.h below + # and comment out this line. +-if ($^O ne 'MSWin32') { +- if (!$ENV{CURL_CONFIG}) { +- requires_external_bin 'curl-config'; +- } +-} else { +- print "Sorry, no automated install is available on Windows,\n". +- "please see the README.Win32 file on instructions for a manual install.\n"; +- exit(0); +-} +- +-my $curl_config = $ENV{CURL_CONFIG} || 'curl-config'; +- +-my $vernum = `${curl_config} --vernum`; chomp $vernum; +-my $version = `${curl_config} --version`; chomp $version; +- +-my $minimum_ver = hex("070a08"); +- +-if ($vernum && hex($vernum) <= $minimum_ver) { +- print "Your currently installed libcurl version - $version - is too old.\n". +- "This module doesn't seek compatibility with versions older than 7.10.8\n". +- "Proceed manually if you know what you're doing.\n"; +- exit(0); +-} +- +-print "The version is $version\n"; ++#if ($^O ne 'MSWin32') { ++# if (!$ENV{CURL_CONFIG}) { ++# requires_external_bin 'curl-config'; ++# } ++#} else { ++# print "Sorry, no automated install is available on Windows,\n". ++# "please see the README.Win32 file on instructions for a manual install.\n"; ++# exit(0); ++#} ++# ++#my $curl_config = $ENV{CURL_CONFIG} || 'curl-config'; ++# ++#my $vernum = `${curl_config} --vernum`; chomp $vernum; ++#my $version = `${curl_config} --version`; chomp $version; ++# ++#my $minimum_ver = hex("070a08"); ++# ++#if ($vernum && hex($vernum) <= $minimum_ver) { ++# print "Your currently installed libcurl version - $version - is too old.\n". ++# "This module doesn't seek compatibility with versions older than 7.10.8\n". ++# "Proceed manually if you know what you're doing.\n"; ++# exit(0); ++#} ++# ++#print "The version is $version\n"; + + my @includes = qw(); + my ($cflags,$lflags, $ldflags) = ('','',''); +@@ -58,10 +58,10 @@ if ($^O ne 'MSWin32') { + # Get curl to tell us where it is, if we can. + # + +-if ($^O ne 'MSWin32') { +- $cflags = `${curl_config} --cflags`; +- $lflags = `${curl_config} --libs`; +-} ++#if ($^O ne 'MSWin32') { ++# $cflags = `${curl_config} --cflags`; ++# $lflags = `${curl_config} --libs`; ++#} + + # can't find link flags, make some guesses + if (!defined($lflags)) { diff --git a/lang/perl-www-curl/patches/101-skip-preprocessor-symbol.path b/lang/perl-www-curl/patches/101-skip-preprocessor-symbol.path new file mode 100644 index 00000000..34221c0d --- /dev/null +++ b/lang/perl-www-curl/patches/101-skip-preprocessor-symbol.path @@ -0,0 +1,34 @@ +From 0be0223422e6e5f4091c6e4e058d213623eed105 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Mon, 12 Sep 2016 14:40:44 +0200 +Subject: [PATCH] Skip preprocessor symbol only CURL_STRICTER +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +CURL_STRICTER leaked into curl-constants.c when building against +curl-7.50.2. This is a preprocessor only macro without a value. + +CPAN RT#117793 + +Signed-off-by: Petr Písař +--- + Makefile.PL | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.PL b/Makefile.PL +index f9170bb..ad2bd3d 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -127,7 +127,7 @@ if (!defined($curl_h)) { + close H; + + for my $e (sort @syms) { +- if($e =~ /(OBSOLETE|^CURL_EXTERN|_LAST\z|_LASTENTRY\z)/) { ++ if($e =~ /(OBSOLETE|^CURL_EXTERN|^CURL_STRICTER\z|_LAST\z|_LASTENTRY\z)/) { + next; + } + my ($group) = $e =~ m/^([^_]+_)/; +-- +2.7.4 + diff --git a/lang/perl-www-curl/patches/200-fix_default_lflags.patch b/lang/perl-www-curl/patches/200-fix_default_lflags.patch new file mode 100644 index 00000000..f51eaf58 --- /dev/null +++ b/lang/perl-www-curl/patches/200-fix_default_lflags.patch @@ -0,0 +1,11 @@ +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -39,7 +39,7 @@ repository 'http://github.com/szbalint/ + #print "The version is $version\n"; + + my @includes = qw(); +-my ($cflags,$lflags, $ldflags) = ('','',''); ++my ($cflags,$lflags, $ldflags) = ('','-lcurl',''); + + # You may need to specify where to find curl.h on your platform + # These are guesses only, in case curl-config is not telling us. diff --git a/lang/perl-www-mechanize/Makefile b/lang/perl-www-mechanize/Makefile new file mode 100644 index 00000000..a193a6b9 --- /dev/null +++ b/lang/perl-www-mechanize/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2010-2015 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:=perl-www-mechanize +PKG_VERSION:=1.75 +PKG_RELEASE:=1 + +PKG_SOURCE:=WWW-Mechanize-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/ +PKG_HASH:=5310051feb66c6ef9f7a4c070c66ec6092932129fc9cd18bba009ce999b7930b + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/WWW-Mechanize-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-www-mechanize + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Perl WWW Mechanize + URL:=http://search.cpan.org/dist/WWW-Mechanize/ + DEPENDS:=perl +perl-cgi +perl-html-form +perl-html-parser +perl-html-tree +perl-http-daemon +perl-http-message +perl-http-server-simple +perl-test-warn +perl-uri +perl-www +perlbase-base +perlbase-essential +perlbase-file +perlbase-findbin +perlbase-getopt +perlbase-pod +perlbase-test +endef + +define Build/Configure + $(call perlmod/Configure,$(STAGING_DIR)/usr/include,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-www-mechanize/install + $(call perlmod/Install,$(1),WWW/Mechanize WWW/Mechanize.pm) +endef + + +$(eval $(call BuildPackage,perl-www-mechanize)) diff --git a/lang/perl-www-robotrules/Makefile b/lang/perl-www-robotrules/Makefile new file mode 100644 index 00000000..ccbb7fa6 --- /dev/null +++ b/lang/perl-www-robotrules/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2015 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:=perl-www-robotrules +PKG_VERSION:=6.02 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS +PKG_SOURCE:=WWW-RobotRules-$(PKG_VERSION).tar.gz +PKG_HASH:=46b502e7a288d559429891eeb5d979461dd3ecc6a5c491ead85d165b6e03a51e + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/WWW-RobotRules-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-www-robotrules + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=database of robots.txt-derived permissions + URL:=http://search.cpan.org/dist/WWW-RobotRules/ + DEPENDS:=perl +perl-uri +perlbase-anydbm-file +perlbase-essential +perlbase-fcntl +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-www-robotrules/install + $(call perlmod/Install,$(1),WWW auto/WWW) +endef + + +$(eval $(call BuildPackage,perl-www-robotrules)) diff --git a/lang/perl-www/Makefile b/lang/perl-www/Makefile new file mode 100644 index 00000000..563e51c8 --- /dev/null +++ b/lang/perl-www/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2013-2015 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:=perl-www +PKG_VERSION:=6.15 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/ +PKG_SOURCE:=libwww-perl-$(PKG_VERSION).tar.gz +PKG_HASH:=6f349d45c21b1ec0501c4437dfcb70570940e6c3d5bff783bd91d4cddead8322 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/libwww-perl-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-www + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=WWW client/server library for Perl (aka LWP) + URL:=http://search.cpan.org/dist/libwww-perl/ + DEPENDS:=perl +perl-encode-locale +perl-file-listing +perl-html-parser +perl-http-cookies +perl-http-daemon +perl-http-date +perl-http-message +perl-http-negotiate +perl-lwp-mediatypes +perl-net-http +perl-uri +perl-www-robotrules +perlbase-base +perlbase-digest +perlbase-encode +perlbase-essential +perlbase-io +perlbase-mime +perlbase-net +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-www/install + $(call perlmod/Install,$(1),LWP.pm auto/LWP LWP) +endef + + +$(eval $(call BuildPackage,perl-www)) diff --git a/lang/perl-xml-parser/Makefile b/lang/perl-xml-parser/Makefile new file mode 100644 index 00000000..3a6ebcae --- /dev/null +++ b/lang/perl-xml-parser/Makefile @@ -0,0 +1,86 @@ +# +# Copyright (C) 2015 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:=perl-xml-parser +PKG_VERSION:=2.44 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TO/TODDR/ +PKG_SOURCE:=XML-Parser-$(PKG_VERSION).tar.gz +PKG_HASH:=1ae9d07ee9c35326b3d9aad56eae71a6730a73a116b9fe9e8a4758b7cc033216 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/XML-Parser-$(PKG_VERSION) +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/XML-Parser-$(PKG_VERSION) + +HOST_BUILD_DEPENDS:=perl/host expat/host + +EXPAT_LIBPATH:=$(STAGING_DIR)/usr/lib +EXPAT_INCPATH=$(STAGING_DIR)/usr/include +HOST_EXPAT_LIBPATH:=$(STAGING_DIR_HOSTPKG)/lib +HOST_EXPAT_INCPATH=$(STAGING_DIR_HOSTPKG)/include + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk +include ../perl/perlmod.mk + +define Package/perl-xml-parser + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Perl XML Parser + URL:=http://search.cpan.org/dist/XML-Parser/ + DEPENDS:=perl +libexpat +perlbase-dynaloader +perlbase-essential +endef + +define FixupExpat + # Manually reconfigure XML::Parser::Expat, as some overrides we provide will not have any effect otherwise + # Force usage of OpenWRT's expat + sed \ + -e 's!%%EXPAT_LIBPATH%%!$(2)!g' \ + -e 's!%%EXPAT_INCPATH%%!$(3)!g' \ + -i $(1)/Expat/Makefile.PL +endef + +define Build/Configure + $(call perlmod/Configure,EXPATLIBPATH=$(EXPAT_LIBPATH) EXPATINCPATH=$(EXPAT_INCPATH),,) + + $(call FixupExpat,$(PKG_BUILD_DIR),$(EXPAT_LIBPATH),$(EXPAT_INCPATH)) + $(call perlmod/Configure,,,$(PKG_BUILD_DIR)/Expat) +endef + +define Build/Compile + $(call perlmod/Compile,,) + $(call perlmod/Compile,,,$(PKG_BUILD_DIR)/Expat) +endef + +define Host/Configure + $(call perlmod/host/Configure,EXPATLIBPATH=$(HOST_EXPAT_LIBPATH) EXPATINCPATH=$(HOST_EXPAT_INCPATH),,) + $(call FixupExpat,$(HOST_BUILD_DIR),$(HOST_EXPAT_LIBPATH),$(HOST_EXPAT_INCPATH)) + $(call perlmod/host/Configure,,,$(HOST_BUILD_DIR)/Expat) +endef + +define Host/Compile + $(call perlmod/host/Compile,,) + $(call perlmod/host/Compile,,,$(HOST_BUILD_DIR)/Expat) +endef + +define Host/Install + $(call perlmod/host/Install,$(1),) +endef + +define Package/perl-xml-parser/install + $(call perlmod/Install,$(1),auto/XML XML) +endef + + +$(eval $(call BuildPackage,perl-xml-parser)) +$(eval $(call HostBuild)) diff --git a/lang/perl-xml-parser/patches/010-xml-parser-expat-use-ppport.h b/lang/perl-xml-parser/patches/010-xml-parser-expat-use-ppport.h new file mode 100644 index 00000000..e2aad83d --- /dev/null +++ b/lang/perl-xml-parser/patches/010-xml-parser-expat-use-ppport.h @@ -0,0 +1,7476 @@ +--- a/Expat/Expat.xs ++++ b/Expat/Expat.xs +@@ -20,17 +20,7 @@ + #include "patchlevel.h" + #include "encoding.h" + +- +-/* Version 5.005_5x (Development version for 5.006) doesn't like sv_... +- anymore, but 5.004 doesn't know about PL_sv.. +- Don't want to push up required version just for this. */ +- +-#if PATCHLEVEL < 5 +-#define PL_sv_undef sv_undef +-#define PL_sv_no sv_no +-#define PL_sv_yes sv_yes +-#define PL_na na +-#endif ++#include "ppport.h" + + #define BUFSIZE 32768 + +--- /dev/null ++++ b/Expat/ppport.h +@@ -0,0 +1,7452 @@ ++#if 0 ++<<'SKIP'; ++#endif ++/* ++---------------------------------------------------------------------- ++ ++ ppport.h -- Perl/Pollution/Portability Version 3.21 ++ ++ Automatically created by Devel::PPPort running under perl 5.020002. ++ ++ Do NOT edit this file directly! -- Edit PPPort_pm.PL and the ++ includes in parts/inc/ instead. ++ ++ Use 'perldoc ppport.h' to view the documentation below. ++ ++---------------------------------------------------------------------- ++ ++SKIP ++ ++=pod ++ ++=head1 NAME ++ ++ppport.h - Perl/Pollution/Portability version 3.21 ++ ++=head1 SYNOPSIS ++ ++ perl ppport.h [options] [source files] ++ ++ Searches current directory for files if no [source files] are given ++ ++ --help show short help ++ ++ --version show version ++ ++ --patch=file write one patch file with changes ++ --copy=suffix write changed copies with suffix ++ --diff=program use diff program and options ++ ++ --compat-version=version provide compatibility with Perl version ++ --cplusplus accept C++ comments ++ ++ --quiet don't output anything except fatal errors ++ --nodiag don't show diagnostics ++ --nohints don't show hints ++ --nochanges don't suggest changes ++ --nofilter don't filter input files ++ ++ --strip strip all script and doc functionality from ++ ppport.h ++ ++ --list-provided list provided API ++ --list-unsupported list unsupported API ++ --api-info=name show Perl API portability information ++ ++=head1 COMPATIBILITY ++ ++This version of F is designed to support operation with Perl ++installations back to 5.003, and has been tested up to 5.11.5. ++ ++=head1 OPTIONS ++ ++=head2 --help ++ ++Display a brief usage summary. ++ ++=head2 --version ++ ++Display the version of F. ++ ++=head2 --patch=I ++ ++If this option is given, a single patch file will be created if ++any changes are suggested. This requires a working diff program ++to be installed on your system. ++ ++=head2 --copy=I ++ ++If this option is given, a copy of each file will be saved with ++the given suffix that contains the suggested changes. This does ++not require any external programs. Note that this does not ++automagially add a dot between the original filename and the ++suffix. If you want the dot, you have to include it in the option ++argument. ++ ++If neither C<--patch> or C<--copy> are given, the default is to ++simply print the diffs for each file. This requires either ++C or a C program to be installed. ++ ++=head2 --diff=I ++ ++Manually set the diff program and options to use. The default ++is to use C, when installed, and output unified ++context diffs. ++ ++=head2 --compat-version=I ++ ++Tell F to check for compatibility with the given ++Perl version. The default is to check for compatibility with Perl ++version 5.003. You can use this option to reduce the output ++of F if you intend to be backward compatible only ++down to a certain Perl version. ++ ++=head2 --cplusplus ++ ++Usually, F will detect C++ style comments and ++replace them with C style comments for portability reasons. ++Using this option instructs F to leave C++ ++comments untouched. ++ ++=head2 --quiet ++ ++Be quiet. Don't print anything except fatal errors. ++ ++=head2 --nodiag ++ ++Don't output any diagnostic messages. Only portability ++alerts will be printed. ++ ++=head2 --nohints ++ ++Don't output any hints. Hints often contain useful portability ++notes. Warnings will still be displayed. ++ ++=head2 --nochanges ++ ++Don't suggest any changes. Only give diagnostic output and hints ++unless these are also deactivated. ++ ++=head2 --nofilter ++ ++Don't filter the list of input files. By default, files not looking ++like source code (i.e. not *.xs, *.c, *.cc, *.cpp or *.h) are skipped. ++ ++=head2 --strip ++ ++Strip all script and documentation functionality from F. ++This reduces the size of F dramatically and may be useful ++if you want to include F in smaller modules without ++increasing their distribution size too much. ++ ++The stripped F will have a C<--unstrip> option that allows ++you to undo the stripping, but only if an appropriate C ++module is installed. ++ ++=head2 --list-provided ++ ++Lists the API elements for which compatibility is provided by ++F. Also lists if it must be explicitly requested, ++if it has dependencies, and if there are hints or warnings for it. ++ ++=head2 --list-unsupported ++ ++Lists the API elements that are known not to be supported by ++F and below which version of Perl they probably ++won't be available or work. ++ ++=head2 --api-info=I ++ ++Show portability information for API elements matching I. ++If I is surrounded by slashes, it is interpreted as a regular ++expression. ++ ++=head1 DESCRIPTION ++ ++In order for a Perl extension (XS) module to be as portable as possible ++across differing versions of Perl itself, certain steps need to be taken. ++ ++=over 4 ++ ++=item * ++ ++Including this header is the first major one. This alone will give you ++access to a large part of the Perl API that hasn't been available in ++earlier Perl releases. Use ++ ++ perl ppport.h --list-provided ++ ++to see which API elements are provided by ppport.h. ++ ++=item * ++ ++You should avoid using deprecated parts of the API. For example, using ++global Perl variables without the C prefix is deprecated. Also, ++some API functions used to have a C prefix. Using this form is ++also deprecated. You can safely use the supported API, as F ++will provide wrappers for older Perl versions. ++ ++=item * ++ ++If you use one of a few functions or variables that were not present in ++earlier versions of Perl, and that can't be provided using a macro, you ++have to explicitly request support for these functions by adding one or ++more C<#define>s in your source code before the inclusion of F. ++ ++These functions or variables will be marked C in the list shown ++by C<--list-provided>. ++ ++Depending on whether you module has a single or multiple files that ++use such functions or variables, you want either C or global ++variants. ++ ++For a C function or variable (used only in a single source ++file), use: ++ ++ #define NEED_function ++ #define NEED_variable ++ ++For a global function or variable (used in multiple source files), ++use: ++ ++ #define NEED_function_GLOBAL ++ #define NEED_variable_GLOBAL ++ ++Note that you mustn't have more than one global request for the ++same function or variable in your project. ++ ++ Function / Variable Static Request Global Request ++ ----------------------------------------------------------------------------------------- ++ PL_parser NEED_PL_parser NEED_PL_parser_GLOBAL ++ PL_signals NEED_PL_signals NEED_PL_signals_GLOBAL ++ eval_pv() NEED_eval_pv NEED_eval_pv_GLOBAL ++ grok_bin() NEED_grok_bin NEED_grok_bin_GLOBAL ++ grok_hex() NEED_grok_hex NEED_grok_hex_GLOBAL ++ grok_number() NEED_grok_number NEED_grok_number_GLOBAL ++ grok_numeric_radix() NEED_grok_numeric_radix NEED_grok_numeric_radix_GLOBAL ++ grok_oct() NEED_grok_oct NEED_grok_oct_GLOBAL ++ load_module() NEED_load_module NEED_load_module_GLOBAL ++ my_snprintf() NEED_my_snprintf NEED_my_snprintf_GLOBAL ++ my_sprintf() NEED_my_sprintf NEED_my_sprintf_GLOBAL ++ my_strlcat() NEED_my_strlcat NEED_my_strlcat_GLOBAL ++ my_strlcpy() NEED_my_strlcpy NEED_my_strlcpy_GLOBAL ++ newCONSTSUB() NEED_newCONSTSUB NEED_newCONSTSUB_GLOBAL ++ newRV_noinc() NEED_newRV_noinc NEED_newRV_noinc_GLOBAL ++ newSV_type() NEED_newSV_type NEED_newSV_type_GLOBAL ++ newSVpvn_flags() NEED_newSVpvn_flags NEED_newSVpvn_flags_GLOBAL ++ newSVpvn_share() NEED_newSVpvn_share NEED_newSVpvn_share_GLOBAL ++ pv_display() NEED_pv_display NEED_pv_display_GLOBAL ++ pv_escape() NEED_pv_escape NEED_pv_escape_GLOBAL ++ pv_pretty() NEED_pv_pretty NEED_pv_pretty_GLOBAL ++ sv_2pv_flags() NEED_sv_2pv_flags NEED_sv_2pv_flags_GLOBAL ++ sv_2pvbyte() NEED_sv_2pvbyte NEED_sv_2pvbyte_GLOBAL ++ sv_catpvf_mg() NEED_sv_catpvf_mg NEED_sv_catpvf_mg_GLOBAL ++ sv_catpvf_mg_nocontext() NEED_sv_catpvf_mg_nocontext NEED_sv_catpvf_mg_nocontext_GLOBAL ++ sv_pvn_force_flags() NEED_sv_pvn_force_flags NEED_sv_pvn_force_flags_GLOBAL ++ sv_setpvf_mg() NEED_sv_setpvf_mg NEED_sv_setpvf_mg_GLOBAL ++ sv_setpvf_mg_nocontext() NEED_sv_setpvf_mg_nocontext NEED_sv_setpvf_mg_nocontext_GLOBAL ++ vload_module() NEED_vload_module NEED_vload_module_GLOBAL ++ vnewSVpvf() NEED_vnewSVpvf NEED_vnewSVpvf_GLOBAL ++ warner() NEED_warner NEED_warner_GLOBAL ++ ++To avoid namespace conflicts, you can change the namespace of the ++explicitly exported functions / variables using the C ++macro. Just C<#define> the macro before including C: ++ ++ #define DPPP_NAMESPACE MyOwnNamespace_ ++ #include "ppport.h" ++ ++The default namespace is C. ++ ++=back ++ ++The good thing is that most of the above can be checked by running ++F on your source code. See the next section for ++details. ++ ++=head1 EXAMPLES ++ ++To verify whether F is needed for your module, whether you ++should make any changes to your code, and whether any special defines ++should be used, F can be run as a Perl script to check your ++source code. Simply say: ++ ++ perl ppport.h ++ ++The result will usually be a list of patches suggesting changes ++that should at least be acceptable, if not necessarily the most ++efficient solution, or a fix for all possible problems. ++ ++If you know that your XS module uses features only available in ++newer Perl releases, if you're aware that it uses C++ comments, ++and if you want all suggestions as a single patch file, you could ++use something like this: ++ ++ perl ppport.h --compat-version=5.6.0 --cplusplus --patch=test.diff ++ ++If you only want your code to be scanned without any suggestions ++for changes, use: ++ ++ perl ppport.h --nochanges ++ ++You can specify a different C program or options, using ++the C<--diff> option: ++ ++ perl ppport.h --diff='diff -C 10' ++ ++This would output context diffs with 10 lines of context. ++ ++If you want to create patched copies of your files instead, use: ++ ++ perl ppport.h --copy=.new ++ ++To display portability information for the C function, ++use: ++ ++ perl ppport.h --api-info=newSVpvn ++ ++Since the argument to C<--api-info> can be a regular expression, ++you can use ++ ++ perl ppport.h --api-info=/_nomg$/ ++ ++to display portability information for all C<_nomg> functions or ++ ++ perl ppport.h --api-info=/./ ++ ++to display information for all known API elements. ++ ++=head1 BUGS ++ ++If this version of F is causing failure during ++the compilation of this module, please check if newer versions ++of either this module or C are available on CPAN ++before sending a bug report. ++ ++If F was generated using the latest version of ++C and is causing failure of this module, please ++file a bug report using the CPAN Request Tracker at L. ++ ++Please include the following information: ++ ++=over 4 ++ ++=item 1. ++ ++The complete output from running "perl -V" ++ ++=item 2. ++ ++This file. ++ ++=item 3. ++ ++The name and version of the module you were trying to build. ++ ++=item 4. ++ ++A full log of the build that failed. ++ ++=item 5. ++ ++Any other information that you think could be relevant. ++ ++=back ++ ++For the latest version of this code, please get the C ++module from CPAN. ++ ++=head1 COPYRIGHT ++ ++Version 3.x, Copyright (c) 2004-2013, Marcus Holland-Moritz. ++ ++Version 2.x, Copyright (C) 2001, Paul Marquess. ++ ++Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ++ ++This program is free software; you can redistribute it and/or ++modify it under the same terms as Perl itself. ++ ++=head1 SEE ALSO ++ ++See L. ++ ++=cut ++ ++use strict; ++ ++# Disable broken TRIE-optimization ++BEGIN { eval '${^RE_TRIE_MAXBUF} = -1' if $] >= 5.009004 && $] <= 5.009005 } ++ ++my $VERSION = 3.21; ++ ++my %opt = ( ++ quiet => 0, ++ diag => 1, ++ hints => 1, ++ changes => 1, ++ cplusplus => 0, ++ filter => 1, ++ strip => 0, ++ version => 0, ++); ++ ++my($ppport) = $0 =~ /([\w.]+)$/; ++my $LF = '(?:\r\n|[\r\n])'; # line feed ++my $HS = "[ \t]"; # horizontal whitespace ++ ++# Never use C comments in this file! ++my $ccs = '/'.'*'; ++my $cce = '*'.'/'; ++my $rccs = quotemeta $ccs; ++my $rcce = quotemeta $cce; ++ ++eval { ++ require Getopt::Long; ++ Getopt::Long::GetOptions(\%opt, qw( ++ help quiet diag! filter! hints! changes! cplusplus strip version ++ patch=s copy=s diff=s compat-version=s ++ list-provided list-unsupported api-info=s ++ )) or usage(); ++}; ++ ++if ($@ and grep /^-/, @ARGV) { ++ usage() if "@ARGV" =~ /^--?h(?:elp)?$/; ++ die "Getopt::Long not found. Please don't use any options.\n"; ++} ++ ++if ($opt{version}) { ++ print "This is $0 $VERSION.\n"; ++ exit 0; ++} ++ ++usage() if $opt{help}; ++strip() if $opt{strip}; ++ ++if (exists $opt{'compat-version'}) { ++ my($r,$v,$s) = eval { parse_version($opt{'compat-version'}) }; ++ if ($@) { ++ die "Invalid version number format: '$opt{'compat-version'}'\n"; ++ } ++ die "Only Perl 5 is supported\n" if $r != 5; ++ die "Invalid version number: $opt{'compat-version'}\n" if $v >= 1000 || $s >= 1000; ++ $opt{'compat-version'} = sprintf "%d.%03d%03d", $r, $v, $s; ++} ++else { ++ $opt{'compat-version'} = 5; ++} ++ ++my %API = map { /^(\w+)\|([^|]*)\|([^|]*)\|(\w*)$/ ++ ? ( $1 => { ++ ($2 ? ( base => $2 ) : ()), ++ ($3 ? ( todo => $3 ) : ()), ++ (index($4, 'v') >= 0 ? ( varargs => 1 ) : ()), ++ (index($4, 'p') >= 0 ? ( provided => 1 ) : ()), ++ (index($4, 'n') >= 0 ? ( nothxarg => 1 ) : ()), ++ } ) ++ : die "invalid spec: $_" } qw( ++AvFILLp|5.004050||p ++AvFILL||| ++BhkDISABLE||5.019003| ++BhkENABLE||5.019003| ++BhkENTRY_set||5.019003| ++BhkENTRY||| ++BhkFLAGS||| ++CALL_BLOCK_HOOKS||| ++CLASS|||n ++CPERLscope|5.005000||p ++CX_CURPAD_SAVE||| ++CX_CURPAD_SV||| ++CopFILEAV|5.006000||p ++CopFILEGV_set|5.006000||p ++CopFILEGV|5.006000||p ++CopFILESV|5.006000||p ++CopFILE_set|5.006000||p ++CopFILE|5.006000||p ++CopSTASHPV_set|5.006000||p ++CopSTASHPV|5.006000||p ++CopSTASH_eq|5.006000||p ++CopSTASH_set|5.006000||p ++CopSTASH|5.006000||p ++CopyD|5.009002|5.004050|p ++Copy||5.004050| ++CvPADLIST||5.008001| ++CvSTASH||| ++CvWEAKOUTSIDE||| ++DEFSV_set|5.010001||p ++DEFSV|5.004050||p ++END_EXTERN_C|5.005000||p ++ENTER||| ++ERRSV|5.004050||p ++EXTEND||| ++EXTERN_C|5.005000||p ++F0convert|||n ++FREETMPS||| ++GIMME_V||5.004000|n ++GIMME|||n ++GROK_NUMERIC_RADIX|5.007002||p ++G_ARRAY||| ++G_DISCARD||| ++G_EVAL||| ++G_METHOD|5.006001||p ++G_NOARGS||| ++G_SCALAR||| ++G_VOID||5.004000| ++GetVars||| ++GvAV||| ++GvCV||| ++GvHV||| ++GvSVn|5.009003||p ++GvSV||| ++Gv_AMupdate||5.011000| ++HEf_SVKEY||5.004000| ++HeHASH||5.004000| ++HeKEY||5.004000| ++HeKLEN||5.004000| ++HePV||5.004000| ++HeSVKEY_force||5.004000| ++HeSVKEY_set||5.004000| ++HeSVKEY||5.004000| ++HeUTF8||5.010001| ++HeVAL||5.004000| ++HvENAMELEN||5.015004| ++HvENAMEUTF8||5.015004| ++HvENAME||5.013007| ++HvNAMELEN_get|5.009003||p ++HvNAMELEN||5.015004| ++HvNAMEUTF8||5.015004| ++HvNAME_get|5.009003||p ++HvNAME||| ++INT2PTR|5.006000||p ++IN_LOCALE_COMPILETIME|5.007002||p ++IN_LOCALE_RUNTIME|5.007002||p ++IN_LOCALE|5.007002||p ++IN_PERL_COMPILETIME|5.008001||p ++IS_NUMBER_GREATER_THAN_UV_MAX|5.007002||p ++IS_NUMBER_INFINITY|5.007002||p ++IS_NUMBER_IN_UV|5.007002||p ++IS_NUMBER_NAN|5.007003||p ++IS_NUMBER_NEG|5.007002||p ++IS_NUMBER_NOT_INT|5.007002||p ++IVSIZE|5.006000||p ++IVTYPE|5.006000||p ++IVdf|5.006000||p ++LEAVE||| ++LINKLIST||5.013006| ++LVRET||| ++MARK||| ++MULTICALL||5.019003| ++MY_CXT_CLONE|5.009002||p ++MY_CXT_INIT|5.007003||p ++MY_CXT|5.007003||p ++MoveD|5.009002|5.004050|p ++Move||5.004050| ++NOOP|5.005000||p ++NUM2PTR|5.006000||p ++NVTYPE|5.006000||p ++NVef|5.006001||p ++NVff|5.006001||p ++NVgf|5.006001||p ++Newxc|5.009003||p ++Newxz|5.009003||p ++Newx|5.009003||p ++Nullav||| ++Nullch||| ++Nullcv||| ++Nullhv||| ++Nullsv||| ++OP_CLASS||5.013007| ++OP_DESC||5.007003| ++OP_NAME||5.007003| ++ORIGMARK||| ++PAD_BASE_SV||| ++PAD_CLONE_VARS||| ++PAD_COMPNAME_FLAGS||| ++PAD_COMPNAME_GEN_set||| ++PAD_COMPNAME_GEN||| ++PAD_COMPNAME_OURSTASH||| ++PAD_COMPNAME_PV||| ++PAD_COMPNAME_TYPE||| ++PAD_RESTORE_LOCAL||| ++PAD_SAVE_LOCAL||| ++PAD_SAVE_SETNULLPAD||| ++PAD_SETSV||| ++PAD_SET_CUR_NOSAVE||| ++PAD_SET_CUR||| ++PAD_SVl||| ++PAD_SV||| ++PERLIO_FUNCS_CAST|5.009003||p ++PERLIO_FUNCS_DECL|5.009003||p ++PERL_ABS|5.008001||p ++PERL_BCDVERSION|5.019002||p ++PERL_GCC_BRACE_GROUPS_FORBIDDEN|5.008001||p ++PERL_HASH|5.004000||p ++PERL_INT_MAX|5.004000||p ++PERL_INT_MIN|5.004000||p ++PERL_LONG_MAX|5.004000||p ++PERL_LONG_MIN|5.004000||p ++PERL_MAGIC_arylen|5.007002||p ++PERL_MAGIC_backref|5.007002||p ++PERL_MAGIC_bm|5.007002||p ++PERL_MAGIC_collxfrm|5.007002||p ++PERL_MAGIC_dbfile|5.007002||p ++PERL_MAGIC_dbline|5.007002||p ++PERL_MAGIC_defelem|5.007002||p ++PERL_MAGIC_envelem|5.007002||p ++PERL_MAGIC_env|5.007002||p ++PERL_MAGIC_ext|5.007002||p ++PERL_MAGIC_fm|5.007002||p ++PERL_MAGIC_glob|5.019002||p ++PERL_MAGIC_isaelem|5.007002||p ++PERL_MAGIC_isa|5.007002||p ++PERL_MAGIC_mutex|5.019002||p ++PERL_MAGIC_nkeys|5.007002||p ++PERL_MAGIC_overload_elem|5.019002||p ++PERL_MAGIC_overload_table|5.007002||p ++PERL_MAGIC_overload|5.019002||p ++PERL_MAGIC_pos|5.007002||p ++PERL_MAGIC_qr|5.007002||p ++PERL_MAGIC_regdata|5.007002||p ++PERL_MAGIC_regdatum|5.007002||p ++PERL_MAGIC_regex_global|5.007002||p ++PERL_MAGIC_shared_scalar|5.007003||p ++PERL_MAGIC_shared|5.007003||p ++PERL_MAGIC_sigelem|5.007002||p ++PERL_MAGIC_sig|5.007002||p ++PERL_MAGIC_substr|5.007002||p ++PERL_MAGIC_sv|5.007002||p ++PERL_MAGIC_taint|5.007002||p ++PERL_MAGIC_tiedelem|5.007002||p ++PERL_MAGIC_tiedscalar|5.007002||p ++PERL_MAGIC_tied|5.007002||p ++PERL_MAGIC_utf8|5.008001||p ++PERL_MAGIC_uvar_elem|5.007003||p ++PERL_MAGIC_uvar|5.007002||p ++PERL_MAGIC_vec|5.007002||p ++PERL_MAGIC_vstring|5.008001||p ++PERL_PV_ESCAPE_ALL|5.009004||p ++PERL_PV_ESCAPE_FIRSTCHAR|5.009004||p ++PERL_PV_ESCAPE_NOBACKSLASH|5.009004||p ++PERL_PV_ESCAPE_NOCLEAR|5.009004||p ++PERL_PV_ESCAPE_QUOTE|5.009004||p ++PERL_PV_ESCAPE_RE|5.009005||p ++PERL_PV_ESCAPE_UNI_DETECT|5.009004||p ++PERL_PV_ESCAPE_UNI|5.009004||p ++PERL_PV_PRETTY_DUMP|5.009004||p ++PERL_PV_PRETTY_ELLIPSES|5.010000||p ++PERL_PV_PRETTY_LTGT|5.009004||p ++PERL_PV_PRETTY_NOCLEAR|5.010000||p ++PERL_PV_PRETTY_QUOTE|5.009004||p ++PERL_PV_PRETTY_REGPROP|5.009004||p ++PERL_QUAD_MAX|5.004000||p ++PERL_QUAD_MIN|5.004000||p ++PERL_REVISION|5.006000||p ++PERL_SCAN_ALLOW_UNDERSCORES|5.007003||p ++PERL_SCAN_DISALLOW_PREFIX|5.007003||p ++PERL_SCAN_GREATER_THAN_UV_MAX|5.007003||p ++PERL_SCAN_SILENT_ILLDIGIT|5.008001||p ++PERL_SHORT_MAX|5.004000||p ++PERL_SHORT_MIN|5.004000||p ++PERL_SIGNALS_UNSAFE_FLAG|5.008001||p ++PERL_SUBVERSION|5.006000||p ++PERL_SYS_INIT3||5.010000| ++PERL_SYS_INIT||5.010000| ++PERL_SYS_TERM||5.019003| ++PERL_UCHAR_MAX|5.004000||p ++PERL_UCHAR_MIN|5.004000||p ++PERL_UINT_MAX|5.004000||p ++PERL_UINT_MIN|5.004000||p ++PERL_ULONG_MAX|5.004000||p ++PERL_ULONG_MIN|5.004000||p ++PERL_UNUSED_ARG|5.009003||p ++PERL_UNUSED_CONTEXT|5.009004||p ++PERL_UNUSED_DECL|5.007002||p ++PERL_UNUSED_VAR|5.007002||p ++PERL_UQUAD_MAX|5.004000||p ++PERL_UQUAD_MIN|5.004000||p ++PERL_USE_GCC_BRACE_GROUPS|5.009004||p ++PERL_USHORT_MAX|5.004000||p ++PERL_USHORT_MIN|5.004000||p ++PERL_VERSION|5.006000||p ++PL_DBsignal|5.005000||p ++PL_DBsingle|||pn ++PL_DBsub|||pn ++PL_DBtrace|||pn ++PL_Sv|5.005000||p ++PL_bufend|5.019002||p ++PL_bufptr|5.019002||p ++PL_check||5.006000| ++PL_compiling|5.004050||p ++PL_comppad_name||5.017004| ++PL_comppad||5.008001| ++PL_copline|5.019002||p ++PL_curcop|5.004050||p ++PL_curpad||5.005000| ++PL_curstash|5.004050||p ++PL_debstash|5.004050||p ++PL_defgv|5.004050||p ++PL_diehook|5.004050||p ++PL_dirty|5.004050||p ++PL_dowarn|||pn ++PL_errgv|5.004050||p ++PL_error_count|5.019002||p ++PL_expect|5.019002||p ++PL_hexdigit|5.005000||p ++PL_hints|5.005000||p ++PL_in_my_stash|5.019002||p ++PL_in_my|5.019002||p ++PL_keyword_plugin||5.011002| ++PL_last_in_gv|||n ++PL_laststatval|5.005000||p ++PL_lex_state|5.019002||p ++PL_lex_stuff|5.019002||p ++PL_linestr|5.019002||p ++PL_modglobal||5.005000|n ++PL_na|5.004050||pn ++PL_no_modify|5.006000||p ++PL_ofsgv|||n ++PL_opfreehook||5.011000|n ++PL_parser|5.009005|5.009005|p ++PL_peepp||5.007003|n ++PL_perl_destruct_level|5.004050||p ++PL_perldb|5.004050||p ++PL_ppaddr|5.006000||p ++PL_rpeepp||5.013005|n ++PL_rsfp_filters|5.019002||p ++PL_rsfp|5.019002||p ++PL_rs|||n ++PL_signals|5.008001||p ++PL_stack_base|5.004050||p ++PL_stack_sp|5.004050||p ++PL_statcache|5.005000||p ++PL_stdingv|5.004050||p ++PL_sv_arenaroot|5.004050||p ++PL_sv_no|5.004050||pn ++PL_sv_undef|5.004050||pn ++PL_sv_yes|5.004050||pn ++PL_tainted|5.004050||p ++PL_tainting|5.004050||p ++PL_tokenbuf|5.019002||p ++POP_MULTICALL||5.019003| ++POPi|||n ++POPl|||n ++POPn|||n ++POPpbytex||5.007001|n ++POPpx||5.005030|n ++POPp|||n ++POPs|||n ++PTR2IV|5.006000||p ++PTR2NV|5.006000||p ++PTR2UV|5.006000||p ++PTR2nat|5.009003||p ++PTR2ul|5.007001||p ++PTRV|5.006000||p ++PUSHMARK||| ++PUSH_MULTICALL||5.019003| ++PUSHi||| ++PUSHmortal|5.009002||p ++PUSHn||| ++PUSHp||| ++PUSHs||| ++PUSHu|5.004000||p ++PUTBACK||| ++PadARRAY||5.019003| ++PadMAX||5.019003| ++PadlistARRAY||5.019003| ++PadlistMAX||5.019003| ++PadlistNAMESARRAY||5.019003| ++PadlistNAMESMAX||5.019003| ++PadlistNAMES||5.019003| ++PadlistREFCNT||5.017004| ++PadnameIsOUR||| ++PadnameIsSTATE||| ++PadnameLEN||5.019003| ++PadnameOURSTASH||| ++PadnameOUTER||| ++PadnamePV||5.019003| ++PadnameSV||5.019003| ++PadnameTYPE||| ++PadnameUTF8||5.019003| ++PadnamelistARRAY||5.019003| ++PadnamelistMAX||5.019003| ++PerlIO_clearerr||5.007003| ++PerlIO_close||5.007003| ++PerlIO_context_layers||5.009004| ++PerlIO_eof||5.007003| ++PerlIO_error||5.007003| ++PerlIO_fileno||5.007003| ++PerlIO_fill||5.007003| ++PerlIO_flush||5.007003| ++PerlIO_get_base||5.007003| ++PerlIO_get_bufsiz||5.007003| ++PerlIO_get_cnt||5.007003| ++PerlIO_get_ptr||5.007003| ++PerlIO_read||5.007003| ++PerlIO_seek||5.007003| ++PerlIO_set_cnt||5.007003| ++PerlIO_set_ptrcnt||5.007003| ++PerlIO_setlinebuf||5.007003| ++PerlIO_stderr||5.007003| ++PerlIO_stdin||5.007003| ++PerlIO_stdout||5.007003| ++PerlIO_tell||5.007003| ++PerlIO_unread||5.007003| ++PerlIO_write||5.007003| ++Perl_signbit||5.009005|n ++PoisonFree|5.009004||p ++PoisonNew|5.009004||p ++PoisonWith|5.009004||p ++Poison|5.008000||p ++READ_XDIGIT||5.017006| ++RETVAL|||n ++Renewc||| ++Renew||| ++SAVECLEARSV||| ++SAVECOMPPAD||| ++SAVEPADSV||| ++SAVETMPS||| ++SAVE_DEFSV|5.004050||p ++SPAGAIN||| ++SP||| ++START_EXTERN_C|5.005000||p ++START_MY_CXT|5.007003||p ++STMT_END|||p ++STMT_START|||p ++STR_WITH_LEN|5.009003||p ++ST||| ++SV_CONST_RETURN|5.009003||p ++SV_COW_DROP_PV|5.008001||p ++SV_COW_SHARED_HASH_KEYS|5.009005||p ++SV_GMAGIC|5.007002||p ++SV_HAS_TRAILING_NUL|5.009004||p ++SV_IMMEDIATE_UNREF|5.007001||p ++SV_MUTABLE_RETURN|5.009003||p ++SV_NOSTEAL|5.009002||p ++SV_SMAGIC|5.009003||p ++SV_UTF8_NO_ENCODING|5.008001||p ++SVfARG|5.009005||p ++SVf_UTF8|5.006000||p ++SVf|5.006000||p ++SVt_INVLIST||5.019002| ++SVt_IV||| ++SVt_NULL||| ++SVt_NV||| ++SVt_PVAV||| ++SVt_PVCV||| ++SVt_PVFM||| ++SVt_PVGV||| ++SVt_PVHV||| ++SVt_PVIO||| ++SVt_PVIV||| ++SVt_PVLV||| ++SVt_PVMG||| ++SVt_PVNV||| ++SVt_PV||| ++SVt_REGEXP||5.011000| ++Safefree||| ++Slab_Alloc||| ++Slab_Free||| ++Slab_to_ro||| ++Slab_to_rw||| ++StructCopy||| ++SvCUR_set||| ++SvCUR||| ++SvEND||| ++SvGAMAGIC||5.006001| ++SvGETMAGIC|5.004050||p ++SvGROW||| ++SvIOK_UV||5.006000| ++SvIOK_notUV||5.006000| ++SvIOK_off||| ++SvIOK_only_UV||5.006000| ++SvIOK_only||| ++SvIOK_on||| ++SvIOKp||| ++SvIOK||| ++SvIVX||| ++SvIV_nomg|5.009001||p ++SvIV_set||| ++SvIVx||| ++SvIV||| ++SvIsCOW_shared_hash||5.008003| ++SvIsCOW||5.008003| ++SvLEN_set||| ++SvLEN||| ++SvLOCK||5.007003| ++SvMAGIC_set|5.009003||p ++SvNIOK_off||| ++SvNIOKp||| ++SvNIOK||| ++SvNOK_off||| ++SvNOK_only||| ++SvNOK_on||| ++SvNOKp||| ++SvNOK||| ++SvNVX||| ++SvNV_nomg||5.013002| ++SvNV_set||| ++SvNVx||| ++SvNV||| ++SvOK||| ++SvOOK_offset||5.011000| ++SvOOK||| ++SvPOK_off||| ++SvPOK_only_UTF8||5.006000| ++SvPOK_only||| ++SvPOK_on||| ++SvPOKp||| ++SvPOK||| ++SvPVX_const|5.009003||p ++SvPVX_mutable|5.009003||p ++SvPVX||| ++SvPV_const|5.009003||p ++SvPV_flags_const_nolen|5.009003||p ++SvPV_flags_const|5.009003||p ++SvPV_flags_mutable|5.009003||p ++SvPV_flags|5.007002||p ++SvPV_force_flags_mutable|5.009003||p ++SvPV_force_flags_nolen|5.009003||p ++SvPV_force_flags|5.007002||p ++SvPV_force_mutable|5.009003||p ++SvPV_force_nolen|5.009003||p ++SvPV_force_nomg_nolen|5.009003||p ++SvPV_force_nomg|5.007002||p ++SvPV_force|||p ++SvPV_mutable|5.009003||p ++SvPV_nolen_const|5.009003||p ++SvPV_nolen|5.006000||p ++SvPV_nomg_const_nolen|5.009003||p ++SvPV_nomg_const|5.009003||p ++SvPV_nomg_nolen|5.013007||p ++SvPV_nomg|5.007002||p ++SvPV_renew|5.009003||p ++SvPV_set||| ++SvPVbyte_force||5.009002| ++SvPVbyte_nolen||5.006000| ++SvPVbytex_force||5.006000| ++SvPVbytex||5.006000| ++SvPVbyte|5.006000||p ++SvPVutf8_force||5.006000| ++SvPVutf8_nolen||5.006000| ++SvPVutf8x_force||5.006000| ++SvPVutf8x||5.006000| ++SvPVutf8||5.006000| ++SvPVx||| ++SvPV||| ++SvREFCNT_dec_NN||5.017007| ++SvREFCNT_dec||| ++SvREFCNT_inc_NN|5.009004||p ++SvREFCNT_inc_simple_NN|5.009004||p ++SvREFCNT_inc_simple_void_NN|5.009004||p ++SvREFCNT_inc_simple_void|5.009004||p ++SvREFCNT_inc_simple|5.009004||p ++SvREFCNT_inc_void_NN|5.009004||p ++SvREFCNT_inc_void|5.009004||p ++SvREFCNT_inc|||p ++SvREFCNT||| ++SvROK_off||| ++SvROK_on||| ++SvROK||| ++SvRV_set|5.009003||p ++SvRV||| ++SvRXOK||5.009005| ++SvRX||5.009005| ++SvSETMAGIC||| ++SvSHARED_HASH|5.009003||p ++SvSHARE||5.007003| ++SvSTASH_set|5.009003||p ++SvSTASH||| ++SvSetMagicSV_nosteal||5.004000| ++SvSetMagicSV||5.004000| ++SvSetSV_nosteal||5.004000| ++SvSetSV||| ++SvTAINTED_off||5.004000| ++SvTAINTED_on||5.004000| ++SvTAINTED||5.004000| ++SvTAINT||| ++SvTHINKFIRST||| ++SvTRUE_nomg||5.013006| ++SvTRUE||| ++SvTYPE||| ++SvUNLOCK||5.007003| ++SvUOK|5.007001|5.006000|p ++SvUPGRADE||| ++SvUTF8_off||5.006000| ++SvUTF8_on||5.006000| ++SvUTF8||5.006000| ++SvUVXx|5.004000||p ++SvUVX|5.004000||p ++SvUV_nomg|5.009001||p ++SvUV_set|5.009003||p ++SvUVx|5.004000||p ++SvUV|5.004000||p ++SvVOK||5.008001| ++SvVSTRING_mg|5.009004||p ++THIS|||n ++UNDERBAR|5.009002||p ++UTF8_MAXBYTES|5.009002||p ++UVSIZE|5.006000||p ++UVTYPE|5.006000||p ++UVXf|5.007001||p ++UVof|5.006000||p ++UVuf|5.006000||p ++UVxf|5.006000||p ++WARN_ALL|5.006000||p ++WARN_AMBIGUOUS|5.006000||p ++WARN_ASSERTIONS|5.019002||p ++WARN_BAREWORD|5.006000||p ++WARN_CLOSED|5.006000||p ++WARN_CLOSURE|5.006000||p ++WARN_DEBUGGING|5.006000||p ++WARN_DEPRECATED|5.006000||p ++WARN_DIGIT|5.006000||p ++WARN_EXEC|5.006000||p ++WARN_EXITING|5.006000||p ++WARN_GLOB|5.006000||p ++WARN_INPLACE|5.006000||p ++WARN_INTERNAL|5.006000||p ++WARN_IO|5.006000||p ++WARN_LAYER|5.008000||p ++WARN_MALLOC|5.006000||p ++WARN_MISC|5.006000||p ++WARN_NEWLINE|5.006000||p ++WARN_NUMERIC|5.006000||p ++WARN_ONCE|5.006000||p ++WARN_OVERFLOW|5.006000||p ++WARN_PACK|5.006000||p ++WARN_PARENTHESIS|5.006000||p ++WARN_PIPE|5.006000||p ++WARN_PORTABLE|5.006000||p ++WARN_PRECEDENCE|5.006000||p ++WARN_PRINTF|5.006000||p ++WARN_PROTOTYPE|5.006000||p ++WARN_QW|5.006000||p ++WARN_RECURSION|5.006000||p ++WARN_REDEFINE|5.006000||p ++WARN_REGEXP|5.006000||p ++WARN_RESERVED|5.006000||p ++WARN_SEMICOLON|5.006000||p ++WARN_SEVERE|5.006000||p ++WARN_SIGNAL|5.006000||p ++WARN_SUBSTR|5.006000||p ++WARN_SYNTAX|5.006000||p ++WARN_TAINT|5.006000||p ++WARN_THREADS|5.008000||p ++WARN_UNINITIALIZED|5.006000||p ++WARN_UNOPENED|5.006000||p ++WARN_UNPACK|5.006000||p ++WARN_UNTIE|5.006000||p ++WARN_UTF8|5.006000||p ++WARN_VOID|5.006000||p ++WIDEST_UTYPE|5.015004||p ++XCPT_CATCH|5.009002||p ++XCPT_RETHROW|5.009002|5.007001|p ++XCPT_TRY_END|5.009002|5.004000|p ++XCPT_TRY_START|5.009002|5.004000|p ++XPUSHi||| ++XPUSHmortal|5.009002||p ++XPUSHn||| ++XPUSHp||| ++XPUSHs||| ++XPUSHu|5.004000||p ++XSPROTO|5.010000||p ++XSRETURN_EMPTY||| ++XSRETURN_IV||| ++XSRETURN_NO||| ++XSRETURN_NV||| ++XSRETURN_PV||| ++XSRETURN_UNDEF||| ++XSRETURN_UV|5.008001||p ++XSRETURN_YES||| ++XSRETURN|||p ++XST_mIV||| ++XST_mNO||| ++XST_mNV||| ++XST_mPV||| ++XST_mUNDEF||| ++XST_mUV|5.008001||p ++XST_mYES||| ++XS_APIVERSION_BOOTCHECK||5.013004| ++XS_EXTERNAL||5.019003| ++XS_INTERNAL||5.019003| ++XS_VERSION_BOOTCHECK||| ++XS_VERSION||| ++XSprePUSH|5.006000||p ++XS||| ++XopDISABLE||5.019003| ++XopENABLE||5.019003| ++XopENTRY_set||5.019003| ++XopENTRY||5.019003| ++XopFLAGS||5.013007| ++ZeroD|5.009002||p ++Zero||| ++_aMY_CXT|5.007003||p ++_add_range_to_invlist||| ++_append_range_to_invlist||| ++_core_swash_init||| ++_get_swash_invlist||| ++_invlist_array_init||| ++_invlist_contains_cp||| ++_invlist_contents||| ++_invlist_dump||| ++_invlist_intersection_maybe_complement_2nd||| ++_invlist_intersection||| ++_invlist_invert_prop||| ++_invlist_invert||| ++_invlist_len||| ++_invlist_populate_swatch||| ++_invlist_search||| ++_invlist_subtract||| ++_invlist_union_maybe_complement_2nd||| ++_invlist_union||| ++_is_uni_FOO||5.017008| ++_is_uni_perl_idcont||5.017008| ++_is_uni_perl_idstart||5.017007| ++_is_utf8_FOO||5.017008| ++_is_utf8_mark||5.017008| ++_is_utf8_perl_idcont||5.017008| ++_is_utf8_perl_idstart||5.017007| ++_new_invlist_C_array||| ++_new_invlist||| ++_pMY_CXT|5.007003||p ++_swash_inversion_hash||| ++_swash_to_invlist||| ++_to_fold_latin1||| ++_to_uni_fold_flags||5.013011| ++_to_upper_title_latin1||| ++_to_utf8_fold_flags||5.015006| ++_to_utf8_lower_flags||5.015006| ++_to_utf8_title_flags||5.015006| ++_to_utf8_upper_flags||5.015006| ++aMY_CXT_|5.007003||p ++aMY_CXT|5.007003||p ++aTHXR_|5.019002||p ++aTHXR|5.019002||p ++aTHX_|5.006000||p ++aTHX|5.006000||p ++aassign_common_vars||| ++add_cp_to_invlist||| ++add_data|||n ++add_utf16_textfilter||| ++addmad||| ++adjust_size_and_find_bucket|||n ++adjust_stack_on_leave||| ++alloc_maybe_populate_EXACT||| ++alloccopstash||| ++allocmy||| ++amagic_call||| ++amagic_cmp_locale||| ++amagic_cmp||| ++amagic_deref_call||5.013007| ++amagic_i_ncmp||| ++amagic_is_enabled||| ++amagic_ncmp||| ++anonymise_cv_maybe||| ++any_dup||| ++ao||| ++append_madprops||| ++apply_attrs_my||| ++apply_attrs_string||5.006001| ++apply_attrs||| ++apply||| ++assert_uft8_cache_coherent||| ++atfork_lock||5.007003|n ++atfork_unlock||5.007003|n ++av_arylen_p||5.009003| ++av_clear||| ++av_create_and_push||5.009005| ++av_create_and_unshift_one||5.009005| ++av_delete||5.006000| ++av_exists||5.006000| ++av_extend_guts||| ++av_extend||| ++av_fetch||| ++av_fill||| ++av_iter_p||5.011000| ++av_len||| ++av_make||| ++av_pop||| ++av_push||| ++av_reify||| ++av_shift||| ++av_store||| ++av_tindex||5.017009| ++av_top_index||5.017009| ++av_undef||| ++av_unshift||| ++ax|||n ++bad_type_gv||| ++bad_type_pv||| ++bind_match||| ++block_end||| ++block_gimme||5.004000| ++block_start||| ++blockhook_register||5.013003| ++boolSV|5.004000||p ++boot_core_PerlIO||| ++boot_core_UNIVERSAL||| ++boot_core_mro||| ++bytes_cmp_utf8||5.013007| ++bytes_from_utf8||5.007001| ++bytes_to_uni|||n ++bytes_to_utf8||5.006001| ++call_argv|5.006000||p ++call_atexit||5.006000| ++call_list||5.004000| ++call_method|5.006000||p ++call_pv|5.006000||p ++call_sv|5.006000||p ++caller_cx||5.013005| ++calloc||5.007002|n ++cando||| ++cast_i32||5.006000| ++cast_iv||5.006000| ++cast_ulong||5.006000| ++cast_uv||5.006000| ++check_locale_boundary_crossing||| ++check_type_and_open||| ++check_uni||| ++check_utf8_print||| ++checkcomma||| ++ckWARN|5.006000||p ++ck_entersub_args_core||| ++ck_entersub_args_list||5.013006| ++ck_entersub_args_proto_or_list||5.013006| ++ck_entersub_args_proto||5.013006| ++ck_warner_d||5.011001|v ++ck_warner||5.011001|v ++ckwarn_common||| ++ckwarn_d||5.009003| ++ckwarn||5.009003| ++cl_and|||n ++cl_anything|||n ++cl_init|||n ++cl_is_anything|||n ++cl_or|||n ++clear_placeholders||| ++clone_params_del|||n ++clone_params_new|||n ++closest_cop||| ++compute_EXACTish||| ++convert||| ++cop_fetch_label||5.015001| ++cop_free||| ++cop_hints_2hv||5.013007| ++cop_hints_fetch_pvn||5.013007| ++cop_hints_fetch_pvs||5.013007| ++cop_hints_fetch_pv||5.013007| ++cop_hints_fetch_sv||5.013007| ++cop_store_label||5.015001| ++cophh_2hv||5.013007| ++cophh_copy||5.013007| ++cophh_delete_pvn||5.013007| ++cophh_delete_pvs||5.013007| ++cophh_delete_pv||5.013007| ++cophh_delete_sv||5.013007| ++cophh_fetch_pvn||5.013007| ++cophh_fetch_pvs||5.013007| ++cophh_fetch_pv||5.013007| ++cophh_fetch_sv||5.013007| ++cophh_free||5.013007| ++cophh_new_empty||5.019003| ++cophh_store_pvn||5.013007| ++cophh_store_pvs||5.013007| ++cophh_store_pv||5.013007| ++cophh_store_sv||5.013007| ++core_prototype||| ++core_regclass_swash||| ++coresub_op||| ++could_it_be_a_POSIX_class||| ++cr_textfilter||| ++create_eval_scope||| ++croak_memory_wrap||5.019003|n ++croak_no_mem|||n ++croak_no_modify||5.013003|n ++croak_nocontext|||vn ++croak_popstack|||n ++croak_sv||5.013001| ++croak_xs_usage||5.010001|n ++croak|||v ++csighandler||5.009003|n ++curmad||| ++current_re_engine||| ++curse||| ++custom_op_desc||5.007003| ++custom_op_name||5.007003| ++custom_op_register||5.013007| ++custom_op_xop||5.013007| ++cv_ckproto_len_flags||| ++cv_clone_into||| ++cv_clone||| ++cv_const_sv_or_av||| ++cv_const_sv||5.004000| ++cv_dump||| ++cv_forget_slab||| ++cv_get_call_checker||5.013006| ++cv_set_call_checker||5.013006| ++cv_undef||| ++cvgv_set||| ++cvstash_set||| ++cx_dump||5.005000| ++cx_dup||| ++cxinc||| ++dAXMARK|5.009003||p ++dAX|5.007002||p ++dITEMS|5.007002||p ++dMARK||| ++dMULTICALL||5.009003| ++dMY_CXT_SV|5.007003||p ++dMY_CXT|5.007003||p ++dNOOP|5.006000||p ++dORIGMARK||| ++dSP||| ++dTHR|5.004050||p ++dTHXR|5.019002||p ++dTHXa|5.006000||p ++dTHXoa|5.006000||p ++dTHX|5.006000||p ++dUNDERBAR|5.009002||p ++dVAR|5.009003||p ++dXCPT|5.009002||p ++dXSARGS||| ++dXSI32||| ++dXSTARG|5.006000||p ++deb_curcv||| ++deb_nocontext|||vn ++deb_stack_all||| ++deb_stack_n||| ++debop||5.005000| ++debprofdump||5.005000| ++debprof||| ++debstackptrs||5.007003| ++debstack||5.007003| ++debug_start_match||| ++deb||5.007003|v ++defelem_target||| ++del_sv||| ++delete_eval_scope||| ++delimcpy||5.004000|n ++deprecate_commaless_var_list||| ++despatch_signals||5.007001| ++destroy_matcher||| ++die_nocontext|||vn ++die_sv||5.013001| ++die_unwind||| ++die|||v ++dirp_dup||| ++div128||| ++djSP||| ++do_aexec5||| ++do_aexec||| ++do_aspawn||| ++do_binmode||5.004050| ++do_chomp||| ++do_close||| ++do_delete_local||| ++do_dump_pad||| ++do_eof||| ++do_exec3||| ++do_execfree||| ++do_exec||| ++do_gv_dump||5.006000| ++do_gvgv_dump||5.006000| ++do_hv_dump||5.006000| ++do_ipcctl||| ++do_ipcget||| ++do_join||| ++do_magic_dump||5.006000| ++do_msgrcv||| ++do_msgsnd||| ++do_ncmp||| ++do_oddball||| ++do_op_dump||5.006000| ++do_op_xmldump||| ++do_open9||5.006000| ++do_openn||5.007001| ++do_open||5.004000| ++do_pmop_dump||5.006000| ++do_pmop_xmldump||| ++do_print||| ++do_readline||| ++do_seek||| ++do_semop||| ++do_shmio||| ++do_smartmatch||| ++do_spawn_nowait||| ++do_spawn||| ++do_sprintf||| ++do_sv_dump||5.006000| ++do_sysseek||| ++do_tell||| ++do_trans_complex_utf8||| ++do_trans_complex||| ++do_trans_count_utf8||| ++do_trans_count||| ++do_trans_simple_utf8||| ++do_trans_simple||| ++do_trans||| ++do_vecget||| ++do_vecset||| ++do_vop||| ++docatch||| ++doeval||| ++dofile||| ++dofindlabel||| ++doform||| ++doing_taint||5.008001|n ++dooneliner||| ++doopen_pm||| ++doparseform||| ++dopoptoeval||| ++dopoptogiven||| ++dopoptolabel||| ++dopoptoloop||| ++dopoptosub_at||| ++dopoptowhen||| ++doref||5.009003| ++dounwind||| ++dowantarray||| ++dump_all_perl||| ++dump_all||5.006000| ++dump_eval||5.006000| ++dump_exec_pos||| ++dump_fds||| ++dump_form||5.006000| ++dump_indent||5.006000|v ++dump_mstats||| ++dump_packsubs_perl||| ++dump_packsubs||5.006000| ++dump_sub_perl||| ++dump_sub||5.006000| ++dump_sv_child||| ++dump_trie_interim_list||| ++dump_trie_interim_table||| ++dump_trie||| ++dump_vindent||5.006000| ++dumpuntil||| ++dup_attrlist||| ++emulate_cop_io||| ++eval_pv|5.006000||p ++eval_sv|5.006000||p ++exec_failed||| ++expect_number||| ++fbm_compile||5.005000| ++fbm_instr||5.005000| ++feature_is_enabled||| ++filter_add||| ++filter_del||| ++filter_gets||| ++filter_read||| ++finalize_optree||| ++finalize_op||| ++find_and_forget_pmops||| ++find_array_subscript||| ++find_beginning||| ++find_byclass||| ++find_hash_subscript||| ++find_in_my_stash||| ++find_lexical_cv||| ++find_runcv_where||| ++find_runcv||5.008001| ++find_rundefsv2||| ++find_rundefsvoffset||5.009002| ++find_rundefsv||5.013002| ++find_script||| ++find_uninit_var||| ++first_symbol|||n ++foldEQ_latin1||5.013008|n ++foldEQ_locale||5.013002|n ++foldEQ_utf8_flags||5.013010| ++foldEQ_utf8||5.013002| ++foldEQ||5.013002|n ++fold_constants||| ++forbid_setid||| ++force_ident_maybe_lex||| ++force_ident||| ++force_list||| ++force_next||| ++force_strict_version||| ++force_version||| ++force_word||| ++forget_pmop||| ++form_nocontext|||vn ++form_short_octal_warning||| ++form||5.004000|v ++fp_dup||| ++fprintf_nocontext|||vn ++free_global_struct||| ++free_tied_hv_pool||| ++free_tmps||| ++gen_constant_list||| ++get_and_check_backslash_N_name||| ++get_aux_mg||| ++get_av|5.006000||p ++get_context||5.006000|n ++get_cvn_flags|5.009005||p ++get_cvs|5.011000||p ++get_cv|5.006000||p ++get_db_sub||| ++get_debug_opts||| ++get_hash_seed||| ++get_hv|5.006000||p ++get_invlist_iter_addr||| ++get_invlist_offset_addr||| ++get_invlist_previous_index_addr||| ++get_mstats||| ++get_no_modify||| ++get_num||| ++get_op_descs||5.005000| ++get_op_names||5.005000| ++get_opargs||| ++get_ppaddr||5.006000| ++get_re_arg||| ++get_sv|5.006000||p ++get_vtbl||5.005030| ++getcwd_sv||5.007002| ++getenv_len||| ++glob_2number||| ++glob_assign_glob||| ++glob_assign_ref||| ++gp_dup||| ++gp_free||| ++gp_ref||| ++grok_bin|5.007003||p ++grok_bslash_N||| ++grok_bslash_c||| ++grok_bslash_o||| ++grok_bslash_x||| ++grok_hex|5.007003||p ++grok_number|5.007002||p ++grok_numeric_radix|5.007002||p ++grok_oct|5.007003||p ++group_end||| ++gv_AVadd||| ++gv_HVadd||| ++gv_IOadd||| ++gv_SVadd||| ++gv_add_by_type||5.011000| ++gv_autoload4||5.004000| ++gv_autoload_pvn||5.015004| ++gv_autoload_pv||5.015004| ++gv_autoload_sv||5.015004| ++gv_check||| ++gv_const_sv||5.009003| ++gv_dump||5.006000| ++gv_efullname3||5.004000| ++gv_efullname4||5.006001| ++gv_efullname||| ++gv_ename||| ++gv_fetchfile_flags||5.009005| ++gv_fetchfile||| ++gv_fetchmeth_autoload||5.007003| ++gv_fetchmeth_pv_autoload||5.015004| ++gv_fetchmeth_pvn_autoload||5.015004| ++gv_fetchmeth_pvn||5.015004| ++gv_fetchmeth_pv||5.015004| ++gv_fetchmeth_sv_autoload||5.015004| ++gv_fetchmeth_sv||5.015004| ++gv_fetchmethod_autoload||5.004000| ++gv_fetchmethod_pv_flags||5.015004| ++gv_fetchmethod_pvn_flags||5.015004| ++gv_fetchmethod_sv_flags||5.015004| ++gv_fetchmethod||| ++gv_fetchmeth||| ++gv_fetchpvn_flags|5.009002||p ++gv_fetchpvs|5.009004||p ++gv_fetchpv||| ++gv_fetchsv|5.009002||p ++gv_fullname3||5.004000| ++gv_fullname4||5.006001| ++gv_fullname||| ++gv_handler||5.007001| ++gv_init_pvn||5.015004| ++gv_init_pv||5.015004| ++gv_init_svtype||| ++gv_init_sv||5.015004| ++gv_init||| ++gv_magicalize_isa||| ++gv_name_set||5.009004| ++gv_stashpvn|5.004000||p ++gv_stashpvs|5.009003||p ++gv_stashpv||| ++gv_stashsv||| ++gv_try_downgrade||| ++handle_regex_sets||| ++he_dup||| ++hek_dup||| ++hfree_next_entry||| ++hfreeentries||| ++hsplit||| ++hv_assert||| ++hv_auxinit||| ++hv_backreferences_p||| ++hv_clear_placeholders||5.009001| ++hv_clear||| ++hv_common_key_len||5.010000| ++hv_common||5.010000| ++hv_copy_hints_hv||5.009004| ++hv_delayfree_ent||5.004000| ++hv_delete_common||| ++hv_delete_ent||5.004000| ++hv_delete||| ++hv_eiter_p||5.009003| ++hv_eiter_set||5.009003| ++hv_ename_add||| ++hv_ename_delete||| ++hv_exists_ent||5.004000| ++hv_exists||| ++hv_fetch_ent||5.004000| ++hv_fetchs|5.009003||p ++hv_fetch||| ++hv_fill||5.013002| ++hv_free_ent_ret||| ++hv_free_ent||5.004000| ++hv_iterinit||| ++hv_iterkeysv||5.004000| ++hv_iterkey||| ++hv_iternext_flags||5.008000| ++hv_iternextsv||| ++hv_iternext||| ++hv_iterval||| ++hv_kill_backrefs||| ++hv_ksplit||5.004000| ++hv_magic_check|||n ++hv_magic||| ++hv_name_set||5.009003| ++hv_notallowed||| ++hv_placeholders_get||5.009003| ++hv_placeholders_p||| ++hv_placeholders_set||5.009003| ++hv_rand_set||5.017011| ++hv_riter_p||5.009003| ++hv_riter_set||5.009003| ++hv_scalar||5.009001| ++hv_store_ent||5.004000| ++hv_store_flags||5.008000| ++hv_stores|5.009004||p ++hv_store||| ++hv_undef_flags||| ++hv_undef||| ++ibcmp_locale||5.004000| ++ibcmp_utf8||5.007003| ++ibcmp||| ++incline||| ++incpush_if_exists||| ++incpush_use_sep||| ++incpush||| ++ingroup||| ++init_argv_symbols||| ++init_constants||| ++init_dbargs||| ++init_debugger||| ++init_global_struct||| ++init_i18nl10n||5.006000| ++init_i18nl14n||5.006000| ++init_ids||| ++init_interp||| ++init_main_stash||| ++init_perllib||| ++init_postdump_symbols||| ++init_predump_symbols||| ++init_stacks||5.005000| ++init_tm||5.007002| ++inplace_aassign||| ++instr|||n ++intro_my||| ++intuit_method||| ++intuit_more||| ++invert||| ++invlist_array||| ++invlist_clone||| ++invlist_extend||| ++invlist_highest||| ++invlist_is_iterating||| ++invlist_iterfinish||| ++invlist_iterinit||| ++invlist_iternext||| ++invlist_max||| ++invlist_previous_index||| ++invlist_set_len||| ++invlist_set_previous_index||| ++invlist_trim||| ++invoke_exception_hook||| ++io_close||| ++isALNUMC|5.006000||p ++isALNUM_lazy||| ++isALPHANUMERIC||5.017008| ++isALPHA||| ++isASCII|5.006000|5.006000|p ++isBLANK|5.006001||p ++isCNTRL|5.006000|5.006000|p ++isDIGIT||| ++isFOO_lc||| ++isFOO_utf8_lc||| ++isGRAPH|5.006000||p ++isGV_with_GP|5.009004||p ++isIDCONT||5.017008| ++isIDFIRST_lazy||| ++isIDFIRST||| ++isLOWER||| ++isOCTAL||5.013005| ++isPRINT|5.004000||p ++isPSXSPC|5.006001||p ++isPUNCT|5.006000||p ++isSPACE||| ++isUPPER||| ++isWORDCHAR||5.013006| ++isXDIGIT|5.006000||p ++is_an_int||| ++is_ascii_string||5.011000|n ++is_cur_LC_category_utf8||| ++is_handle_constructor|||n ++is_list_assignment||| ++is_lvalue_sub||5.007001| ++is_uni_alnum_lc||5.006000| ++is_uni_alnumc_lc||5.017007| ++is_uni_alnumc||5.017007| ++is_uni_alnum||5.006000| ++is_uni_alpha_lc||5.006000| ++is_uni_alpha||5.006000| ++is_uni_ascii_lc||5.006000| ++is_uni_ascii||5.006000| ++is_uni_blank_lc||5.017002| ++is_uni_blank||5.017002| ++is_uni_cntrl_lc||5.006000| ++is_uni_cntrl||5.006000| ++is_uni_digit_lc||5.006000| ++is_uni_digit||5.006000| ++is_uni_graph_lc||5.006000| ++is_uni_graph||5.006000| ++is_uni_idfirst_lc||5.006000| ++is_uni_idfirst||5.006000| ++is_uni_lower_lc||5.006000| ++is_uni_lower||5.006000| ++is_uni_print_lc||5.006000| ++is_uni_print||5.006000| ++is_uni_punct_lc||5.006000| ++is_uni_punct||5.006000| ++is_uni_space_lc||5.006000| ++is_uni_space||5.006000| ++is_uni_upper_lc||5.006000| ++is_uni_upper||5.006000| ++is_uni_xdigit_lc||5.006000| ++is_uni_xdigit||5.006000| ++is_utf8_alnumc||5.017007| ++is_utf8_alnum||5.006000| ++is_utf8_alpha||5.006000| ++is_utf8_ascii||5.006000| ++is_utf8_blank||5.017002| ++is_utf8_char_buf||5.015008|n ++is_utf8_char_slow|||n ++is_utf8_char||5.006000|n ++is_utf8_cntrl||5.006000| ++is_utf8_common||| ++is_utf8_digit||5.006000| ++is_utf8_graph||5.006000| ++is_utf8_idcont||5.008000| ++is_utf8_idfirst||5.006000| ++is_utf8_lower||5.006000| ++is_utf8_mark||5.006000| ++is_utf8_perl_space||5.011001| ++is_utf8_perl_word||5.011001| ++is_utf8_posix_digit||5.011001| ++is_utf8_print||5.006000| ++is_utf8_punct||5.006000| ++is_utf8_space||5.006000| ++is_utf8_string_loclen||5.009003|n ++is_utf8_string_loc||5.008001|n ++is_utf8_string||5.006001|n ++is_utf8_upper||5.006000| ++is_utf8_xdigit||5.006000| ++is_utf8_xidcont||5.013010| ++is_utf8_xidfirst||5.013010| ++isa_lookup||| ++items|||n ++ix|||n ++jmaybe||| ++join_exact||| ++keyword_plugin_standard||| ++keyword||| ++leave_scope||| ++lex_bufutf8||5.011002| ++lex_discard_to||5.011002| ++lex_grow_linestr||5.011002| ++lex_next_chunk||5.011002| ++lex_peek_unichar||5.011002| ++lex_read_space||5.011002| ++lex_read_to||5.011002| ++lex_read_unichar||5.011002| ++lex_start||5.009005| ++lex_stuff_pvn||5.011002| ++lex_stuff_pvs||5.013005| ++lex_stuff_pv||5.013006| ++lex_stuff_sv||5.011002| ++lex_unstuff||5.011002| ++listkids||| ++list||| ++load_module_nocontext|||vn ++load_module|5.006000||pv ++localize||| ++looks_like_bool||| ++looks_like_number||| ++lop||| ++mPUSHi|5.009002||p ++mPUSHn|5.009002||p ++mPUSHp|5.009002||p ++mPUSHs|5.010001||p ++mPUSHu|5.009002||p ++mXPUSHi|5.009002||p ++mXPUSHn|5.009002||p ++mXPUSHp|5.009002||p ++mXPUSHs|5.010001||p ++mXPUSHu|5.009002||p ++mad_free||| ++madlex||| ++madparse||| ++magic_clear_all_env||| ++magic_cleararylen_p||| ++magic_clearenv||| ++magic_clearhints||| ++magic_clearhint||| ++magic_clearisa||| ++magic_clearpack||| ++magic_clearsig||| ++magic_copycallchecker||| ++magic_dump||5.006000| ++magic_existspack||| ++magic_freearylen_p||| ++magic_freeovrld||| ++magic_getarylen||| ++magic_getdefelem||| ++magic_getnkeys||| ++magic_getpack||| ++magic_getpos||| ++magic_getsig||| ++magic_getsubstr||| ++magic_gettaint||| ++magic_getuvar||| ++magic_getvec||| ++magic_get||| ++magic_killbackrefs||| ++magic_methcall1||| ++magic_methcall|||v ++magic_methpack||| ++magic_nextpack||| ++magic_regdata_cnt||| ++magic_regdatum_get||| ++magic_regdatum_set||| ++magic_scalarpack||| ++magic_set_all_env||| ++magic_setarylen||| ++magic_setcollxfrm||| ++magic_setdbline||| ++magic_setdefelem||| ++magic_setenv||| ++magic_sethint||| ++magic_setisa||| ++magic_setmglob||| ++magic_setnkeys||| ++magic_setpack||| ++magic_setpos||| ++magic_setregexp||| ++magic_setsig||| ++magic_setsubstr||| ++magic_settaint||| ++magic_setutf8||| ++magic_setuvar||| ++magic_setvec||| ++magic_set||| ++magic_sizepack||| ++magic_wipepack||| ++make_matcher||| ++make_trie_failtable||| ++make_trie||| ++malloc_good_size|||n ++malloced_size|||n ++malloc||5.007002|n ++markstack_grow||| ++matcher_matches_sv||| ++mayberelocate||| ++measure_struct||| ++memEQs|5.009005||p ++memEQ|5.004000||p ++memNEs|5.009005||p ++memNE|5.004000||p ++mem_collxfrm||| ++mem_log_common|||n ++mess_alloc||| ++mess_nocontext|||vn ++mess_sv||5.013001| ++mess||5.006000|v ++method_common||| ++mfree||5.007002|n ++mg_clear||| ++mg_copy||| ++mg_dup||| ++mg_find_mglob||| ++mg_findext||5.013008| ++mg_find||| ++mg_free_type||5.013006| ++mg_free||| ++mg_get||| ++mg_length||5.005000| ++mg_localize||| ++mg_magical||| ++mg_set||| ++mg_size||5.005000| ++mini_mktime||5.007002| ++minus_v||| ++missingterm||| ++mode_from_discipline||| ++modkids||| ++more_bodies||| ++more_sv||| ++moreswitches||| ++mro_clean_isarev||| ++mro_gather_and_rename||| ++mro_get_from_name||5.010001| ++mro_get_linear_isa_dfs||| ++mro_get_linear_isa||5.009005| ++mro_get_private_data||5.010001| ++mro_isa_changed_in||| ++mro_meta_dup||| ++mro_meta_init||| ++mro_method_changed_in||5.009005| ++mro_package_moved||| ++mro_register||5.010001| ++mro_set_mro||5.010001| ++mro_set_private_data||5.010001| ++mul128||| ++mulexp10|||n ++my_atof2||5.007002| ++my_atof||5.006000| ++my_attrs||| ++my_bcopy|||n ++my_bzero|||n ++my_chsize||| ++my_clearenv||| ++my_cxt_index||| ++my_cxt_init||| ++my_dirfd||5.009005| ++my_exit_jump||| ++my_exit||| ++my_failure_exit||5.004000| ++my_fflush_all||5.006000| ++my_fork||5.007003|n ++my_kid||| ++my_lstat_flags||| ++my_lstat||5.019003| ++my_memcmp|||n ++my_memset||5.004000|n ++my_pclose||5.004000| ++my_popen_list||5.007001| ++my_popen||5.004000| ++my_setenv||| ++my_snprintf|5.009004||pvn ++my_socketpair||5.007003|n ++my_sprintf|5.009003||pvn ++my_stat_flags||| ++my_stat||5.019003| ++my_strftime||5.007002| ++my_strlcat|5.009004||pn ++my_strlcpy|5.009004||pn ++my_unexec||| ++my_vsnprintf||5.009004|n ++need_utf8|||n ++newANONATTRSUB||5.006000| ++newANONHASH||| ++newANONLIST||| ++newANONSUB||| ++newASSIGNOP||| ++newATTRSUB_flags||| ++newATTRSUB||5.006000| ++newAVREF||| ++newAV||| ++newBINOP||| ++newCONDOP||| ++newCONSTSUB_flags||5.015006| ++newCONSTSUB|5.004050||p ++newCVREF||| ++newDEFSVOP||| ++newFORM||| ++newFOROP||5.013007| ++newGIVENOP||5.009003| ++newGIVWHENOP||| ++newGP||| ++newGVOP||| ++newGVREF||| ++newGVgen_flags||5.015004| ++newGVgen||| ++newHVREF||| ++newHVhv||5.005000| ++newHV||| ++newIO||| ++newLISTOP||| ++newLOGOP||| ++newLOOPEX||| ++newLOOPOP||| ++newMADPROP||| ++newMADsv||| ++newMYSUB||5.017004| ++newNULLLIST||| ++newOP||| ++newPADOP||| ++newPMOP||| ++newPROG||| ++newPVOP||| ++newRANGE||| ++newRV_inc|5.004000||p ++newRV_noinc|5.004000||p ++newRV||| ++newSLICEOP||| ++newSTATEOP||| ++newSTUB||| ++newSUB||| ++newSVOP||| ++newSVREF||| ++newSV_type|5.009005||p ++newSVhek||5.009003| ++newSViv||| ++newSVnv||| ++newSVpadname||5.017004| ++newSVpv_share||5.013006| ++newSVpvf_nocontext|||vn ++newSVpvf||5.004000|v ++newSVpvn_flags|5.010001||p ++newSVpvn_share|5.007001||p ++newSVpvn_utf8|5.010001||p ++newSVpvn|5.004050||p ++newSVpvs_flags|5.010001||p ++newSVpvs_share|5.009003||p ++newSVpvs|5.009003||p ++newSVpv||| ++newSVrv||| ++newSVsv||| ++newSVuv|5.006000||p ++newSV||| ++newTOKEN||| ++newUNOP||| ++newWHENOP||5.009003| ++newWHILEOP||5.013007| ++newXS_flags||5.009004| ++newXS_len_flags||| ++newXSproto||5.006000| ++newXS||5.006000| ++new_collate||5.006000| ++new_constant||| ++new_ctype||5.006000| ++new_he||| ++new_logop||| ++new_numeric||5.006000| ++new_stackinfo||5.005000| ++new_version||5.009000| ++new_warnings_bitfield||| ++next_symbol||| ++nextargv||| ++nextchar||| ++ninstr|||n ++no_bareword_allowed||| ++no_fh_allowed||| ++no_op||| ++not_a_number||| ++not_incrementable||| ++nothreadhook||5.008000| ++nuke_stacks||| ++num_overflow|||n ++oopsAV||| ++oopsHV||| ++op_append_elem||5.013006| ++op_append_list||5.013006| ++op_clear||| ++op_const_sv||| ++op_contextualize||5.013006| ++op_dump||5.006000| ++op_free||| ++op_getmad_weak||| ++op_getmad||| ++op_integerize||| ++op_linklist||5.013006| ++op_lvalue_flags||| ++op_lvalue||5.013007| ++op_null||5.007002| ++op_prepend_elem||5.013006| ++op_refcnt_dec||| ++op_refcnt_inc||| ++op_refcnt_lock||5.009002| ++op_refcnt_unlock||5.009002| ++op_scope||5.013007| ++op_std_init||| ++op_unscope||| ++op_xmldump||| ++open_script||| ++opslab_force_free||| ++opslab_free_nopad||| ++opslab_free||| ++pMY_CXT_|5.007003||p ++pMY_CXT|5.007003||p ++pTHX_|5.006000||p ++pTHX|5.006000||p ++packWARN|5.007003||p ++pack_cat||5.007003| ++pack_rec||| ++package_version||| ++package||| ++packlist||5.008001| ++pad_add_anon||5.008001| ++pad_add_name_pvn||5.015001| ++pad_add_name_pvs||5.015001| ++pad_add_name_pv||5.015001| ++pad_add_name_sv||5.015001| ++pad_alloc_name||| ++pad_alloc||| ++pad_block_start||| ++pad_check_dup||| ++pad_compname_type||5.009003| ++pad_findlex||| ++pad_findmy_pvn||5.015001| ++pad_findmy_pvs||5.015001| ++pad_findmy_pv||5.015001| ++pad_findmy_sv||5.015001| ++pad_fixup_inner_anons||| ++pad_free||| ++pad_leavemy||| ++pad_new||5.008001| ++pad_peg|||n ++pad_push||| ++pad_reset||| ++pad_setsv||| ++pad_sv||| ++pad_swipe||| ++pad_tidy||5.008001| ++padlist_dup||| ++padlist_store||| ++parse_arithexpr||5.013008| ++parse_barestmt||5.013007| ++parse_block||5.013007| ++parse_body||| ++parse_fullexpr||5.013008| ++parse_fullstmt||5.013005| ++parse_ident||| ++parse_label||5.013007| ++parse_listexpr||5.013008| ++parse_lparen_question_flags||| ++parse_stmtseq||5.013006| ++parse_termexpr||5.013008| ++parse_unicode_opts||| ++parser_dup||| ++parser_free_nexttoke_ops||| ++parser_free||| ++path_is_searchable|||n ++peep||| ++pending_ident||| ++perl_alloc_using|||n ++perl_alloc|||n ++perl_clone_using|||n ++perl_clone|||n ++perl_construct|||n ++perl_destruct||5.007003|n ++perl_free|||n ++perl_parse||5.006000|n ++perl_run|||n ++pidgone||| ++pm_description||| ++pmop_dump||5.006000| ++pmop_xmldump||| ++pmruntime||| ++pmtrans||| ++pop_scope||| ++populate_isa|||v ++pregcomp||5.009005| ++pregexec||| ++pregfree2||5.011000| ++pregfree||| ++prepend_madprops||| ++prescan_version||5.011004| ++printbuf||| ++printf_nocontext|||vn ++process_special_blocks||| ++ptr_hash|||n ++ptr_table_clear||5.009005| ++ptr_table_fetch||5.009005| ++ptr_table_find|||n ++ptr_table_free||5.009005| ++ptr_table_new||5.009005| ++ptr_table_split||5.009005| ++ptr_table_store||5.009005| ++push_scope||| ++put_byte||| ++put_latin1_charclass_innards||| ++pv_display|5.006000||p ++pv_escape|5.009004||p ++pv_pretty|5.009004||p ++pv_uni_display||5.007003| ++qerror||| ++qsortsvu||| ++re_compile||5.009005| ++re_croak2||| ++re_dup_guts||| ++re_intuit_start||5.019001| ++re_intuit_string||5.006000| ++re_op_compile||| ++readpipe_override||| ++realloc||5.007002|n ++reentrant_free||5.019003| ++reentrant_init||5.019003| ++reentrant_retry||5.019003|vn ++reentrant_size||5.019003| ++ref_array_or_hash||| ++refcounted_he_chain_2hv||| ++refcounted_he_fetch_pvn||| ++refcounted_he_fetch_pvs||| ++refcounted_he_fetch_pv||| ++refcounted_he_fetch_sv||| ++refcounted_he_free||| ++refcounted_he_inc||| ++refcounted_he_new_pvn||| ++refcounted_he_new_pvs||| ++refcounted_he_new_pv||| ++refcounted_he_new_sv||| ++refcounted_he_value||| ++refkids||| ++refto||| ++ref||5.019003| ++reg_check_named_buff_matched||| ++reg_named_buff_all||5.009005| ++reg_named_buff_exists||5.009005| ++reg_named_buff_fetch||5.009005| ++reg_named_buff_firstkey||5.009005| ++reg_named_buff_iter||| ++reg_named_buff_nextkey||5.009005| ++reg_named_buff_scalar||5.009005| ++reg_named_buff||| ++reg_node||| ++reg_numbered_buff_fetch||| ++reg_numbered_buff_length||| ++reg_numbered_buff_store||| ++reg_qr_package||| ++reg_recode||| ++reg_scan_name||| ++reg_skipcomment||| ++reg_temp_copy||| ++reganode||| ++regatom||| ++regbranch||| ++regclass_swash||5.009004| ++regclass||| ++regcppop||| ++regcppush||| ++regcurly||| ++regdump_extflags||| ++regdump_intflags||| ++regdump||5.005000| ++regdupe_internal||| ++regexec_flags||5.005000| ++regfree_internal||5.009005| ++reghop3|||n ++reghop4|||n ++reghopmaybe3|||n ++reginclass||| ++reginitcolors||5.006000| ++reginsert||| ++regmatch||| ++regnext||5.005000| ++regpatws|||n ++regpiece||| ++regpposixcc||| ++regprop||| ++regrepeat||| ++regtail_study||| ++regtail||| ++regtry||| ++reguni||| ++regwhite|||n ++reg||| ++repeatcpy|||n ++report_evil_fh||| ++report_redefined_cv||| ++report_uninit||| ++report_wrongway_fh||| ++require_pv||5.006000| ++require_tie_mod||| ++restore_magic||| ++rninstr|||n ++rpeep||| ++rsignal_restore||| ++rsignal_save||| ++rsignal_state||5.004000| ++rsignal||5.004000| ++run_body||| ++run_user_filter||| ++runops_debug||5.005000| ++runops_standard||5.005000| ++rv2cv_op_cv||5.013006| ++rvpv_dup||| ++rxres_free||| ++rxres_restore||| ++rxres_save||| ++safesyscalloc||5.006000|n ++safesysfree||5.006000|n ++safesysmalloc||5.006000|n ++safesysrealloc||5.006000|n ++same_dirent||| ++save_I16||5.004000| ++save_I32||| ++save_I8||5.006000| ++save_adelete||5.011000| ++save_aelem_flags||5.011000| ++save_aelem||5.004050| ++save_alloc||5.006000| ++save_aptr||| ++save_ary||| ++save_bool||5.008001| ++save_clearsv||| ++save_delete||| ++save_destructor_x||5.006000| ++save_destructor||5.006000| ++save_freeop||| ++save_freepv||| ++save_freesv||| ++save_generic_pvref||5.006001| ++save_generic_svref||5.005030| ++save_gp||5.004000| ++save_hash||| ++save_hdelete||5.011000| ++save_hek_flags|||n ++save_helem_flags||5.011000| ++save_helem||5.004050| ++save_hints||5.010001| ++save_hptr||| ++save_int||| ++save_item||| ++save_iv||5.005000| ++save_lines||| ++save_list||| ++save_long||| ++save_magic_flags||| ++save_mortalizesv||5.007001| ++save_nogv||| ++save_op||5.005000| ++save_padsv_and_mortalize||5.010001| ++save_pptr||| ++save_pushi32ptr||5.010001| ++save_pushptri32ptr||| ++save_pushptrptr||5.010001| ++save_pushptr||5.010001| ++save_re_context||5.006000| ++save_scalar_at||| ++save_scalar||| ++save_set_svflags||5.009000| ++save_shared_pvref||5.007003| ++save_sptr||| ++save_svref||| ++save_vptr||5.006000| ++savepvn||| ++savepvs||5.009003| ++savepv||| ++savesharedpvn||5.009005| ++savesharedpvs||5.013006| ++savesharedpv||5.007003| ++savesharedsvpv||5.013006| ++savestack_grow_cnt||5.008001| ++savestack_grow||| ++savesvpv||5.009002| ++sawparens||| ++scalar_mod_type|||n ++scalarboolean||| ++scalarkids||| ++scalarseq||| ++scalarvoid||| ++scalar||| ++scan_bin||5.006000| ++scan_commit||| ++scan_const||| ++scan_formline||| ++scan_heredoc||| ++scan_hex||| ++scan_ident||| ++scan_inputsymbol||| ++scan_num||5.007001| ++scan_oct||| ++scan_pat||| ++scan_str||| ++scan_subst||| ++scan_trans||| ++scan_version||5.009001| ++scan_vstring||5.009005| ++scan_word||| ++screaminstr||5.005000| ++search_const||| ++seed||5.008001| ++sequence_num||| ++set_context||5.006000|n ++set_numeric_local||5.006000| ++set_numeric_radix||5.006000| ++set_numeric_standard||5.006000| ++setdefout||| ++share_hek_flags||| ++share_hek||5.004000| ++si_dup||| ++sighandler|||n ++simplify_sort||| ++skipspace0||| ++skipspace1||| ++skipspace2||| ++skipspace_flags||| ++softref2xv||| ++sortcv_stacked||| ++sortcv_xsub||| ++sortcv||| ++sortsv_flags||5.009003| ++sortsv||5.007003| ++space_join_names_mortal||| ++ss_dup||| ++stack_grow||| ++start_force||| ++start_glob||| ++start_subparse||5.004000| ++stdize_locale||| ++strEQ||| ++strGE||| ++strGT||| ++strLE||| ++strLT||| ++strNE||| ++str_to_version||5.006000| ++strip_return||| ++strnEQ||| ++strnNE||| ++study_chunk||| ++sub_crush_depth||| ++sublex_done||| ++sublex_push||| ++sublex_start||| ++sv_2bool_flags||5.013006| ++sv_2bool||| ++sv_2cv||| ++sv_2io||| ++sv_2iuv_common||| ++sv_2iuv_non_preserve||| ++sv_2iv_flags||5.009001| ++sv_2iv||| ++sv_2mortal||| ++sv_2num||| ++sv_2nv_flags||5.013001| ++sv_2pv_flags|5.007002||p ++sv_2pv_nolen|5.006000||p ++sv_2pvbyte_nolen|5.006000||p ++sv_2pvbyte|5.006000||p ++sv_2pvutf8_nolen||5.006000| ++sv_2pvutf8||5.006000| ++sv_2pv||| ++sv_2uv_flags||5.009001| ++sv_2uv|5.004000||p ++sv_add_arena||| ++sv_add_backref||| ++sv_backoff||| ++sv_bless||| ++sv_cat_decode||5.008001| ++sv_catpv_flags||5.013006| ++sv_catpv_mg|5.004050||p ++sv_catpv_nomg||5.013006| ++sv_catpvf_mg_nocontext|||pvn ++sv_catpvf_mg|5.006000|5.004000|pv ++sv_catpvf_nocontext|||vn ++sv_catpvf||5.004000|v ++sv_catpvn_flags||5.007002| ++sv_catpvn_mg|5.004050||p ++sv_catpvn_nomg|5.007002||p ++sv_catpvn||| ++sv_catpvs_flags||5.013006| ++sv_catpvs_mg||5.013006| ++sv_catpvs_nomg||5.013006| ++sv_catpvs|5.009003||p ++sv_catpv||| ++sv_catsv_flags||5.007002| ++sv_catsv_mg|5.004050||p ++sv_catsv_nomg|5.007002||p ++sv_catsv||| ++sv_catxmlpvn||| ++sv_catxmlpv||| ++sv_catxmlsv||| ++sv_chop||| ++sv_clean_all||| ++sv_clean_objs||| ++sv_clear||| ++sv_cmp_flags||5.013006| ++sv_cmp_locale_flags||5.013006| ++sv_cmp_locale||5.004000| ++sv_cmp||| ++sv_collxfrm_flags||5.013006| ++sv_collxfrm||| ++sv_copypv_flags||5.017002| ++sv_copypv_nomg||5.017002| ++sv_copypv||| ++sv_dec_nomg||5.013002| ++sv_dec||| ++sv_del_backref||| ++sv_derived_from_pvn||5.015004| ++sv_derived_from_pv||5.015004| ++sv_derived_from_sv||5.015004| ++sv_derived_from||5.004000| ++sv_destroyable||5.010000| ++sv_display||| ++sv_does_pvn||5.015004| ++sv_does_pv||5.015004| ++sv_does_sv||5.015004| ++sv_does||5.009004| ++sv_dump||| ++sv_dup_common||| ++sv_dup_inc_multiple||| ++sv_dup_inc||| ++sv_dup||| ++sv_eq_flags||5.013006| ++sv_eq||| ++sv_exp_grow||| ++sv_force_normal_flags||5.007001| ++sv_force_normal||5.006000| ++sv_free2||| ++sv_free_arenas||| ++sv_free||| ++sv_gets||5.004000| ++sv_grow||| ++sv_i_ncmp||| ++sv_inc_nomg||5.013002| ++sv_inc||| ++sv_insert_flags||5.010001| ++sv_insert||| ++sv_isa||| ++sv_isobject||| ++sv_iv||5.005000| ++sv_kill_backrefs||| ++sv_len_utf8_nomg||| ++sv_len_utf8||5.006000| ++sv_len||| ++sv_magic_portable|5.019003|5.004000|p ++sv_magicext_mglob||| ++sv_magicext||5.007003| ++sv_magic||| ++sv_mortalcopy_flags||| ++sv_mortalcopy||| ++sv_ncmp||| ++sv_newmortal||| ++sv_newref||| ++sv_nolocking||5.007003| ++sv_nosharing||5.007003| ++sv_nounlocking||| ++sv_nv||5.005000| ++sv_peek||5.005000| ++sv_pos_b2u_flags||5.019003| ++sv_pos_b2u_midway||| ++sv_pos_b2u||5.006000| ++sv_pos_u2b_cached||| ++sv_pos_u2b_flags||5.011005| ++sv_pos_u2b_forwards|||n ++sv_pos_u2b_midway|||n ++sv_pos_u2b||5.006000| ++sv_pvbyten_force||5.006000| ++sv_pvbyten||5.006000| ++sv_pvbyte||5.006000| ++sv_pvn_force_flags|5.007002||p ++sv_pvn_force||| ++sv_pvn_nomg|5.007003|5.005000|p ++sv_pvn||5.005000| ++sv_pvutf8n_force||5.006000| ++sv_pvutf8n||5.006000| ++sv_pvutf8||5.006000| ++sv_pv||5.006000| ++sv_recode_to_utf8||5.007003| ++sv_reftype||| ++sv_ref||| ++sv_release_COW||| ++sv_replace||| ++sv_report_used||| ++sv_resetpvn||| ++sv_reset||| ++sv_rvweaken||5.006000| ++sv_sethek||| ++sv_setiv_mg|5.004050||p ++sv_setiv||| ++sv_setnv_mg|5.006000||p ++sv_setnv||| ++sv_setpv_mg|5.004050||p ++sv_setpvf_mg_nocontext|||pvn ++sv_setpvf_mg|5.006000|5.004000|pv ++sv_setpvf_nocontext|||vn ++sv_setpvf||5.004000|v ++sv_setpviv_mg||5.008001| ++sv_setpviv||5.008001| ++sv_setpvn_mg|5.004050||p ++sv_setpvn||| ++sv_setpvs_mg||5.013006| ++sv_setpvs|5.009004||p ++sv_setpv||| ++sv_setref_iv||| ++sv_setref_nv||| ++sv_setref_pvn||| ++sv_setref_pvs||5.019003| ++sv_setref_pv||| ++sv_setref_uv||5.007001| ++sv_setsv_cow||| ++sv_setsv_flags||5.007002| ++sv_setsv_mg|5.004050||p ++sv_setsv_nomg|5.007002||p ++sv_setsv||| ++sv_setuv_mg|5.004050||p ++sv_setuv|5.004000||p ++sv_tainted||5.004000| ++sv_taint||5.004000| ++sv_true||5.005000| ++sv_unglob||| ++sv_uni_display||5.007003| ++sv_unmagicext||5.013008| ++sv_unmagic||| ++sv_unref_flags||5.007001| ++sv_unref||| ++sv_untaint||5.004000| ++sv_upgrade||| ++sv_usepvn_flags||5.009004| ++sv_usepvn_mg|5.004050||p ++sv_usepvn||| ++sv_utf8_decode||5.006000| ++sv_utf8_downgrade||5.006000| ++sv_utf8_encode||5.006000| ++sv_utf8_upgrade_flags_grow||5.011000| ++sv_utf8_upgrade_flags||5.007002| ++sv_utf8_upgrade_nomg||5.007002| ++sv_utf8_upgrade||5.007001| ++sv_uv|5.005000||p ++sv_vcatpvf_mg|5.006000|5.004000|p ++sv_vcatpvfn_flags||5.017002| ++sv_vcatpvfn||5.004000| ++sv_vcatpvf|5.006000|5.004000|p ++sv_vsetpvf_mg|5.006000|5.004000|p ++sv_vsetpvfn||5.004000| ++sv_vsetpvf|5.006000|5.004000|p ++sv_xmlpeek||| ++svtype||| ++swallow_bom||| ++swash_fetch||5.007002| ++swash_init||5.006000| ++swatch_get||| ++sys_init3||5.010000|n ++sys_init||5.010000|n ++sys_intern_clear||| ++sys_intern_dup||| ++sys_intern_init||| ++sys_term||5.010000|n ++taint_env||| ++taint_proper||| ++tied_method|||v ++tmps_grow||5.006000| ++toFOLD_uni||5.007003| ++toFOLD_utf8||5.019001| ++toFOLD||5.019001| ++toLOWER_L1||5.019001| ++toLOWER_LC||5.004000| ++toLOWER_uni||5.007003| ++toLOWER_utf8||5.015007| ++toLOWER||| ++toTITLE_uni||5.007003| ++toTITLE_utf8||5.015007| ++toTITLE||5.019001| ++toUPPER_uni||5.007003| ++toUPPER_utf8||5.015007| ++toUPPER||5.004000| ++to_byte_substr||| ++to_lower_latin1||| ++to_uni_fold||5.007003| ++to_uni_lower_lc||5.006000| ++to_uni_lower||5.007003| ++to_uni_title_lc||5.006000| ++to_uni_title||5.007003| ++to_uni_upper_lc||5.006000| ++to_uni_upper||5.007003| ++to_utf8_case||5.007003| ++to_utf8_fold||5.015007| ++to_utf8_lower||5.015007| ++to_utf8_substr||| ++to_utf8_title||5.015007| ++to_utf8_upper||5.015007| ++token_free||| ++token_getmad||| ++tokenize_use||| ++tokeq||| ++tokereport||| ++too_few_arguments_pv||| ++too_few_arguments_sv||| ++too_many_arguments_pv||| ++too_many_arguments_sv||| ++translate_substr_offsets||| ++try_amagic_bin||| ++try_amagic_un||| ++uiv_2buf|||n ++unlnk||| ++unpack_rec||| ++unpack_str||5.007003| ++unpackstring||5.008001| ++unreferenced_to_tmp_stack||| ++unshare_hek_or_pvn||| ++unshare_hek||| ++unsharepvn||5.004000| ++unwind_handler_stack||| ++update_debugger_info||| ++upg_version||5.009005| ++usage||| ++utf16_textfilter||| ++utf16_to_utf8_reversed||5.006001| ++utf16_to_utf8||5.006001| ++utf8_distance||5.006000| ++utf8_hop||5.006000| ++utf8_length||5.007001| ++utf8_mg_len_cache_update||| ++utf8_mg_pos_cache_update||| ++utf8_to_bytes||5.006001| ++utf8_to_uvchr_buf||5.015009| ++utf8_to_uvchr||5.007001| ++utf8_to_uvuni_buf||5.015009| ++utf8_to_uvuni||5.007001| ++utf8n_to_uvchr||| ++utf8n_to_uvuni||5.007001| ++utilize||| ++uvchr_to_utf8_flags||5.007003| ++uvchr_to_utf8||| ++uvuni_to_utf8_flags||5.007003| ++uvuni_to_utf8||5.007001| ++valid_utf8_to_uvchr||| ++valid_utf8_to_uvuni||5.015009| ++validate_proto||| ++validate_suid||| ++varname||| ++vcmp||5.009000| ++vcroak||5.006000| ++vdeb||5.007003| ++vform||5.006000| ++visit||| ++vivify_defelem||| ++vivify_ref||| ++vload_module|5.006000||p ++vmess||5.006000| ++vnewSVpvf|5.006000|5.004000|p ++vnormal||5.009002| ++vnumify||5.009000| ++vstringify||5.009000| ++vverify||5.009003| ++vwarner||5.006000| ++vwarn||5.006000| ++wait4pid||| ++warn_nocontext|||vn ++warn_sv||5.013001| ++warner_nocontext|||vn ++warner|5.006000|5.004000|pv ++warn|||v ++was_lvalue_sub||| ++watch||| ++whichsig_pvn||5.015004| ++whichsig_pv||5.015004| ++whichsig_sv||5.015004| ++whichsig||| ++win32_croak_not_implemented|||n ++with_queued_errors||| ++wrap_op_checker||5.015008| ++write_to_stderr||| ++xmldump_all_perl||| ++xmldump_all||| ++xmldump_attr||| ++xmldump_eval||| ++xmldump_form||| ++xmldump_indent|||v ++xmldump_packsubs_perl||| ++xmldump_packsubs||| ++xmldump_sub_perl||| ++xmldump_sub||| ++xmldump_vindent||| ++xs_apiversion_bootcheck||| ++xs_version_bootcheck||| ++yyerror_pvn||| ++yyerror_pv||| ++yyerror||| ++yylex||| ++yyparse||| ++yyunlex||| ++yywarn||| ++); ++ ++if (exists $opt{'list-unsupported'}) { ++ my $f; ++ for $f (sort { lc $a cmp lc $b } keys %API) { ++ next unless $API{$f}{todo}; ++ print "$f ", '.'x(40-length($f)), " ", format_version($API{$f}{todo}), "\n"; ++ } ++ exit 0; ++} ++ ++# Scan for possible replacement candidates ++ ++my(%replace, %need, %hints, %warnings, %depends); ++my $replace = 0; ++my($hint, $define, $function); ++ ++sub find_api ++{ ++ my $code = shift; ++ $code =~ s{ ++ / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*) ++ | "[^"\\]*(?:\\.[^"\\]*)*" ++ | '[^'\\]*(?:\\.[^'\\]*)*' }{}egsx; ++ grep { exists $API{$_} } $code =~ /(\w+)/mg; ++} ++ ++while () { ++ if ($hint) { ++ my $h = $hint->[0] eq 'Hint' ? \%hints : \%warnings; ++ if (m{^\s*\*\s(.*?)\s*$}) { ++ for (@{$hint->[1]}) { ++ $h->{$_} ||= ''; # suppress warning with older perls ++ $h->{$_} .= "$1\n"; ++ } ++ } ++ else { undef $hint } ++ } ++ ++ $hint = [$1, [split /,?\s+/, $2]] ++ if m{^\s*$rccs\s+(Hint|Warning):\s+(\w+(?:,?\s+\w+)*)\s*$}; ++ ++ if ($define) { ++ if ($define->[1] =~ /\\$/) { ++ $define->[1] .= $_; ++ } ++ else { ++ if (exists $API{$define->[0]} && $define->[1] !~ /^DPPP_\(/) { ++ my @n = find_api($define->[1]); ++ push @{$depends{$define->[0]}}, @n if @n ++ } ++ undef $define; ++ } ++ } ++ ++ $define = [$1, $2] if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(.*)}; ++ ++ if ($function) { ++ if (/^}/) { ++ if (exists $API{$function->[0]}) { ++ my @n = find_api($function->[1]); ++ push @{$depends{$function->[0]}}, @n if @n ++ } ++ undef $function; ++ } ++ else { ++ $function->[1] .= $_; ++ } ++ } ++ ++ $function = [$1, ''] if m{^DPPP_\(my_(\w+)\)}; ++ ++ $replace = $1 if m{^\s*$rccs\s+Replace:\s+(\d+)\s+$rcce\s*$}; ++ $replace{$2} = $1 if $replace and m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+)}; ++ $replace{$2} = $1 if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+).*$rccs\s+Replace\s+$rcce}; ++ $replace{$1} = $2 if m{^\s*$rccs\s+Replace (\w+) with (\w+)\s+$rcce\s*$}; ++ ++ if (m{^\s*$rccs\s+(\w+(\s*,\s*\w+)*)\s+depends\s+on\s+(\w+(\s*,\s*\w+)*)\s+$rcce\s*$}) { ++ my @deps = map { s/\s+//g; $_ } split /,/, $3; ++ my $d; ++ for $d (map { s/\s+//g; $_ } split /,/, $1) { ++ push @{$depends{$d}}, @deps; ++ } ++ } ++ ++ $need{$1} = 1 if m{^#if\s+defined\(NEED_(\w+)(?:_GLOBAL)?\)}; ++} ++ ++for (values %depends) { ++ my %s; ++ $_ = [sort grep !$s{$_}++, @$_]; ++} ++ ++if (exists $opt{'api-info'}) { ++ my $f; ++ my $count = 0; ++ my $match = $opt{'api-info'} =~ m!^/(.*)/$! ? $1 : "^\Q$opt{'api-info'}\E\$"; ++ for $f (sort { lc $a cmp lc $b } keys %API) { ++ next unless $f =~ /$match/; ++ print "\n=== $f ===\n\n"; ++ my $info = 0; ++ if ($API{$f}{base} || $API{$f}{todo}) { ++ my $base = format_version($API{$f}{base} || $API{$f}{todo}); ++ print "Supported at least starting from perl-$base.\n"; ++ $info++; ++ } ++ if ($API{$f}{provided}) { ++ my $todo = $API{$f}{todo} ? format_version($API{$f}{todo}) : "5.003"; ++ print "Support by $ppport provided back to perl-$todo.\n"; ++ print "Support needs to be explicitly requested by NEED_$f.\n" if exists $need{$f}; ++ print "Depends on: ", join(', ', @{$depends{$f}}), ".\n" if exists $depends{$f}; ++ print "\n$hints{$f}" if exists $hints{$f}; ++ print "\nWARNING:\n$warnings{$f}" if exists $warnings{$f}; ++ $info++; ++ } ++ print "No portability information available.\n" unless $info; ++ $count++; ++ } ++ $count or print "Found no API matching '$opt{'api-info'}'."; ++ print "\n"; ++ exit 0; ++} ++ ++if (exists $opt{'list-provided'}) { ++ my $f; ++ for $f (sort { lc $a cmp lc $b } keys %API) { ++ next unless $API{$f}{provided}; ++ my @flags; ++ push @flags, 'explicit' if exists $need{$f}; ++ push @flags, 'depend' if exists $depends{$f}; ++ push @flags, 'hint' if exists $hints{$f}; ++ push @flags, 'warning' if exists $warnings{$f}; ++ my $flags = @flags ? ' ['.join(', ', @flags).']' : ''; ++ print "$f$flags\n"; ++ } ++ exit 0; ++} ++ ++my @files; ++my @srcext = qw( .xs .c .h .cc .cpp -c.inc -xs.inc ); ++my $srcext = join '|', map { quotemeta $_ } @srcext; ++ ++if (@ARGV) { ++ my %seen; ++ for (@ARGV) { ++ if (-e) { ++ if (-f) { ++ push @files, $_ unless $seen{$_}++; ++ } ++ else { warn "'$_' is not a file.\n" } ++ } ++ else { ++ my @new = grep { -f } glob $_ ++ or warn "'$_' does not exist.\n"; ++ push @files, grep { !$seen{$_}++ } @new; ++ } ++ } ++} ++else { ++ eval { ++ require File::Find; ++ File::Find::find(sub { ++ $File::Find::name =~ /($srcext)$/i ++ and push @files, $File::Find::name; ++ }, '.'); ++ }; ++ if ($@) { ++ @files = map { glob "*$_" } @srcext; ++ } ++} ++ ++if (!@ARGV || $opt{filter}) { ++ my(@in, @out); ++ my %xsc = map { /(.*)\.xs$/ ? ("$1.c" => 1, "$1.cc" => 1) : () } @files; ++ for (@files) { ++ my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/($srcext)$/i; ++ push @{ $out ? \@out : \@in }, $_; ++ } ++ if (@ARGV && @out) { ++ warning("Skipping the following files (use --nofilter to avoid this):\n| ", join "\n| ", @out); ++ } ++ @files = @in; ++} ++ ++die "No input files given!\n" unless @files; ++ ++my(%files, %global, %revreplace); ++%revreplace = reverse %replace; ++my $filename; ++my $patch_opened = 0; ++ ++for $filename (@files) { ++ unless (open IN, "<$filename") { ++ warn "Unable to read from $filename: $!\n"; ++ next; ++ } ++ ++ info("Scanning $filename ..."); ++ ++ my $c = do { local $/; }; ++ close IN; ++ ++ my %file = (orig => $c, changes => 0); ++ ++ # Temporarily remove C/XS comments and strings from the code ++ my @ccom; ++ ++ $c =~ s{ ++ ( ^$HS*\#$HS*include\b[^\r\n]+\b(?:\Q$ppport\E|XSUB\.h)\b[^\r\n]* ++ | ^$HS*\#$HS*(?:define|elif|if(?:def)?)\b[^\r\n]* ) ++ | ( ^$HS*\#[^\r\n]* ++ | "[^"\\]*(?:\\.[^"\\]*)*" ++ | '[^'\\]*(?:\\.[^'\\]*)*' ++ | / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]* ) ) ++ }{ defined $2 and push @ccom, $2; ++ defined $1 ? $1 : "$ccs$#ccom$cce" }mgsex; ++ ++ $file{ccom} = \@ccom; ++ $file{code} = $c; ++ $file{has_inc_ppport} = $c =~ /^$HS*#$HS*include[^\r\n]+\b\Q$ppport\E\b/m; ++ ++ my $func; ++ ++ for $func (keys %API) { ++ my $match = $func; ++ $match .= "|$revreplace{$func}" if exists $revreplace{$func}; ++ if ($c =~ /\b(?:Perl_)?($match)\b/) { ++ $file{uses_replace}{$1}++ if exists $revreplace{$func} && $1 eq $revreplace{$func}; ++ $file{uses_Perl}{$func}++ if $c =~ /\bPerl_$func\b/; ++ if (exists $API{$func}{provided}) { ++ $file{uses_provided}{$func}++; ++ if (!exists $API{$func}{base} || $API{$func}{base} > $opt{'compat-version'}) { ++ $file{uses}{$func}++; ++ my @deps = rec_depend($func); ++ if (@deps) { ++ $file{uses_deps}{$func} = \@deps; ++ for (@deps) { ++ $file{uses}{$_} = 0 unless exists $file{uses}{$_}; ++ } ++ } ++ for ($func, @deps) { ++ $file{needs}{$_} = 'static' if exists $need{$_}; ++ } ++ } ++ } ++ if (exists $API{$func}{todo} && $API{$func}{todo} > $opt{'compat-version'}) { ++ if ($c =~ /\b$func\b/) { ++ $file{uses_todo}{$func}++; ++ } ++ } ++ } ++ } ++ ++ while ($c =~ /^$HS*#$HS*define$HS+(NEED_(\w+?)(_GLOBAL)?)\b/mg) { ++ if (exists $need{$2}) { ++ $file{defined $3 ? 'needed_global' : 'needed_static'}{$2}++; ++ } ++ else { warning("Possibly wrong #define $1 in $filename") } ++ } ++ ++ for (qw(uses needs uses_todo needed_global needed_static)) { ++ for $func (keys %{$file{$_}}) { ++ push @{$global{$_}{$func}}, $filename; ++ } ++ } ++ ++ $files{$filename} = \%file; ++} ++ ++# Globally resolve NEED_'s ++my $need; ++for $need (keys %{$global{needs}}) { ++ if (@{$global{needs}{$need}} > 1) { ++ my @targets = @{$global{needs}{$need}}; ++ my @t = grep $files{$_}{needed_global}{$need}, @targets; ++ @targets = @t if @t; ++ @t = grep /\.xs$/i, @targets; ++ @targets = @t if @t; ++ my $target = shift @targets; ++ $files{$target}{needs}{$need} = 'global'; ++ for (@{$global{needs}{$need}}) { ++ $files{$_}{needs}{$need} = 'extern' if $_ ne $target; ++ } ++ } ++} ++ ++for $filename (@files) { ++ exists $files{$filename} or next; ++ ++ info("=== Analyzing $filename ==="); ++ ++ my %file = %{$files{$filename}}; ++ my $func; ++ my $c = $file{code}; ++ my $warnings = 0; ++ ++ for $func (sort keys %{$file{uses_Perl}}) { ++ if ($API{$func}{varargs}) { ++ unless ($API{$func}{nothxarg}) { ++ my $changes = ($c =~ s{\b(Perl_$func\s*\(\s*)(?!aTHX_?)(\)|[^\s)]*\))} ++ { $1 . ($2 eq ')' ? 'aTHX' : 'aTHX_ ') . $2 }ge); ++ if ($changes) { ++ warning("Doesn't pass interpreter argument aTHX to Perl_$func"); ++ $file{changes} += $changes; ++ } ++ } ++ } ++ else { ++ warning("Uses Perl_$func instead of $func"); ++ $file{changes} += ($c =~ s{\bPerl_$func(\s*)\((\s*aTHX_?)?\s*} ++ {$func$1(}g); ++ } ++ } ++ ++ for $func (sort keys %{$file{uses_replace}}) { ++ warning("Uses $func instead of $replace{$func}"); ++ $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g); ++ } ++ ++ for $func (sort keys %{$file{uses_provided}}) { ++ if ($file{uses}{$func}) { ++ if (exists $file{uses_deps}{$func}) { ++ diag("Uses $func, which depends on ", join(', ', @{$file{uses_deps}{$func}})); ++ } ++ else { ++ diag("Uses $func"); ++ } ++ } ++ $warnings += hint($func); ++ } ++ ++ unless ($opt{quiet}) { ++ for $func (sort keys %{$file{uses_todo}}) { ++ print "*** WARNING: Uses $func, which may not be portable below perl ", ++ format_version($API{$func}{todo}), ", even with '$ppport'\n"; ++ $warnings++; ++ } ++ } ++ ++ for $func (sort keys %{$file{needed_static}}) { ++ my $message = ''; ++ if (not exists $file{uses}{$func}) { ++ $message = "No need to define NEED_$func if $func is never used"; ++ } ++ elsif (exists $file{needs}{$func} && $file{needs}{$func} ne 'static') { ++ $message = "No need to define NEED_$func when already needed globally"; ++ } ++ if ($message) { ++ diag($message); ++ $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_$func\b.*$LF//mg); ++ } ++ } ++ ++ for $func (sort keys %{$file{needed_global}}) { ++ my $message = ''; ++ if (not exists $global{uses}{$func}) { ++ $message = "No need to define NEED_${func}_GLOBAL if $func is never used"; ++ } ++ elsif (exists $file{needs}{$func}) { ++ if ($file{needs}{$func} eq 'extern') { ++ $message = "No need to define NEED_${func}_GLOBAL when already needed globally"; ++ } ++ elsif ($file{needs}{$func} eq 'static') { ++ $message = "No need to define NEED_${func}_GLOBAL when only used in this file"; ++ } ++ } ++ if ($message) { ++ diag($message); ++ $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_${func}_GLOBAL\b.*$LF//mg); ++ } ++ } ++ ++ $file{needs_inc_ppport} = keys %{$file{uses}}; ++ ++ if ($file{needs_inc_ppport}) { ++ my $pp = ''; ++ ++ for $func (sort keys %{$file{needs}}) { ++ my $type = $file{needs}{$func}; ++ next if $type eq 'extern'; ++ my $suffix = $type eq 'global' ? '_GLOBAL' : ''; ++ unless (exists $file{"needed_$type"}{$func}) { ++ if ($type eq 'global') { ++ diag("Files [@{$global{needs}{$func}}] need $func, adding global request"); ++ } ++ else { ++ diag("File needs $func, adding static request"); ++ } ++ $pp .= "#define NEED_$func$suffix\n"; ++ } ++ } ++ ++ if ($pp && ($c =~ s/^(?=$HS*#$HS*define$HS+NEED_\w+)/$pp/m)) { ++ $pp = ''; ++ $file{changes}++; ++ } ++ ++ unless ($file{has_inc_ppport}) { ++ diag("Needs to include '$ppport'"); ++ $pp .= qq(#include "$ppport"\n) ++ } ++ ++ if ($pp) { ++ $file{changes} += ($c =~ s/^($HS*#$HS*define$HS+NEED_\w+.*?)^/$1$pp/ms) ++ || ($c =~ s/^(?=$HS*#$HS*include.*\Q$ppport\E)/$pp/m) ++ || ($c =~ s/^($HS*#$HS*include.*XSUB.*\s*?)^/$1$pp/m) ++ || ($c =~ s/^/$pp/); ++ } ++ } ++ else { ++ if ($file{has_inc_ppport}) { ++ diag("No need to include '$ppport'"); ++ $file{changes} += ($c =~ s/^$HS*?#$HS*include.*\Q$ppport\E.*?$LF//m); ++ } ++ } ++ ++ # put back in our C comments ++ my $ix; ++ my $cppc = 0; ++ my @ccom = @{$file{ccom}}; ++ for $ix (0 .. $#ccom) { ++ if (!$opt{cplusplus} && $ccom[$ix] =~ s!^//!!) { ++ $cppc++; ++ $file{changes} += $c =~ s/$rccs$ix$rcce/$ccs$ccom[$ix] $cce/; ++ } ++ else { ++ $c =~ s/$rccs$ix$rcce/$ccom[$ix]/; ++ } ++ } ++ ++ if ($cppc) { ++ my $s = $cppc != 1 ? 's' : ''; ++ warning("Uses $cppc C++ style comment$s, which is not portable"); ++ } ++ ++ my $s = $warnings != 1 ? 's' : ''; ++ my $warn = $warnings ? " ($warnings warning$s)" : ''; ++ info("Analysis completed$warn"); ++ ++ if ($file{changes}) { ++ if (exists $opt{copy}) { ++ my $newfile = "$filename$opt{copy}"; ++ if (-e $newfile) { ++ error("'$newfile' already exists, refusing to write copy of '$filename'"); ++ } ++ else { ++ local *F; ++ if (open F, ">$newfile") { ++ info("Writing copy of '$filename' with changes to '$newfile'"); ++ print F $c; ++ close F; ++ } ++ else { ++ error("Cannot open '$newfile' for writing: $!"); ++ } ++ } ++ } ++ elsif (exists $opt{patch} || $opt{changes}) { ++ if (exists $opt{patch}) { ++ unless ($patch_opened) { ++ if (open PATCH, ">$opt{patch}") { ++ $patch_opened = 1; ++ } ++ else { ++ error("Cannot open '$opt{patch}' for writing: $!"); ++ delete $opt{patch}; ++ $opt{changes} = 1; ++ goto fallback; ++ } ++ } ++ mydiff(\*PATCH, $filename, $c); ++ } ++ else { ++fallback: ++ info("Suggested changes:"); ++ mydiff(\*STDOUT, $filename, $c); ++ } ++ } ++ else { ++ my $s = $file{changes} == 1 ? '' : 's'; ++ info("$file{changes} potentially required change$s detected"); ++ } ++ } ++ else { ++ info("Looks good"); ++ } ++} ++ ++close PATCH if $patch_opened; ++ ++exit 0; ++ ++ ++sub try_use { eval "use @_;"; return $@ eq '' } ++ ++sub mydiff ++{ ++ local *F = shift; ++ my($file, $str) = @_; ++ my $diff; ++ ++ if (exists $opt{diff}) { ++ $diff = run_diff($opt{diff}, $file, $str); ++ } ++ ++ if (!defined $diff and try_use('Text::Diff')) { ++ $diff = Text::Diff::diff($file, \$str, { STYLE => 'Unified' }); ++ $diff = <
$tmp") { ++ print F $str; ++ close F; ++ ++ if (open F, "$prog $file $tmp |") { ++ while () { ++ s/\Q$tmp\E/$file.patched/; ++ $diff .= $_; ++ } ++ close F; ++ unlink $tmp; ++ return $diff; ++ } ++ ++ unlink $tmp; ++ } ++ else { ++ error("Cannot open '$tmp' for writing: $!"); ++ } ++ ++ return undef; ++} ++ ++sub rec_depend ++{ ++ my($func, $seen) = @_; ++ return () unless exists $depends{$func}; ++ $seen = {%{$seen||{}}}; ++ return () if $seen->{$func}++; ++ my %s; ++ grep !$s{$_}++, map { ($_, rec_depend($_, $seen)) } @{$depends{$func}}; ++} ++ ++sub parse_version ++{ ++ my $ver = shift; ++ ++ if ($ver =~ /^(\d+)\.(\d+)\.(\d+)$/) { ++ return ($1, $2, $3); ++ } ++ elsif ($ver !~ /^\d+\.[\d_]+$/) { ++ die "cannot parse version '$ver'\n"; ++ } ++ ++ $ver =~ s/_//g; ++ $ver =~ s/$/000000/; ++ ++ my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/; ++ ++ $v = int $v; ++ $s = int $s; ++ ++ if ($r < 5 || ($r == 5 && $v < 6)) { ++ if ($s % 10) { ++ die "cannot parse version '$ver'\n"; ++ } ++ } ++ ++ return ($r, $v, $s); ++} ++ ++sub format_version ++{ ++ my $ver = shift; ++ ++ $ver =~ s/$/000000/; ++ my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/; ++ ++ $v = int $v; ++ $s = int $s; ++ ++ if ($r < 5 || ($r == 5 && $v < 6)) { ++ if ($s % 10) { ++ die "invalid version '$ver'\n"; ++ } ++ $s /= 10; ++ ++ $ver = sprintf "%d.%03d", $r, $v; ++ $s > 0 and $ver .= sprintf "_%02d", $s; ++ ++ return $ver; ++ } ++ ++ return sprintf "%d.%d.%d", $r, $v, $s; ++} ++ ++sub info ++{ ++ $opt{quiet} and return; ++ print @_, "\n"; ++} ++ ++sub diag ++{ ++ $opt{quiet} and return; ++ $opt{diag} and print @_, "\n"; ++} ++ ++sub warning ++{ ++ $opt{quiet} and return; ++ print "*** ", @_, "\n"; ++} ++ ++sub error ++{ ++ print "*** ERROR: ", @_, "\n"; ++} ++ ++my %given_hints; ++my %given_warnings; ++sub hint ++{ ++ $opt{quiet} and return; ++ my $func = shift; ++ my $rv = 0; ++ if (exists $warnings{$func} && !$given_warnings{$func}++) { ++ my $warn = $warnings{$func}; ++ $warn =~ s!^!*** !mg; ++ print "*** WARNING: $func\n", $warn; ++ $rv++; ++ } ++ if ($opt{hints} && exists $hints{$func} && !$given_hints{$func}++) { ++ my $hint = $hints{$func}; ++ $hint =~ s/^/ /mg; ++ print " --- hint for $func ---\n", $hint; ++ } ++ $rv; ++} ++ ++sub usage ++{ ++ my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms; ++ my %M = ( 'I' => '*' ); ++ $usage =~ s/^\s*perl\s+\S+/$^X $0/; ++ $usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g; ++ ++ print < }; ++ my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms; ++ $copy =~ s/^(?=\S+)/ /gms; ++ $self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms; ++ $self =~ s/^SKIP.*(?=^__DATA__)/SKIP ++if (\@ARGV && \$ARGV[0] eq '--unstrip') { ++ eval { require Devel::PPPort }; ++ \$@ and die "Cannot require Devel::PPPort, please install.\\n"; ++ if (eval \$Devel::PPPort::VERSION < $VERSION) { ++ die "$0 was originally generated with Devel::PPPort $VERSION.\\n" ++ . "Your Devel::PPPort is only version \$Devel::PPPort::VERSION.\\n" ++ . "Please install a newer version, or --unstrip will not work.\\n"; ++ } ++ Devel::PPPort::WriteFile(\$0); ++ exit 0; ++} ++print <$0" or die "cannot strip $0: $!\n"; ++ print OUT "$pl$c\n"; ++ ++ exit 0; ++} ++ ++__DATA__ ++*/ ++ ++#ifndef _P_P_PORTABILITY_H_ ++#define _P_P_PORTABILITY_H_ ++ ++#ifndef DPPP_NAMESPACE ++# define DPPP_NAMESPACE DPPP_ ++#endif ++ ++#define DPPP_CAT2(x,y) CAT2(x,y) ++#define DPPP_(name) DPPP_CAT2(DPPP_NAMESPACE, name) ++ ++#ifndef PERL_REVISION ++# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION)) ++# define PERL_PATCHLEVEL_H_IMPLICIT ++# include ++# endif ++# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL))) ++# include ++# endif ++# ifndef PERL_REVISION ++# define PERL_REVISION (5) ++ /* Replace: 1 */ ++# define PERL_VERSION PATCHLEVEL ++# define PERL_SUBVERSION SUBVERSION ++ /* Replace PERL_PATCHLEVEL with PERL_VERSION */ ++ /* Replace: 0 */ ++# endif ++#endif ++ ++#define _dpppDEC2BCD(dec) ((((dec)/100)<<8)|((((dec)%100)/10)<<4)|((dec)%10)) ++#define PERL_BCDVERSION ((_dpppDEC2BCD(PERL_REVISION)<<24)|(_dpppDEC2BCD(PERL_VERSION)<<12)|_dpppDEC2BCD(PERL_SUBVERSION)) ++ ++/* It is very unlikely that anyone will try to use this with Perl 6 ++ (or greater), but who knows. ++ */ ++#if PERL_REVISION != 5 ++# error ppport.h only works with Perl version 5 ++#endif /* PERL_REVISION != 5 */ ++#ifndef dTHR ++# define dTHR dNOOP ++#endif ++#ifndef dTHX ++# define dTHX dNOOP ++#endif ++ ++#ifndef dTHXa ++# define dTHXa(x) dNOOP ++#endif ++#ifndef pTHX ++# define pTHX void ++#endif ++ ++#ifndef pTHX_ ++# define pTHX_ ++#endif ++ ++#ifndef aTHX ++# define aTHX ++#endif ++ ++#ifndef aTHX_ ++# define aTHX_ ++#endif ++ ++#if (PERL_BCDVERSION < 0x5006000) ++# ifdef USE_THREADS ++# define aTHXR thr ++# define aTHXR_ thr, ++# else ++# define aTHXR ++# define aTHXR_ ++# endif ++# define dTHXR dTHR ++#else ++# define aTHXR aTHX ++# define aTHXR_ aTHX_ ++# define dTHXR dTHX ++#endif ++#ifndef dTHXoa ++# define dTHXoa(x) dTHXa(x) ++#endif ++ ++#ifdef I_LIMITS ++# include ++#endif ++ ++#ifndef PERL_UCHAR_MIN ++# define PERL_UCHAR_MIN ((unsigned char)0) ++#endif ++ ++#ifndef PERL_UCHAR_MAX ++# ifdef UCHAR_MAX ++# define PERL_UCHAR_MAX ((unsigned char)UCHAR_MAX) ++# else ++# ifdef MAXUCHAR ++# define PERL_UCHAR_MAX ((unsigned char)MAXUCHAR) ++# else ++# define PERL_UCHAR_MAX ((unsigned char)~(unsigned)0) ++# endif ++# endif ++#endif ++ ++#ifndef PERL_USHORT_MIN ++# define PERL_USHORT_MIN ((unsigned short)0) ++#endif ++ ++#ifndef PERL_USHORT_MAX ++# ifdef USHORT_MAX ++# define PERL_USHORT_MAX ((unsigned short)USHORT_MAX) ++# else ++# ifdef MAXUSHORT ++# define PERL_USHORT_MAX ((unsigned short)MAXUSHORT) ++# else ++# ifdef USHRT_MAX ++# define PERL_USHORT_MAX ((unsigned short)USHRT_MAX) ++# else ++# define PERL_USHORT_MAX ((unsigned short)~(unsigned)0) ++# endif ++# endif ++# endif ++#endif ++ ++#ifndef PERL_SHORT_MAX ++# ifdef SHORT_MAX ++# define PERL_SHORT_MAX ((short)SHORT_MAX) ++# else ++# ifdef MAXSHORT /* Often used in */ ++# define PERL_SHORT_MAX ((short)MAXSHORT) ++# else ++# ifdef SHRT_MAX ++# define PERL_SHORT_MAX ((short)SHRT_MAX) ++# else ++# define PERL_SHORT_MAX ((short) (PERL_USHORT_MAX >> 1)) ++# endif ++# endif ++# endif ++#endif ++ ++#ifndef PERL_SHORT_MIN ++# ifdef SHORT_MIN ++# define PERL_SHORT_MIN ((short)SHORT_MIN) ++# else ++# ifdef MINSHORT ++# define PERL_SHORT_MIN ((short)MINSHORT) ++# else ++# ifdef SHRT_MIN ++# define PERL_SHORT_MIN ((short)SHRT_MIN) ++# else ++# define PERL_SHORT_MIN (-PERL_SHORT_MAX - ((3 & -1) == 3)) ++# endif ++# endif ++# endif ++#endif ++ ++#ifndef PERL_UINT_MAX ++# ifdef UINT_MAX ++# define PERL_UINT_MAX ((unsigned int)UINT_MAX) ++# else ++# ifdef MAXUINT ++# define PERL_UINT_MAX ((unsigned int)MAXUINT) ++# else ++# define PERL_UINT_MAX (~(unsigned int)0) ++# endif ++# endif ++#endif ++ ++#ifndef PERL_UINT_MIN ++# define PERL_UINT_MIN ((unsigned int)0) ++#endif ++ ++#ifndef PERL_INT_MAX ++# ifdef INT_MAX ++# define PERL_INT_MAX ((int)INT_MAX) ++# else ++# ifdef MAXINT /* Often used in */ ++# define PERL_INT_MAX ((int)MAXINT) ++# else ++# define PERL_INT_MAX ((int)(PERL_UINT_MAX >> 1)) ++# endif ++# endif ++#endif ++ ++#ifndef PERL_INT_MIN ++# ifdef INT_MIN ++# define PERL_INT_MIN ((int)INT_MIN) ++# else ++# ifdef MININT ++# define PERL_INT_MIN ((int)MININT) ++# else ++# define PERL_INT_MIN (-PERL_INT_MAX - ((3 & -1) == 3)) ++# endif ++# endif ++#endif ++ ++#ifndef PERL_ULONG_MAX ++# ifdef ULONG_MAX ++# define PERL_ULONG_MAX ((unsigned long)ULONG_MAX) ++# else ++# ifdef MAXULONG ++# define PERL_ULONG_MAX ((unsigned long)MAXULONG) ++# else ++# define PERL_ULONG_MAX (~(unsigned long)0) ++# endif ++# endif ++#endif ++ ++#ifndef PERL_ULONG_MIN ++# define PERL_ULONG_MIN ((unsigned long)0L) ++#endif ++ ++#ifndef PERL_LONG_MAX ++# ifdef LONG_MAX ++# define PERL_LONG_MAX ((long)LONG_MAX) ++# else ++# ifdef MAXLONG ++# define PERL_LONG_MAX ((long)MAXLONG) ++# else ++# define PERL_LONG_MAX ((long) (PERL_ULONG_MAX >> 1)) ++# endif ++# endif ++#endif ++ ++#ifndef PERL_LONG_MIN ++# ifdef LONG_MIN ++# define PERL_LONG_MIN ((long)LONG_MIN) ++# else ++# ifdef MINLONG ++# define PERL_LONG_MIN ((long)MINLONG) ++# else ++# define PERL_LONG_MIN (-PERL_LONG_MAX - ((3 & -1) == 3)) ++# endif ++# endif ++#endif ++ ++#if defined(HAS_QUAD) && (defined(convex) || defined(uts)) ++# ifndef PERL_UQUAD_MAX ++# ifdef ULONGLONG_MAX ++# define PERL_UQUAD_MAX ((unsigned long long)ULONGLONG_MAX) ++# else ++# ifdef MAXULONGLONG ++# define PERL_UQUAD_MAX ((unsigned long long)MAXULONGLONG) ++# else ++# define PERL_UQUAD_MAX (~(unsigned long long)0) ++# endif ++# endif ++# endif ++ ++# ifndef PERL_UQUAD_MIN ++# define PERL_UQUAD_MIN ((unsigned long long)0L) ++# endif ++ ++# ifndef PERL_QUAD_MAX ++# ifdef LONGLONG_MAX ++# define PERL_QUAD_MAX ((long long)LONGLONG_MAX) ++# else ++# ifdef MAXLONGLONG ++# define PERL_QUAD_MAX ((long long)MAXLONGLONG) ++# else ++# define PERL_QUAD_MAX ((long long) (PERL_UQUAD_MAX >> 1)) ++# endif ++# endif ++# endif ++ ++# ifndef PERL_QUAD_MIN ++# ifdef LONGLONG_MIN ++# define PERL_QUAD_MIN ((long long)LONGLONG_MIN) ++# else ++# ifdef MINLONGLONG ++# define PERL_QUAD_MIN ((long long)MINLONGLONG) ++# else ++# define PERL_QUAD_MIN (-PERL_QUAD_MAX - ((3 & -1) == 3)) ++# endif ++# endif ++# endif ++#endif ++ ++/* This is based on code from 5.003 perl.h */ ++#ifdef HAS_QUAD ++# ifdef cray ++#ifndef IVTYPE ++# define IVTYPE int ++#endif ++ ++#ifndef IV_MIN ++# define IV_MIN PERL_INT_MIN ++#endif ++ ++#ifndef IV_MAX ++# define IV_MAX PERL_INT_MAX ++#endif ++ ++#ifndef UV_MIN ++# define UV_MIN PERL_UINT_MIN ++#endif ++ ++#ifndef UV_MAX ++# define UV_MAX PERL_UINT_MAX ++#endif ++ ++# ifdef INTSIZE ++#ifndef IVSIZE ++# define IVSIZE INTSIZE ++#endif ++ ++# endif ++# else ++# if defined(convex) || defined(uts) ++#ifndef IVTYPE ++# define IVTYPE long long ++#endif ++ ++#ifndef IV_MIN ++# define IV_MIN PERL_QUAD_MIN ++#endif ++ ++#ifndef IV_MAX ++# define IV_MAX PERL_QUAD_MAX ++#endif ++ ++#ifndef UV_MIN ++# define UV_MIN PERL_UQUAD_MIN ++#endif ++ ++#ifndef UV_MAX ++# define UV_MAX PERL_UQUAD_MAX ++#endif ++ ++# ifdef LONGLONGSIZE ++#ifndef IVSIZE ++# define IVSIZE LONGLONGSIZE ++#endif ++ ++# endif ++# else ++#ifndef IVTYPE ++# define IVTYPE long ++#endif ++ ++#ifndef IV_MIN ++# define IV_MIN PERL_LONG_MIN ++#endif ++ ++#ifndef IV_MAX ++# define IV_MAX PERL_LONG_MAX ++#endif ++ ++#ifndef UV_MIN ++# define UV_MIN PERL_ULONG_MIN ++#endif ++ ++#ifndef UV_MAX ++# define UV_MAX PERL_ULONG_MAX ++#endif ++ ++# ifdef LONGSIZE ++#ifndef IVSIZE ++# define IVSIZE LONGSIZE ++#endif ++ ++# endif ++# endif ++# endif ++#ifndef IVSIZE ++# define IVSIZE 8 ++#endif ++ ++#ifndef LONGSIZE ++# define LONGSIZE 8 ++#endif ++ ++#ifndef PERL_QUAD_MIN ++# define PERL_QUAD_MIN IV_MIN ++#endif ++ ++#ifndef PERL_QUAD_MAX ++# define PERL_QUAD_MAX IV_MAX ++#endif ++ ++#ifndef PERL_UQUAD_MIN ++# define PERL_UQUAD_MIN UV_MIN ++#endif ++ ++#ifndef PERL_UQUAD_MAX ++# define PERL_UQUAD_MAX UV_MAX ++#endif ++ ++#else ++#ifndef IVTYPE ++# define IVTYPE long ++#endif ++ ++#ifndef LONGSIZE ++# define LONGSIZE 4 ++#endif ++ ++#ifndef IV_MIN ++# define IV_MIN PERL_LONG_MIN ++#endif ++ ++#ifndef IV_MAX ++# define IV_MAX PERL_LONG_MAX ++#endif ++ ++#ifndef UV_MIN ++# define UV_MIN PERL_ULONG_MIN ++#endif ++ ++#ifndef UV_MAX ++# define UV_MAX PERL_ULONG_MAX ++#endif ++ ++#endif ++ ++#ifndef IVSIZE ++# ifdef LONGSIZE ++# define IVSIZE LONGSIZE ++# else ++# define IVSIZE 4 /* A bold guess, but the best we can make. */ ++# endif ++#endif ++#ifndef UVTYPE ++# define UVTYPE unsigned IVTYPE ++#endif ++ ++#ifndef UVSIZE ++# define UVSIZE IVSIZE ++#endif ++#ifndef sv_setuv ++# define sv_setuv(sv, uv) \ ++ STMT_START { \ ++ UV TeMpUv = uv; \ ++ if (TeMpUv <= IV_MAX) \ ++ sv_setiv(sv, TeMpUv); \ ++ else \ ++ sv_setnv(sv, (double)TeMpUv); \ ++ } STMT_END ++#endif ++#ifndef newSVuv ++# define newSVuv(uv) ((uv) <= IV_MAX ? newSViv((IV)uv) : newSVnv((NV)uv)) ++#endif ++#ifndef sv_2uv ++# define sv_2uv(sv) ((PL_Sv = (sv)), (UV) (SvNOK(PL_Sv) ? SvNV(PL_Sv) : sv_2nv(PL_Sv))) ++#endif ++ ++#ifndef SvUVX ++# define SvUVX(sv) ((UV)SvIVX(sv)) ++#endif ++ ++#ifndef SvUVXx ++# define SvUVXx(sv) SvUVX(sv) ++#endif ++ ++#ifndef SvUV ++# define SvUV(sv) (SvIOK(sv) ? SvUVX(sv) : sv_2uv(sv)) ++#endif ++ ++#ifndef SvUVx ++# define SvUVx(sv) ((PL_Sv = (sv)), SvUV(PL_Sv)) ++#endif ++ ++/* Hint: sv_uv ++ * Always use the SvUVx() macro instead of sv_uv(). ++ */ ++#ifndef sv_uv ++# define sv_uv(sv) SvUVx(sv) ++#endif ++ ++#if !defined(SvUOK) && defined(SvIOK_UV) ++# define SvUOK(sv) SvIOK_UV(sv) ++#endif ++#ifndef XST_mUV ++# define XST_mUV(i,v) (ST(i) = sv_2mortal(newSVuv(v)) ) ++#endif ++ ++#ifndef XSRETURN_UV ++# define XSRETURN_UV(v) STMT_START { XST_mUV(0,v); XSRETURN(1); } STMT_END ++#endif ++#ifndef PUSHu ++# define PUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); PUSHTARG; } STMT_END ++#endif ++ ++#ifndef XPUSHu ++# define XPUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); XPUSHTARG; } STMT_END ++#endif ++ ++#ifdef HAS_MEMCMP ++#ifndef memNE ++# define memNE(s1,s2,l) (memcmp(s1,s2,l)) ++#endif ++ ++#ifndef memEQ ++# define memEQ(s1,s2,l) (!memcmp(s1,s2,l)) ++#endif ++ ++#else ++#ifndef memNE ++# define memNE(s1,s2,l) (bcmp(s1,s2,l)) ++#endif ++ ++#ifndef memEQ ++# define memEQ(s1,s2,l) (!bcmp(s1,s2,l)) ++#endif ++ ++#endif ++#ifndef memEQs ++# define memEQs(s1, l, s2) \ ++ (sizeof(s2)-1 == l && memEQ(s1, (s2 ""), (sizeof(s2)-1))) ++#endif ++ ++#ifndef memNEs ++# define memNEs(s1, l, s2) !memEQs(s1, l, s2) ++#endif ++#ifndef MoveD ++# define MoveD(s,d,n,t) memmove((char*)(d),(char*)(s), (n) * sizeof(t)) ++#endif ++ ++#ifndef CopyD ++# define CopyD(s,d,n,t) memcpy((char*)(d),(char*)(s), (n) * sizeof(t)) ++#endif ++ ++#ifdef HAS_MEMSET ++#ifndef ZeroD ++# define ZeroD(d,n,t) memzero((char*)(d), (n) * sizeof(t)) ++#endif ++ ++#else ++#ifndef ZeroD ++# define ZeroD(d,n,t) ((void)memzero((char*)(d), (n) * sizeof(t)), d) ++#endif ++ ++#endif ++#ifndef PoisonWith ++# define PoisonWith(d,n,t,b) (void)memset((char*)(d), (U8)(b), (n) * sizeof(t)) ++#endif ++ ++#ifndef PoisonNew ++# define PoisonNew(d,n,t) PoisonWith(d,n,t,0xAB) ++#endif ++ ++#ifndef PoisonFree ++# define PoisonFree(d,n,t) PoisonWith(d,n,t,0xEF) ++#endif ++ ++#ifndef Poison ++# define Poison(d,n,t) PoisonFree(d,n,t) ++#endif ++#ifndef Newx ++# define Newx(v,n,t) New(0,v,n,t) ++#endif ++ ++#ifndef Newxc ++# define Newxc(v,n,t,c) Newc(0,v,n,t,c) ++#endif ++ ++#ifndef Newxz ++# define Newxz(v,n,t) Newz(0,v,n,t) ++#endif ++ ++#ifndef PERL_UNUSED_DECL ++# ifdef HASATTRIBUTE ++# if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER) ++# define PERL_UNUSED_DECL ++# else ++# define PERL_UNUSED_DECL __attribute__((unused)) ++# endif ++# else ++# define PERL_UNUSED_DECL ++# endif ++#endif ++ ++#ifndef PERL_UNUSED_ARG ++# if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */ ++# include ++# define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x)) ++# else ++# define PERL_UNUSED_ARG(x) ((void)x) ++# endif ++#endif ++ ++#ifndef PERL_UNUSED_VAR ++# define PERL_UNUSED_VAR(x) ((void)x) ++#endif ++ ++#ifndef PERL_UNUSED_CONTEXT ++# ifdef USE_ITHREADS ++# define PERL_UNUSED_CONTEXT PERL_UNUSED_ARG(my_perl) ++# else ++# define PERL_UNUSED_CONTEXT ++# endif ++#endif ++#ifndef NOOP ++# define NOOP /*EMPTY*/(void)0 ++#endif ++ ++#ifndef dNOOP ++# define dNOOP extern int /*@unused@*/ Perl___notused PERL_UNUSED_DECL ++#endif ++ ++#ifndef NVTYPE ++# if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) ++# define NVTYPE long double ++# else ++# define NVTYPE double ++# endif ++typedef NVTYPE NV; ++#endif ++ ++#ifndef INT2PTR ++# if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) ++# define PTRV UV ++# define INT2PTR(any,d) (any)(d) ++# else ++# if PTRSIZE == LONGSIZE ++# define PTRV unsigned long ++# else ++# define PTRV unsigned ++# endif ++# define INT2PTR(any,d) (any)(PTRV)(d) ++# endif ++#endif ++ ++#ifndef PTR2ul ++# if PTRSIZE == LONGSIZE ++# define PTR2ul(p) (unsigned long)(p) ++# else ++# define PTR2ul(p) INT2PTR(unsigned long,p) ++# endif ++#endif ++#ifndef PTR2nat ++# define PTR2nat(p) (PTRV)(p) ++#endif ++ ++#ifndef NUM2PTR ++# define NUM2PTR(any,d) (any)PTR2nat(d) ++#endif ++ ++#ifndef PTR2IV ++# define PTR2IV(p) INT2PTR(IV,p) ++#endif ++ ++#ifndef PTR2UV ++# define PTR2UV(p) INT2PTR(UV,p) ++#endif ++ ++#ifndef PTR2NV ++# define PTR2NV(p) NUM2PTR(NV,p) ++#endif ++ ++#undef START_EXTERN_C ++#undef END_EXTERN_C ++#undef EXTERN_C ++#ifdef __cplusplus ++# define START_EXTERN_C extern "C" { ++# define END_EXTERN_C } ++# define EXTERN_C extern "C" ++#else ++# define START_EXTERN_C ++# define END_EXTERN_C ++# define EXTERN_C extern ++#endif ++ ++#if defined(PERL_GCC_PEDANTIC) ++# ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN ++# define PERL_GCC_BRACE_GROUPS_FORBIDDEN ++# endif ++#endif ++ ++#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus) ++# ifndef PERL_USE_GCC_BRACE_GROUPS ++# define PERL_USE_GCC_BRACE_GROUPS ++# endif ++#endif ++ ++#undef STMT_START ++#undef STMT_END ++#ifdef PERL_USE_GCC_BRACE_GROUPS ++# define STMT_START (void)( /* gcc supports ``({ STATEMENTS; })'' */ ++# define STMT_END ) ++#else ++# if defined(VOIDFLAGS) && (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__) ++# define STMT_START if (1) ++# define STMT_END else (void)0 ++# else ++# define STMT_START do ++# define STMT_END while (0) ++# endif ++#endif ++#ifndef boolSV ++# define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no) ++#endif ++ ++/* DEFSV appears first in 5.004_56 */ ++#ifndef DEFSV ++# define DEFSV GvSV(PL_defgv) ++#endif ++ ++#ifndef SAVE_DEFSV ++# define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv)) ++#endif ++ ++#ifndef DEFSV_set ++# define DEFSV_set(sv) (DEFSV = (sv)) ++#endif ++ ++/* Older perls (<=5.003) lack AvFILLp */ ++#ifndef AvFILLp ++# define AvFILLp AvFILL ++#endif ++#ifndef ERRSV ++# define ERRSV get_sv("@",FALSE) ++#endif ++ ++/* Hint: gv_stashpvn ++ * This function's backport doesn't support the length parameter, but ++ * rather ignores it. Portability can only be ensured if the length ++ * parameter is used for speed reasons, but the length can always be ++ * correctly computed from the string argument. ++ */ ++#ifndef gv_stashpvn ++# define gv_stashpvn(str,len,create) gv_stashpv(str,create) ++#endif ++ ++/* Replace: 1 */ ++#ifndef get_cv ++# define get_cv perl_get_cv ++#endif ++ ++#ifndef get_sv ++# define get_sv perl_get_sv ++#endif ++ ++#ifndef get_av ++# define get_av perl_get_av ++#endif ++ ++#ifndef get_hv ++# define get_hv perl_get_hv ++#endif ++ ++/* Replace: 0 */ ++#ifndef dUNDERBAR ++# define dUNDERBAR dNOOP ++#endif ++ ++#ifndef UNDERBAR ++# define UNDERBAR DEFSV ++#endif ++#ifndef dAX ++# define dAX I32 ax = MARK - PL_stack_base + 1 ++#endif ++ ++#ifndef dITEMS ++# define dITEMS I32 items = SP - MARK ++#endif ++#ifndef dXSTARG ++# define dXSTARG SV * targ = sv_newmortal() ++#endif ++#ifndef dAXMARK ++# define dAXMARK I32 ax = POPMARK; \ ++ register SV ** const mark = PL_stack_base + ax++ ++#endif ++#ifndef XSprePUSH ++# define XSprePUSH (sp = PL_stack_base + ax - 1) ++#endif ++ ++#if (PERL_BCDVERSION < 0x5005000) ++# undef XSRETURN ++# define XSRETURN(off) \ ++ STMT_START { \ ++ PL_stack_sp = PL_stack_base + ax + ((off) - 1); \ ++ return; \ ++ } STMT_END ++#endif ++#ifndef XSPROTO ++# define XSPROTO(name) void name(pTHX_ CV* cv) ++#endif ++ ++#ifndef SVfARG ++# define SVfARG(p) ((void*)(p)) ++#endif ++#ifndef PERL_ABS ++# define PERL_ABS(x) ((x) < 0 ? -(x) : (x)) ++#endif ++#ifndef dVAR ++# define dVAR dNOOP ++#endif ++#ifndef SVf ++# define SVf "_" ++#endif ++#ifndef UTF8_MAXBYTES ++# define UTF8_MAXBYTES UTF8_MAXLEN ++#endif ++#ifndef CPERLscope ++# define CPERLscope(x) x ++#endif ++#ifndef PERL_HASH ++# define PERL_HASH(hash,str,len) \ ++ STMT_START { \ ++ const char *s_PeRlHaSh = str; \ ++ I32 i_PeRlHaSh = len; \ ++ U32 hash_PeRlHaSh = 0; \ ++ while (i_PeRlHaSh--) \ ++ hash_PeRlHaSh = hash_PeRlHaSh * 33 + *s_PeRlHaSh++; \ ++ (hash) = hash_PeRlHaSh; \ ++ } STMT_END ++#endif ++ ++#ifndef PERLIO_FUNCS_DECL ++# ifdef PERLIO_FUNCS_CONST ++# define PERLIO_FUNCS_DECL(funcs) const PerlIO_funcs funcs ++# define PERLIO_FUNCS_CAST(funcs) (PerlIO_funcs*)(funcs) ++# else ++# define PERLIO_FUNCS_DECL(funcs) PerlIO_funcs funcs ++# define PERLIO_FUNCS_CAST(funcs) (funcs) ++# endif ++#endif ++ ++/* provide these typedefs for older perls */ ++#if (PERL_BCDVERSION < 0x5009003) ++ ++# ifdef ARGSproto ++typedef OP* (CPERLscope(*Perl_ppaddr_t))(ARGSproto); ++# else ++typedef OP* (CPERLscope(*Perl_ppaddr_t))(pTHX); ++# endif ++ ++typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*); ++ ++#endif ++#ifndef isPSXSPC ++# define isPSXSPC(c) (isSPACE(c) || (c) == '\v') ++#endif ++ ++#ifndef isBLANK ++# define isBLANK(c) ((c) == ' ' || (c) == '\t') ++#endif ++ ++#ifdef EBCDIC ++#ifndef isALNUMC ++# define isALNUMC(c) isalnum(c) ++#endif ++ ++#ifndef isASCII ++# define isASCII(c) isascii(c) ++#endif ++ ++#ifndef isCNTRL ++# define isCNTRL(c) iscntrl(c) ++#endif ++ ++#ifndef isGRAPH ++# define isGRAPH(c) isgraph(c) ++#endif ++ ++#ifndef isPRINT ++# define isPRINT(c) isprint(c) ++#endif ++ ++#ifndef isPUNCT ++# define isPUNCT(c) ispunct(c) ++#endif ++ ++#ifndef isXDIGIT ++# define isXDIGIT(c) isxdigit(c) ++#endif ++ ++#else ++# if (PERL_BCDVERSION < 0x5010000) ++/* Hint: isPRINT ++ * The implementation in older perl versions includes all of the ++ * isSPACE() characters, which is wrong. The version provided by ++ * Devel::PPPort always overrides a present buggy version. ++ */ ++# undef isPRINT ++# endif ++ ++#ifdef HAS_QUAD ++# define WIDEST_UTYPE U64TYPE ++#else ++# define WIDEST_UTYPE U32 ++#endif ++#ifndef isALNUMC ++# define isALNUMC(c) (isALPHA(c) || isDIGIT(c)) ++#endif ++ ++#ifndef isASCII ++# define isASCII(c) ((WIDEST_UTYPE) (c) <= 127) ++#endif ++ ++#ifndef isCNTRL ++# define isCNTRL(c) ((WIDEST_UTYPE) (c) < ' ' || (c) == 127) ++#endif ++ ++#ifndef isGRAPH ++# define isGRAPH(c) (isALNUM(c) || isPUNCT(c)) ++#endif ++ ++#ifndef isPRINT ++# define isPRINT(c) (((c) >= 32 && (c) < 127)) ++#endif ++ ++#ifndef isPUNCT ++# define isPUNCT(c) (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <= 64) || ((c) >= 91 && (c) <= 96) || ((c) >= 123 && (c) <= 126)) ++#endif ++ ++#ifndef isXDIGIT ++# define isXDIGIT(c) (isDIGIT(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) ++#endif ++ ++#endif ++ ++#ifndef PERL_SIGNALS_UNSAFE_FLAG ++ ++#define PERL_SIGNALS_UNSAFE_FLAG 0x0001 ++ ++#if (PERL_BCDVERSION < 0x5008000) ++# define D_PPP_PERL_SIGNALS_INIT PERL_SIGNALS_UNSAFE_FLAG ++#else ++# define D_PPP_PERL_SIGNALS_INIT 0 ++#endif ++ ++#if defined(NEED_PL_signals) ++static U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT; ++#elif defined(NEED_PL_signals_GLOBAL) ++U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT; ++#else ++extern U32 DPPP_(my_PL_signals); ++#endif ++#define PL_signals DPPP_(my_PL_signals) ++ ++#endif ++ ++/* Hint: PL_ppaddr ++ * Calling an op via PL_ppaddr requires passing a context argument ++ * for threaded builds. Since the context argument is different for ++ * 5.005 perls, you can use aTHXR (supplied by ppport.h), which will ++ * automatically be defined as the correct argument. ++ */ ++ ++#if (PERL_BCDVERSION <= 0x5005005) ++/* Replace: 1 */ ++# define PL_ppaddr ppaddr ++# define PL_no_modify no_modify ++/* Replace: 0 */ ++#endif ++ ++#if (PERL_BCDVERSION <= 0x5004005) ++/* Replace: 1 */ ++# define PL_DBsignal DBsignal ++# define PL_DBsingle DBsingle ++# define PL_DBsub DBsub ++# define PL_DBtrace DBtrace ++# define PL_Sv Sv ++# define PL_bufend bufend ++# define PL_bufptr bufptr ++# define PL_compiling compiling ++# define PL_copline copline ++# define PL_curcop curcop ++# define PL_curstash curstash ++# define PL_debstash debstash ++# define PL_defgv defgv ++# define PL_diehook diehook ++# define PL_dirty dirty ++# define PL_dowarn dowarn ++# define PL_errgv errgv ++# define PL_error_count error_count ++# define PL_expect expect ++# define PL_hexdigit hexdigit ++# define PL_hints hints ++# define PL_in_my in_my ++# define PL_laststatval laststatval ++# define PL_lex_state lex_state ++# define PL_lex_stuff lex_stuff ++# define PL_linestr linestr ++# define PL_na na ++# define PL_perl_destruct_level perl_destruct_level ++# define PL_perldb perldb ++# define PL_rsfp_filters rsfp_filters ++# define PL_rsfp rsfp ++# define PL_stack_base stack_base ++# define PL_stack_sp stack_sp ++# define PL_statcache statcache ++# define PL_stdingv stdingv ++# define PL_sv_arenaroot sv_arenaroot ++# define PL_sv_no sv_no ++# define PL_sv_undef sv_undef ++# define PL_sv_yes sv_yes ++# define PL_tainted tainted ++# define PL_tainting tainting ++# define PL_tokenbuf tokenbuf ++/* Replace: 0 */ ++#endif ++ ++/* Warning: PL_parser ++ * For perl versions earlier than 5.9.5, this is an always ++ * non-NULL dummy. Also, it cannot be dereferenced. Don't ++ * use it if you can avoid is and unless you absolutely know ++ * what you're doing. ++ * If you always check that PL_parser is non-NULL, you can ++ * define DPPP_PL_parser_NO_DUMMY to avoid the creation of ++ * a dummy parser structure. ++ */ ++ ++#if (PERL_BCDVERSION >= 0x5009005) ++# ifdef DPPP_PL_parser_NO_DUMMY ++# define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \ ++ (croak("panic: PL_parser == NULL in %s:%d", \ ++ __FILE__, __LINE__), (yy_parser *) NULL))->var) ++# else ++# ifdef DPPP_PL_parser_NO_DUMMY_WARNING ++# define D_PPP_parser_dummy_warning(var) ++# else ++# define D_PPP_parser_dummy_warning(var) \ ++ warn("warning: dummy PL_" #var " used in %s:%d", __FILE__, __LINE__), ++# endif ++# define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \ ++ (D_PPP_parser_dummy_warning(var) &DPPP_(dummy_PL_parser)))->var) ++#if defined(NEED_PL_parser) ++static yy_parser DPPP_(dummy_PL_parser); ++#elif defined(NEED_PL_parser_GLOBAL) ++yy_parser DPPP_(dummy_PL_parser); ++#else ++extern yy_parser DPPP_(dummy_PL_parser); ++#endif ++ ++# endif ++ ++/* PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters, PL_linestr, PL_bufptr, PL_bufend, PL_lex_state, PL_lex_stuff, PL_tokenbuf depends on PL_parser */ ++/* Warning: PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters, PL_linestr, PL_bufptr, PL_bufend, PL_lex_state, PL_lex_stuff, PL_tokenbuf ++ * Do not use this variable unless you know exactly what you're ++ * doint. It is internal to the perl parser and may change or even ++ * be removed in the future. As of perl 5.9.5, you have to check ++ * for (PL_parser != NULL) for this variable to have any effect. ++ * An always non-NULL PL_parser dummy is provided for earlier ++ * perl versions. ++ * If PL_parser is NULL when you try to access this variable, a ++ * dummy is being accessed instead and a warning is issued unless ++ * you define DPPP_PL_parser_NO_DUMMY_WARNING. ++ * If DPPP_PL_parser_NO_DUMMY is defined, the code trying to access ++ * this variable will croak with a panic message. ++ */ ++ ++# define PL_expect D_PPP_my_PL_parser_var(expect) ++# define PL_copline D_PPP_my_PL_parser_var(copline) ++# define PL_rsfp D_PPP_my_PL_parser_var(rsfp) ++# define PL_rsfp_filters D_PPP_my_PL_parser_var(rsfp_filters) ++# define PL_linestr D_PPP_my_PL_parser_var(linestr) ++# define PL_bufptr D_PPP_my_PL_parser_var(bufptr) ++# define PL_bufend D_PPP_my_PL_parser_var(bufend) ++# define PL_lex_state D_PPP_my_PL_parser_var(lex_state) ++# define PL_lex_stuff D_PPP_my_PL_parser_var(lex_stuff) ++# define PL_tokenbuf D_PPP_my_PL_parser_var(tokenbuf) ++# define PL_in_my D_PPP_my_PL_parser_var(in_my) ++# define PL_in_my_stash D_PPP_my_PL_parser_var(in_my_stash) ++# define PL_error_count D_PPP_my_PL_parser_var(error_count) ++ ++ ++#else ++ ++/* ensure that PL_parser != NULL and cannot be dereferenced */ ++# define PL_parser ((void *) 1) ++ ++#endif ++#ifndef mPUSHs ++# define mPUSHs(s) PUSHs(sv_2mortal(s)) ++#endif ++ ++#ifndef PUSHmortal ++# define PUSHmortal PUSHs(sv_newmortal()) ++#endif ++ ++#ifndef mPUSHp ++# define mPUSHp(p,l) sv_setpvn(PUSHmortal, (p), (l)) ++#endif ++ ++#ifndef mPUSHn ++# define mPUSHn(n) sv_setnv(PUSHmortal, (NV)(n)) ++#endif ++ ++#ifndef mPUSHi ++# define mPUSHi(i) sv_setiv(PUSHmortal, (IV)(i)) ++#endif ++ ++#ifndef mPUSHu ++# define mPUSHu(u) sv_setuv(PUSHmortal, (UV)(u)) ++#endif ++#ifndef mXPUSHs ++# define mXPUSHs(s) XPUSHs(sv_2mortal(s)) ++#endif ++ ++#ifndef XPUSHmortal ++# define XPUSHmortal XPUSHs(sv_newmortal()) ++#endif ++ ++#ifndef mXPUSHp ++# define mXPUSHp(p,l) STMT_START { EXTEND(sp,1); sv_setpvn(PUSHmortal, (p), (l)); } STMT_END ++#endif ++ ++#ifndef mXPUSHn ++# define mXPUSHn(n) STMT_START { EXTEND(sp,1); sv_setnv(PUSHmortal, (NV)(n)); } STMT_END ++#endif ++ ++#ifndef mXPUSHi ++# define mXPUSHi(i) STMT_START { EXTEND(sp,1); sv_setiv(PUSHmortal, (IV)(i)); } STMT_END ++#endif ++ ++#ifndef mXPUSHu ++# define mXPUSHu(u) STMT_START { EXTEND(sp,1); sv_setuv(PUSHmortal, (UV)(u)); } STMT_END ++#endif ++ ++/* Replace: 1 */ ++#ifndef call_sv ++# define call_sv perl_call_sv ++#endif ++ ++#ifndef call_pv ++# define call_pv perl_call_pv ++#endif ++ ++#ifndef call_argv ++# define call_argv perl_call_argv ++#endif ++ ++#ifndef call_method ++# define call_method perl_call_method ++#endif ++#ifndef eval_sv ++# define eval_sv perl_eval_sv ++#endif ++ ++/* Replace: 0 */ ++#ifndef PERL_LOADMOD_DENY ++# define PERL_LOADMOD_DENY 0x1 ++#endif ++ ++#ifndef PERL_LOADMOD_NOIMPORT ++# define PERL_LOADMOD_NOIMPORT 0x2 ++#endif ++ ++#ifndef PERL_LOADMOD_IMPORT_OPS ++# define PERL_LOADMOD_IMPORT_OPS 0x4 ++#endif ++ ++#ifndef G_METHOD ++# define G_METHOD 64 ++# ifdef call_sv ++# undef call_sv ++# endif ++# if (PERL_BCDVERSION < 0x5006000) ++# define call_sv(sv, flags) ((flags) & G_METHOD ? perl_call_method((char *) SvPV_nolen_const(sv), \ ++ (flags) & ~G_METHOD) : perl_call_sv(sv, flags)) ++# else ++# define call_sv(sv, flags) ((flags) & G_METHOD ? Perl_call_method(aTHX_ (char *) SvPV_nolen_const(sv), \ ++ (flags) & ~G_METHOD) : Perl_call_sv(aTHX_ sv, flags)) ++# endif ++#endif ++ ++/* Replace perl_eval_pv with eval_pv */ ++ ++#ifndef eval_pv ++#if defined(NEED_eval_pv) ++static SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error); ++static ++#else ++extern SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error); ++#endif ++ ++#ifdef eval_pv ++# undef eval_pv ++#endif ++#define eval_pv(a,b) DPPP_(my_eval_pv)(aTHX_ a,b) ++#define Perl_eval_pv DPPP_(my_eval_pv) ++ ++#if defined(NEED_eval_pv) || defined(NEED_eval_pv_GLOBAL) ++ ++SV* ++DPPP_(my_eval_pv)(char *p, I32 croak_on_error) ++{ ++ dSP; ++ SV* sv = newSVpv(p, 0); ++ ++ PUSHMARK(sp); ++ eval_sv(sv, G_SCALAR); ++ SvREFCNT_dec(sv); ++ ++ SPAGAIN; ++ sv = POPs; ++ PUTBACK; ++ ++ if (croak_on_error && SvTRUE(GvSV(errgv))) ++ croak(SvPVx(GvSV(errgv), na)); ++ ++ return sv; ++} ++ ++#endif ++#endif ++ ++#ifndef vload_module ++#if defined(NEED_vload_module) ++static void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args); ++static ++#else ++extern void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args); ++#endif ++ ++#ifdef vload_module ++# undef vload_module ++#endif ++#define vload_module(a,b,c,d) DPPP_(my_vload_module)(aTHX_ a,b,c,d) ++#define Perl_vload_module DPPP_(my_vload_module) ++ ++#if defined(NEED_vload_module) || defined(NEED_vload_module_GLOBAL) ++ ++void ++DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args) ++{ ++ dTHR; ++ dVAR; ++ OP *veop, *imop; ++ ++ OP * const modname = newSVOP(OP_CONST, 0, name); ++ /* 5.005 has a somewhat hacky force_normal that doesn't croak on ++ SvREADONLY() if PL_compling is true. Current perls take care in ++ ck_require() to correctly turn off SvREADONLY before calling ++ force_normal_flags(). This seems a better fix than fudging PL_compling ++ */ ++ SvREADONLY_off(((SVOP*)modname)->op_sv); ++ modname->op_private |= OPpCONST_BARE; ++ if (ver) { ++ veop = newSVOP(OP_CONST, 0, ver); ++ } ++ else ++ veop = NULL; ++ if (flags & PERL_LOADMOD_NOIMPORT) { ++ imop = sawparens(newNULLLIST()); ++ } ++ else if (flags & PERL_LOADMOD_IMPORT_OPS) { ++ imop = va_arg(*args, OP*); ++ } ++ else { ++ SV *sv; ++ imop = NULL; ++ sv = va_arg(*args, SV*); ++ while (sv) { ++ imop = append_elem(OP_LIST, imop, newSVOP(OP_CONST, 0, sv)); ++ sv = va_arg(*args, SV*); ++ } ++ } ++ { ++ const line_t ocopline = PL_copline; ++ COP * const ocurcop = PL_curcop; ++ const int oexpect = PL_expect; ++ ++#if (PERL_BCDVERSION >= 0x5004000) ++ utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(FALSE, 0), ++ veop, modname, imop); ++#else ++ utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(), ++ modname, imop); ++#endif ++ PL_expect = oexpect; ++ PL_copline = ocopline; ++ PL_curcop = ocurcop; ++ } ++} ++ ++#endif ++#endif ++ ++#ifndef load_module ++#if defined(NEED_load_module) ++static void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...); ++static ++#else ++extern void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...); ++#endif ++ ++#ifdef load_module ++# undef load_module ++#endif ++#define load_module DPPP_(my_load_module) ++#define Perl_load_module DPPP_(my_load_module) ++ ++#if defined(NEED_load_module) || defined(NEED_load_module_GLOBAL) ++ ++void ++DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...) ++{ ++ va_list args; ++ va_start(args, ver); ++ vload_module(flags, name, ver, &args); ++ va_end(args); ++} ++ ++#endif ++#endif ++#ifndef newRV_inc ++# define newRV_inc(sv) newRV(sv) /* Replace */ ++#endif ++ ++#ifndef newRV_noinc ++#if defined(NEED_newRV_noinc) ++static SV * DPPP_(my_newRV_noinc)(SV *sv); ++static ++#else ++extern SV * DPPP_(my_newRV_noinc)(SV *sv); ++#endif ++ ++#ifdef newRV_noinc ++# undef newRV_noinc ++#endif ++#define newRV_noinc(a) DPPP_(my_newRV_noinc)(aTHX_ a) ++#define Perl_newRV_noinc DPPP_(my_newRV_noinc) ++ ++#if defined(NEED_newRV_noinc) || defined(NEED_newRV_noinc_GLOBAL) ++SV * ++DPPP_(my_newRV_noinc)(SV *sv) ++{ ++ SV *rv = (SV *)newRV(sv); ++ SvREFCNT_dec(sv); ++ return rv; ++} ++#endif ++#endif ++ ++/* Hint: newCONSTSUB ++ * Returns a CV* as of perl-5.7.1. This return value is not supported ++ * by Devel::PPPort. ++ */ ++ ++/* newCONSTSUB from IO.xs is in the core starting with 5.004_63 */ ++#if (PERL_BCDVERSION < 0x5004063) && (PERL_BCDVERSION != 0x5004005) ++#if defined(NEED_newCONSTSUB) ++static void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv); ++static ++#else ++extern void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv); ++#endif ++ ++#ifdef newCONSTSUB ++# undef newCONSTSUB ++#endif ++#define newCONSTSUB(a,b,c) DPPP_(my_newCONSTSUB)(aTHX_ a,b,c) ++#define Perl_newCONSTSUB DPPP_(my_newCONSTSUB) ++ ++#if defined(NEED_newCONSTSUB) || defined(NEED_newCONSTSUB_GLOBAL) ++ ++/* This is just a trick to avoid a dependency of newCONSTSUB on PL_parser */ ++/* (There's no PL_parser in perl < 5.005, so this is completely safe) */ ++#define D_PPP_PL_copline PL_copline ++ ++void ++DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv) ++{ ++ U32 oldhints = PL_hints; ++ HV *old_cop_stash = PL_curcop->cop_stash; ++ HV *old_curstash = PL_curstash; ++ line_t oldline = PL_curcop->cop_line; ++ PL_curcop->cop_line = D_PPP_PL_copline; ++ ++ PL_hints &= ~HINT_BLOCK_SCOPE; ++ if (stash) ++ PL_curstash = PL_curcop->cop_stash = stash; ++ ++ newSUB( ++ ++#if (PERL_BCDVERSION < 0x5003022) ++ start_subparse(), ++#elif (PERL_BCDVERSION == 0x5003022) ++ start_subparse(0), ++#else /* 5.003_23 onwards */ ++ start_subparse(FALSE, 0), ++#endif ++ ++ newSVOP(OP_CONST, 0, newSVpv((char *) name, 0)), ++ newSVOP(OP_CONST, 0, &PL_sv_no), /* SvPV(&PL_sv_no) == "" -- GMB */ ++ newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv)) ++ ); ++ ++ PL_hints = oldhints; ++ PL_curcop->cop_stash = old_cop_stash; ++ PL_curstash = old_curstash; ++ PL_curcop->cop_line = oldline; ++} ++#endif ++#endif ++ ++/* ++ * Boilerplate macros for initializing and accessing interpreter-local ++ * data from C. All statics in extensions should be reworked to use ++ * this, if you want to make the extension thread-safe. See ext/re/re.xs ++ * for an example of the use of these macros. ++ * ++ * Code that uses these macros is responsible for the following: ++ * 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts" ++ * 2. Declare a typedef named my_cxt_t that is a structure that contains ++ * all the data that needs to be interpreter-local. ++ * 3. Use the START_MY_CXT macro after the declaration of my_cxt_t. ++ * 4. Use the MY_CXT_INIT macro such that it is called exactly once ++ * (typically put in the BOOT: section). ++ * 5. Use the members of the my_cxt_t structure everywhere as ++ * MY_CXT.member. ++ * 6. Use the dMY_CXT macro (a declaration) in all the functions that ++ * access MY_CXT. ++ */ ++ ++#if defined(MULTIPLICITY) || defined(PERL_OBJECT) || \ ++ defined(PERL_CAPI) || defined(PERL_IMPLICIT_CONTEXT) ++ ++#ifndef START_MY_CXT ++ ++/* This must appear in all extensions that define a my_cxt_t structure, ++ * right after the definition (i.e. at file scope). The non-threads ++ * case below uses it to declare the data as static. */ ++#define START_MY_CXT ++ ++#if (PERL_BCDVERSION < 0x5004068) ++/* Fetches the SV that keeps the per-interpreter data. */ ++#define dMY_CXT_SV \ ++ SV *my_cxt_sv = get_sv(MY_CXT_KEY, FALSE) ++#else /* >= perl5.004_68 */ ++#define dMY_CXT_SV \ ++ SV *my_cxt_sv = *hv_fetch(PL_modglobal, MY_CXT_KEY, \ ++ sizeof(MY_CXT_KEY)-1, TRUE) ++#endif /* < perl5.004_68 */ ++ ++/* This declaration should be used within all functions that use the ++ * interpreter-local data. */ ++#define dMY_CXT \ ++ dMY_CXT_SV; \ ++ my_cxt_t *my_cxtp = INT2PTR(my_cxt_t*,SvUV(my_cxt_sv)) ++ ++/* Creates and zeroes the per-interpreter data. ++ * (We allocate my_cxtp in a Perl SV so that it will be released when ++ * the interpreter goes away.) */ ++#define MY_CXT_INIT \ ++ dMY_CXT_SV; \ ++ /* newSV() allocates one more than needed */ \ ++ my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\ ++ Zero(my_cxtp, 1, my_cxt_t); \ ++ sv_setuv(my_cxt_sv, PTR2UV(my_cxtp)) ++ ++/* This macro must be used to access members of the my_cxt_t structure. ++ * e.g. MYCXT.some_data */ ++#define MY_CXT (*my_cxtp) ++ ++/* Judicious use of these macros can reduce the number of times dMY_CXT ++ * is used. Use is similar to pTHX, aTHX etc. */ ++#define pMY_CXT my_cxt_t *my_cxtp ++#define pMY_CXT_ pMY_CXT, ++#define _pMY_CXT ,pMY_CXT ++#define aMY_CXT my_cxtp ++#define aMY_CXT_ aMY_CXT, ++#define _aMY_CXT ,aMY_CXT ++ ++#endif /* START_MY_CXT */ ++ ++#ifndef MY_CXT_CLONE ++/* Clones the per-interpreter data. */ ++#define MY_CXT_CLONE \ ++ dMY_CXT_SV; \ ++ my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\ ++ Copy(INT2PTR(my_cxt_t*, SvUV(my_cxt_sv)), my_cxtp, 1, my_cxt_t);\ ++ sv_setuv(my_cxt_sv, PTR2UV(my_cxtp)) ++#endif ++ ++#else /* single interpreter */ ++ ++#ifndef START_MY_CXT ++ ++#define START_MY_CXT static my_cxt_t my_cxt; ++#define dMY_CXT_SV dNOOP ++#define dMY_CXT dNOOP ++#define MY_CXT_INIT NOOP ++#define MY_CXT my_cxt ++ ++#define pMY_CXT void ++#define pMY_CXT_ ++#define _pMY_CXT ++#define aMY_CXT ++#define aMY_CXT_ ++#define _aMY_CXT ++ ++#endif /* START_MY_CXT */ ++ ++#ifndef MY_CXT_CLONE ++#define MY_CXT_CLONE NOOP ++#endif ++ ++#endif ++ ++#ifndef IVdf ++# if IVSIZE == LONGSIZE ++# define IVdf "ld" ++# define UVuf "lu" ++# define UVof "lo" ++# define UVxf "lx" ++# define UVXf "lX" ++# elif IVSIZE == INTSIZE ++# define IVdf "d" ++# define UVuf "u" ++# define UVof "o" ++# define UVxf "x" ++# define UVXf "X" ++# else ++# error "cannot define IV/UV formats" ++# endif ++#endif ++ ++#ifndef NVef ++# if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && \ ++ defined(PERL_PRIfldbl) && (PERL_BCDVERSION != 0x5006000) ++ /* Not very likely, but let's try anyway. */ ++# define NVef PERL_PRIeldbl ++# define NVff PERL_PRIfldbl ++# define NVgf PERL_PRIgldbl ++# else ++# define NVef "e" ++# define NVff "f" ++# define NVgf "g" ++# endif ++#endif ++ ++#ifndef SvREFCNT_inc ++# ifdef PERL_USE_GCC_BRACE_GROUPS ++# define SvREFCNT_inc(sv) \ ++ ({ \ ++ SV * const _sv = (SV*)(sv); \ ++ if (_sv) \ ++ (SvREFCNT(_sv))++; \ ++ _sv; \ ++ }) ++# else ++# define SvREFCNT_inc(sv) \ ++ ((PL_Sv=(SV*)(sv)) ? (++(SvREFCNT(PL_Sv)),PL_Sv) : NULL) ++# endif ++#endif ++ ++#ifndef SvREFCNT_inc_simple ++# ifdef PERL_USE_GCC_BRACE_GROUPS ++# define SvREFCNT_inc_simple(sv) \ ++ ({ \ ++ if (sv) \ ++ (SvREFCNT(sv))++; \ ++ (SV *)(sv); \ ++ }) ++# else ++# define SvREFCNT_inc_simple(sv) \ ++ ((sv) ? (SvREFCNT(sv)++,(SV*)(sv)) : NULL) ++# endif ++#endif ++ ++#ifndef SvREFCNT_inc_NN ++# ifdef PERL_USE_GCC_BRACE_GROUPS ++# define SvREFCNT_inc_NN(sv) \ ++ ({ \ ++ SV * const _sv = (SV*)(sv); \ ++ SvREFCNT(_sv)++; \ ++ _sv; \ ++ }) ++# else ++# define SvREFCNT_inc_NN(sv) \ ++ (PL_Sv=(SV*)(sv),++(SvREFCNT(PL_Sv)),PL_Sv) ++# endif ++#endif ++ ++#ifndef SvREFCNT_inc_void ++# ifdef PERL_USE_GCC_BRACE_GROUPS ++# define SvREFCNT_inc_void(sv) \ ++ ({ \ ++ SV * const _sv = (SV*)(sv); \ ++ if (_sv) \ ++ (void)(SvREFCNT(_sv)++); \ ++ }) ++# else ++# define SvREFCNT_inc_void(sv) \ ++ (void)((PL_Sv=(SV*)(sv)) ? ++(SvREFCNT(PL_Sv)) : 0) ++# endif ++#endif ++#ifndef SvREFCNT_inc_simple_void ++# define SvREFCNT_inc_simple_void(sv) STMT_START { if (sv) SvREFCNT(sv)++; } STMT_END ++#endif ++ ++#ifndef SvREFCNT_inc_simple_NN ++# define SvREFCNT_inc_simple_NN(sv) (++SvREFCNT(sv), (SV*)(sv)) ++#endif ++ ++#ifndef SvREFCNT_inc_void_NN ++# define SvREFCNT_inc_void_NN(sv) (void)(++SvREFCNT((SV*)(sv))) ++#endif ++ ++#ifndef SvREFCNT_inc_simple_void_NN ++# define SvREFCNT_inc_simple_void_NN(sv) (void)(++SvREFCNT((SV*)(sv))) ++#endif ++ ++#ifndef newSV_type ++ ++#if defined(NEED_newSV_type) ++static SV* DPPP_(my_newSV_type)(pTHX_ svtype const t); ++static ++#else ++extern SV* DPPP_(my_newSV_type)(pTHX_ svtype const t); ++#endif ++ ++#ifdef newSV_type ++# undef newSV_type ++#endif ++#define newSV_type(a) DPPP_(my_newSV_type)(aTHX_ a) ++#define Perl_newSV_type DPPP_(my_newSV_type) ++ ++#if defined(NEED_newSV_type) || defined(NEED_newSV_type_GLOBAL) ++ ++SV* ++DPPP_(my_newSV_type)(pTHX_ svtype const t) ++{ ++ SV* const sv = newSV(0); ++ sv_upgrade(sv, t); ++ return sv; ++} ++ ++#endif ++ ++#endif ++ ++#if (PERL_BCDVERSION < 0x5006000) ++# define D_PPP_CONSTPV_ARG(x) ((char *) (x)) ++#else ++# define D_PPP_CONSTPV_ARG(x) (x) ++#endif ++#ifndef newSVpvn ++# define newSVpvn(data,len) ((data) \ ++ ? ((len) ? newSVpv((data), (len)) : newSVpv("", 0)) \ ++ : newSV(0)) ++#endif ++#ifndef newSVpvn_utf8 ++# define newSVpvn_utf8(s, len, u) newSVpvn_flags((s), (len), (u) ? SVf_UTF8 : 0) ++#endif ++#ifndef SVf_UTF8 ++# define SVf_UTF8 0 ++#endif ++ ++#ifndef newSVpvn_flags ++ ++#if defined(NEED_newSVpvn_flags) ++static SV * DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags); ++static ++#else ++extern SV * DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags); ++#endif ++ ++#ifdef newSVpvn_flags ++# undef newSVpvn_flags ++#endif ++#define newSVpvn_flags(a,b,c) DPPP_(my_newSVpvn_flags)(aTHX_ a,b,c) ++#define Perl_newSVpvn_flags DPPP_(my_newSVpvn_flags) ++ ++#if defined(NEED_newSVpvn_flags) || defined(NEED_newSVpvn_flags_GLOBAL) ++ ++SV * ++DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags) ++{ ++ SV *sv = newSVpvn(D_PPP_CONSTPV_ARG(s), len); ++ SvFLAGS(sv) |= (flags & SVf_UTF8); ++ return (flags & SVs_TEMP) ? sv_2mortal(sv) : sv; ++} ++ ++#endif ++ ++#endif ++ ++/* Backwards compatibility stuff... :-( */ ++#if !defined(NEED_sv_2pv_flags) && defined(NEED_sv_2pv_nolen) ++# define NEED_sv_2pv_flags ++#endif ++#if !defined(NEED_sv_2pv_flags_GLOBAL) && defined(NEED_sv_2pv_nolen_GLOBAL) ++# define NEED_sv_2pv_flags_GLOBAL ++#endif ++ ++/* Hint: sv_2pv_nolen ++ * Use the SvPV_nolen() or SvPV_nolen_const() macros instead of sv_2pv_nolen(). ++ */ ++#ifndef sv_2pv_nolen ++# define sv_2pv_nolen(sv) SvPV_nolen(sv) ++#endif ++ ++#ifdef SvPVbyte ++ ++/* Hint: SvPVbyte ++ * Does not work in perl-5.6.1, ppport.h implements a version ++ * borrowed from perl-5.7.3. ++ */ ++ ++#if (PERL_BCDVERSION < 0x5007000) ++ ++#if defined(NEED_sv_2pvbyte) ++static char * DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp); ++static ++#else ++extern char * DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp); ++#endif ++ ++#ifdef sv_2pvbyte ++# undef sv_2pvbyte ++#endif ++#define sv_2pvbyte(a,b) DPPP_(my_sv_2pvbyte)(aTHX_ a,b) ++#define Perl_sv_2pvbyte DPPP_(my_sv_2pvbyte) ++ ++#if defined(NEED_sv_2pvbyte) || defined(NEED_sv_2pvbyte_GLOBAL) ++ ++char * ++DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp) ++{ ++ sv_utf8_downgrade(sv,0); ++ return SvPV(sv,*lp); ++} ++ ++#endif ++ ++/* Hint: sv_2pvbyte ++ * Use the SvPVbyte() macro instead of sv_2pvbyte(). ++ */ ++ ++#undef SvPVbyte ++ ++#define SvPVbyte(sv, lp) \ ++ ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK) \ ++ ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pvbyte(sv, &lp)) ++ ++#endif ++ ++#else ++ ++# define SvPVbyte SvPV ++# define sv_2pvbyte sv_2pv ++ ++#endif ++#ifndef sv_2pvbyte_nolen ++# define sv_2pvbyte_nolen(sv) sv_2pv_nolen(sv) ++#endif ++ ++/* Hint: sv_pvn ++ * Always use the SvPV() macro instead of sv_pvn(). ++ */ ++ ++/* Hint: sv_pvn_force ++ * Always use the SvPV_force() macro instead of sv_pvn_force(). ++ */ ++ ++/* If these are undefined, they're not handled by the core anyway */ ++#ifndef SV_IMMEDIATE_UNREF ++# define SV_IMMEDIATE_UNREF 0 ++#endif ++ ++#ifndef SV_GMAGIC ++# define SV_GMAGIC 0 ++#endif ++ ++#ifndef SV_COW_DROP_PV ++# define SV_COW_DROP_PV 0 ++#endif ++ ++#ifndef SV_UTF8_NO_ENCODING ++# define SV_UTF8_NO_ENCODING 0 ++#endif ++ ++#ifndef SV_NOSTEAL ++# define SV_NOSTEAL 0 ++#endif ++ ++#ifndef SV_CONST_RETURN ++# define SV_CONST_RETURN 0 ++#endif ++ ++#ifndef SV_MUTABLE_RETURN ++# define SV_MUTABLE_RETURN 0 ++#endif ++ ++#ifndef SV_SMAGIC ++# define SV_SMAGIC 0 ++#endif ++ ++#ifndef SV_HAS_TRAILING_NUL ++# define SV_HAS_TRAILING_NUL 0 ++#endif ++ ++#ifndef SV_COW_SHARED_HASH_KEYS ++# define SV_COW_SHARED_HASH_KEYS 0 ++#endif ++ ++#if (PERL_BCDVERSION < 0x5007002) ++ ++#if defined(NEED_sv_2pv_flags) ++static char * DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags); ++static ++#else ++extern char * DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags); ++#endif ++ ++#ifdef sv_2pv_flags ++# undef sv_2pv_flags ++#endif ++#define sv_2pv_flags(a,b,c) DPPP_(my_sv_2pv_flags)(aTHX_ a,b,c) ++#define Perl_sv_2pv_flags DPPP_(my_sv_2pv_flags) ++ ++#if defined(NEED_sv_2pv_flags) || defined(NEED_sv_2pv_flags_GLOBAL) ++ ++char * ++DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags) ++{ ++ STRLEN n_a = (STRLEN) flags; ++ return sv_2pv(sv, lp ? lp : &n_a); ++} ++ ++#endif ++ ++#if defined(NEED_sv_pvn_force_flags) ++static char * DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags); ++static ++#else ++extern char * DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags); ++#endif ++ ++#ifdef sv_pvn_force_flags ++# undef sv_pvn_force_flags ++#endif ++#define sv_pvn_force_flags(a,b,c) DPPP_(my_sv_pvn_force_flags)(aTHX_ a,b,c) ++#define Perl_sv_pvn_force_flags DPPP_(my_sv_pvn_force_flags) ++ ++#if defined(NEED_sv_pvn_force_flags) || defined(NEED_sv_pvn_force_flags_GLOBAL) ++ ++char * ++DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags) ++{ ++ STRLEN n_a = (STRLEN) flags; ++ return sv_pvn_force(sv, lp ? lp : &n_a); ++} ++ ++#endif ++ ++#endif ++ ++#if (PERL_BCDVERSION < 0x5008008) || ( (PERL_BCDVERSION >= 0x5009000) && (PERL_BCDVERSION < 0x5009003) ) ++# define DPPP_SVPV_NOLEN_LP_ARG &PL_na ++#else ++# define DPPP_SVPV_NOLEN_LP_ARG 0 ++#endif ++#ifndef SvPV_const ++# define SvPV_const(sv, lp) SvPV_flags_const(sv, lp, SV_GMAGIC) ++#endif ++ ++#ifndef SvPV_mutable ++# define SvPV_mutable(sv, lp) SvPV_flags_mutable(sv, lp, SV_GMAGIC) ++#endif ++#ifndef SvPV_flags ++# define SvPV_flags(sv, lp, flags) \ ++ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ++ ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pv_flags(sv, &lp, flags)) ++#endif ++#ifndef SvPV_flags_const ++# define SvPV_flags_const(sv, lp, flags) \ ++ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ++ ? ((lp = SvCUR(sv)), SvPVX_const(sv)) : \ ++ (const char*) sv_2pv_flags(sv, &lp, flags|SV_CONST_RETURN)) ++#endif ++#ifndef SvPV_flags_const_nolen ++# define SvPV_flags_const_nolen(sv, flags) \ ++ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ++ ? SvPVX_const(sv) : \ ++ (const char*) sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags|SV_CONST_RETURN)) ++#endif ++#ifndef SvPV_flags_mutable ++# define SvPV_flags_mutable(sv, lp, flags) \ ++ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ++ ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) : \ ++ sv_2pv_flags(sv, &lp, flags|SV_MUTABLE_RETURN)) ++#endif ++#ifndef SvPV_force ++# define SvPV_force(sv, lp) SvPV_force_flags(sv, lp, SV_GMAGIC) ++#endif ++ ++#ifndef SvPV_force_nolen ++# define SvPV_force_nolen(sv) SvPV_force_flags_nolen(sv, SV_GMAGIC) ++#endif ++ ++#ifndef SvPV_force_mutable ++# define SvPV_force_mutable(sv, lp) SvPV_force_flags_mutable(sv, lp, SV_GMAGIC) ++#endif ++ ++#ifndef SvPV_force_nomg ++# define SvPV_force_nomg(sv, lp) SvPV_force_flags(sv, lp, 0) ++#endif ++ ++#ifndef SvPV_force_nomg_nolen ++# define SvPV_force_nomg_nolen(sv) SvPV_force_flags_nolen(sv, 0) ++#endif ++#ifndef SvPV_force_flags ++# define SvPV_force_flags(sv, lp, flags) \ ++ ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \ ++ ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_pvn_force_flags(sv, &lp, flags)) ++#endif ++#ifndef SvPV_force_flags_nolen ++# define SvPV_force_flags_nolen(sv, flags) \ ++ ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \ ++ ? SvPVX(sv) : sv_pvn_force_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags)) ++#endif ++#ifndef SvPV_force_flags_mutable ++# define SvPV_force_flags_mutable(sv, lp, flags) \ ++ ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \ ++ ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) \ ++ : sv_pvn_force_flags(sv, &lp, flags|SV_MUTABLE_RETURN)) ++#endif ++#ifndef SvPV_nolen ++# define SvPV_nolen(sv) \ ++ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ++ ? SvPVX(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC)) ++#endif ++#ifndef SvPV_nolen_const ++# define SvPV_nolen_const(sv) \ ++ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ++ ? SvPVX_const(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC|SV_CONST_RETURN)) ++#endif ++#ifndef SvPV_nomg ++# define SvPV_nomg(sv, lp) SvPV_flags(sv, lp, 0) ++#endif ++ ++#ifndef SvPV_nomg_const ++# define SvPV_nomg_const(sv, lp) SvPV_flags_const(sv, lp, 0) ++#endif ++ ++#ifndef SvPV_nomg_const_nolen ++# define SvPV_nomg_const_nolen(sv) SvPV_flags_const_nolen(sv, 0) ++#endif ++ ++#ifndef SvPV_nomg_nolen ++# define SvPV_nomg_nolen(sv) ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ++ ? SvPVX(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, 0)) ++#endif ++#ifndef SvPV_renew ++# define SvPV_renew(sv,n) STMT_START { SvLEN_set(sv, n); \ ++ SvPV_set((sv), (char *) saferealloc( \ ++ (Malloc_t)SvPVX(sv), (MEM_SIZE)((n)))); \ ++ } STMT_END ++#endif ++#ifndef SvMAGIC_set ++# define SvMAGIC_set(sv, val) \ ++ STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \ ++ (((XPVMG*) SvANY(sv))->xmg_magic = (val)); } STMT_END ++#endif ++ ++#if (PERL_BCDVERSION < 0x5009003) ++#ifndef SvPVX_const ++# define SvPVX_const(sv) ((const char*) (0 + SvPVX(sv))) ++#endif ++ ++#ifndef SvPVX_mutable ++# define SvPVX_mutable(sv) (0 + SvPVX(sv)) ++#endif ++#ifndef SvRV_set ++# define SvRV_set(sv, val) \ ++ STMT_START { assert(SvTYPE(sv) >= SVt_RV); \ ++ (((XRV*) SvANY(sv))->xrv_rv = (val)); } STMT_END ++#endif ++ ++#else ++#ifndef SvPVX_const ++# define SvPVX_const(sv) ((const char*)((sv)->sv_u.svu_pv)) ++#endif ++ ++#ifndef SvPVX_mutable ++# define SvPVX_mutable(sv) ((sv)->sv_u.svu_pv) ++#endif ++#ifndef SvRV_set ++# define SvRV_set(sv, val) \ ++ STMT_START { assert(SvTYPE(sv) >= SVt_RV); \ ++ ((sv)->sv_u.svu_rv = (val)); } STMT_END ++#endif ++ ++#endif ++#ifndef SvSTASH_set ++# define SvSTASH_set(sv, val) \ ++ STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \ ++ (((XPVMG*) SvANY(sv))->xmg_stash = (val)); } STMT_END ++#endif ++ ++#if (PERL_BCDVERSION < 0x5004000) ++#ifndef SvUV_set ++# define SvUV_set(sv, val) \ ++ STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \ ++ (((XPVIV*) SvANY(sv))->xiv_iv = (IV) (val)); } STMT_END ++#endif ++ ++#else ++#ifndef SvUV_set ++# define SvUV_set(sv, val) \ ++ STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \ ++ (((XPVUV*) SvANY(sv))->xuv_uv = (val)); } STMT_END ++#endif ++ ++#endif ++ ++#if (PERL_BCDVERSION >= 0x5004000) && !defined(vnewSVpvf) ++#if defined(NEED_vnewSVpvf) ++static SV * DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args); ++static ++#else ++extern SV * DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args); ++#endif ++ ++#ifdef vnewSVpvf ++# undef vnewSVpvf ++#endif ++#define vnewSVpvf(a,b) DPPP_(my_vnewSVpvf)(aTHX_ a,b) ++#define Perl_vnewSVpvf DPPP_(my_vnewSVpvf) ++ ++#if defined(NEED_vnewSVpvf) || defined(NEED_vnewSVpvf_GLOBAL) ++ ++SV * ++DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args) ++{ ++ register SV *sv = newSV(0); ++ sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); ++ return sv; ++} ++ ++#endif ++#endif ++ ++#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vcatpvf) ++# define sv_vcatpvf(sv, pat, args) sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)) ++#endif ++ ++#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vsetpvf) ++# define sv_vsetpvf(sv, pat, args) sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)) ++#endif ++ ++#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_catpvf_mg) ++#if defined(NEED_sv_catpvf_mg) ++static void DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...); ++static ++#else ++extern void DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...); ++#endif ++ ++#define Perl_sv_catpvf_mg DPPP_(my_sv_catpvf_mg) ++ ++#if defined(NEED_sv_catpvf_mg) || defined(NEED_sv_catpvf_mg_GLOBAL) ++ ++void ++DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...) ++{ ++ va_list args; ++ va_start(args, pat); ++ sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); ++ SvSETMAGIC(sv); ++ va_end(args); ++} ++ ++#endif ++#endif ++ ++#ifdef PERL_IMPLICIT_CONTEXT ++#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_catpvf_mg_nocontext) ++#if defined(NEED_sv_catpvf_mg_nocontext) ++static void DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...); ++static ++#else ++extern void DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...); ++#endif ++ ++#define sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext) ++#define Perl_sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext) ++ ++#if defined(NEED_sv_catpvf_mg_nocontext) || defined(NEED_sv_catpvf_mg_nocontext_GLOBAL) ++ ++void ++DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...) ++{ ++ dTHX; ++ va_list args; ++ va_start(args, pat); ++ sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); ++ SvSETMAGIC(sv); ++ va_end(args); ++} ++ ++#endif ++#endif ++#endif ++ ++/* sv_catpvf_mg depends on sv_catpvf_mg_nocontext */ ++#ifndef sv_catpvf_mg ++# ifdef PERL_IMPLICIT_CONTEXT ++# define sv_catpvf_mg Perl_sv_catpvf_mg_nocontext ++# else ++# define sv_catpvf_mg Perl_sv_catpvf_mg ++# endif ++#endif ++ ++#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vcatpvf_mg) ++# define sv_vcatpvf_mg(sv, pat, args) \ ++ STMT_START { \ ++ sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \ ++ SvSETMAGIC(sv); \ ++ } STMT_END ++#endif ++ ++#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_setpvf_mg) ++#if defined(NEED_sv_setpvf_mg) ++static void DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...); ++static ++#else ++extern void DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...); ++#endif ++ ++#define Perl_sv_setpvf_mg DPPP_(my_sv_setpvf_mg) ++ ++#if defined(NEED_sv_setpvf_mg) || defined(NEED_sv_setpvf_mg_GLOBAL) ++ ++void ++DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...) ++{ ++ va_list args; ++ va_start(args, pat); ++ sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); ++ SvSETMAGIC(sv); ++ va_end(args); ++} ++ ++#endif ++#endif ++ ++#ifdef PERL_IMPLICIT_CONTEXT ++#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_setpvf_mg_nocontext) ++#if defined(NEED_sv_setpvf_mg_nocontext) ++static void DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...); ++static ++#else ++extern void DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...); ++#endif ++ ++#define sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext) ++#define Perl_sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext) ++ ++#if defined(NEED_sv_setpvf_mg_nocontext) || defined(NEED_sv_setpvf_mg_nocontext_GLOBAL) ++ ++void ++DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...) ++{ ++ dTHX; ++ va_list args; ++ va_start(args, pat); ++ sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); ++ SvSETMAGIC(sv); ++ va_end(args); ++} ++ ++#endif ++#endif ++#endif ++ ++/* sv_setpvf_mg depends on sv_setpvf_mg_nocontext */ ++#ifndef sv_setpvf_mg ++# ifdef PERL_IMPLICIT_CONTEXT ++# define sv_setpvf_mg Perl_sv_setpvf_mg_nocontext ++# else ++# define sv_setpvf_mg Perl_sv_setpvf_mg ++# endif ++#endif ++ ++#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vsetpvf_mg) ++# define sv_vsetpvf_mg(sv, pat, args) \ ++ STMT_START { \ ++ sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \ ++ SvSETMAGIC(sv); \ ++ } STMT_END ++#endif ++ ++/* Hint: newSVpvn_share ++ * The SVs created by this function only mimic the behaviour of ++ * shared PVs without really being shared. Only use if you know ++ * what you're doing. ++ */ ++ ++#ifndef newSVpvn_share ++ ++#if defined(NEED_newSVpvn_share) ++static SV * DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash); ++static ++#else ++extern SV * DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash); ++#endif ++ ++#ifdef newSVpvn_share ++# undef newSVpvn_share ++#endif ++#define newSVpvn_share(a,b,c) DPPP_(my_newSVpvn_share)(aTHX_ a,b,c) ++#define Perl_newSVpvn_share DPPP_(my_newSVpvn_share) ++ ++#if defined(NEED_newSVpvn_share) || defined(NEED_newSVpvn_share_GLOBAL) ++ ++SV * ++DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash) ++{ ++ SV *sv; ++ if (len < 0) ++ len = -len; ++ if (!hash) ++ PERL_HASH(hash, (char*) src, len); ++ sv = newSVpvn((char *) src, len); ++ sv_upgrade(sv, SVt_PVIV); ++ SvIVX(sv) = hash; ++ SvREADONLY_on(sv); ++ SvPOK_on(sv); ++ return sv; ++} ++ ++#endif ++ ++#endif ++#ifndef SvSHARED_HASH ++# define SvSHARED_HASH(sv) (0 + SvUVX(sv)) ++#endif ++#ifndef HvNAME_get ++# define HvNAME_get(hv) HvNAME(hv) ++#endif ++#ifndef HvNAMELEN_get ++# define HvNAMELEN_get(hv) (HvNAME_get(hv) ? (I32)strlen(HvNAME_get(hv)) : 0) ++#endif ++#ifndef GvSVn ++# define GvSVn(gv) GvSV(gv) ++#endif ++ ++#ifndef isGV_with_GP ++# define isGV_with_GP(gv) isGV(gv) ++#endif ++ ++#ifndef gv_fetchpvn_flags ++# define gv_fetchpvn_flags(name, len, flags, svt) gv_fetchpv(name, flags, svt) ++#endif ++ ++#ifndef gv_fetchsv ++# define gv_fetchsv(name, flags, svt) gv_fetchpv(SvPV_nolen_const(name), flags, svt) ++#endif ++#ifndef get_cvn_flags ++# define get_cvn_flags(name, namelen, flags) get_cv(name, flags) ++#endif ++#ifndef WARN_ALL ++# define WARN_ALL 0 ++#endif ++ ++#ifndef WARN_CLOSURE ++# define WARN_CLOSURE 1 ++#endif ++ ++#ifndef WARN_DEPRECATED ++# define WARN_DEPRECATED 2 ++#endif ++ ++#ifndef WARN_EXITING ++# define WARN_EXITING 3 ++#endif ++ ++#ifndef WARN_GLOB ++# define WARN_GLOB 4 ++#endif ++ ++#ifndef WARN_IO ++# define WARN_IO 5 ++#endif ++ ++#ifndef WARN_CLOSED ++# define WARN_CLOSED 6 ++#endif ++ ++#ifndef WARN_EXEC ++# define WARN_EXEC 7 ++#endif ++ ++#ifndef WARN_LAYER ++# define WARN_LAYER 8 ++#endif ++ ++#ifndef WARN_NEWLINE ++# define WARN_NEWLINE 9 ++#endif ++ ++#ifndef WARN_PIPE ++# define WARN_PIPE 10 ++#endif ++ ++#ifndef WARN_UNOPENED ++# define WARN_UNOPENED 11 ++#endif ++ ++#ifndef WARN_MISC ++# define WARN_MISC 12 ++#endif ++ ++#ifndef WARN_NUMERIC ++# define WARN_NUMERIC 13 ++#endif ++ ++#ifndef WARN_ONCE ++# define WARN_ONCE 14 ++#endif ++ ++#ifndef WARN_OVERFLOW ++# define WARN_OVERFLOW 15 ++#endif ++ ++#ifndef WARN_PACK ++# define WARN_PACK 16 ++#endif ++ ++#ifndef WARN_PORTABLE ++# define WARN_PORTABLE 17 ++#endif ++ ++#ifndef WARN_RECURSION ++# define WARN_RECURSION 18 ++#endif ++ ++#ifndef WARN_REDEFINE ++# define WARN_REDEFINE 19 ++#endif ++ ++#ifndef WARN_REGEXP ++# define WARN_REGEXP 20 ++#endif ++ ++#ifndef WARN_SEVERE ++# define WARN_SEVERE 21 ++#endif ++ ++#ifndef WARN_DEBUGGING ++# define WARN_DEBUGGING 22 ++#endif ++ ++#ifndef WARN_INPLACE ++# define WARN_INPLACE 23 ++#endif ++ ++#ifndef WARN_INTERNAL ++# define WARN_INTERNAL 24 ++#endif ++ ++#ifndef WARN_MALLOC ++# define WARN_MALLOC 25 ++#endif ++ ++#ifndef WARN_SIGNAL ++# define WARN_SIGNAL 26 ++#endif ++ ++#ifndef WARN_SUBSTR ++# define WARN_SUBSTR 27 ++#endif ++ ++#ifndef WARN_SYNTAX ++# define WARN_SYNTAX 28 ++#endif ++ ++#ifndef WARN_AMBIGUOUS ++# define WARN_AMBIGUOUS 29 ++#endif ++ ++#ifndef WARN_BAREWORD ++# define WARN_BAREWORD 30 ++#endif ++ ++#ifndef WARN_DIGIT ++# define WARN_DIGIT 31 ++#endif ++ ++#ifndef WARN_PARENTHESIS ++# define WARN_PARENTHESIS 32 ++#endif ++ ++#ifndef WARN_PRECEDENCE ++# define WARN_PRECEDENCE 33 ++#endif ++ ++#ifndef WARN_PRINTF ++# define WARN_PRINTF 34 ++#endif ++ ++#ifndef WARN_PROTOTYPE ++# define WARN_PROTOTYPE 35 ++#endif ++ ++#ifndef WARN_QW ++# define WARN_QW 36 ++#endif ++ ++#ifndef WARN_RESERVED ++# define WARN_RESERVED 37 ++#endif ++ ++#ifndef WARN_SEMICOLON ++# define WARN_SEMICOLON 38 ++#endif ++ ++#ifndef WARN_TAINT ++# define WARN_TAINT 39 ++#endif ++ ++#ifndef WARN_THREADS ++# define WARN_THREADS 40 ++#endif ++ ++#ifndef WARN_UNINITIALIZED ++# define WARN_UNINITIALIZED 41 ++#endif ++ ++#ifndef WARN_UNPACK ++# define WARN_UNPACK 42 ++#endif ++ ++#ifndef WARN_UNTIE ++# define WARN_UNTIE 43 ++#endif ++ ++#ifndef WARN_UTF8 ++# define WARN_UTF8 44 ++#endif ++ ++#ifndef WARN_VOID ++# define WARN_VOID 45 ++#endif ++ ++#ifndef WARN_ASSERTIONS ++# define WARN_ASSERTIONS 46 ++#endif ++#ifndef packWARN ++# define packWARN(a) (a) ++#endif ++ ++#ifndef ckWARN ++# ifdef G_WARN_ON ++# define ckWARN(a) (PL_dowarn & G_WARN_ON) ++# else ++# define ckWARN(a) PL_dowarn ++# endif ++#endif ++ ++#if (PERL_BCDVERSION >= 0x5004000) && !defined(warner) ++#if defined(NEED_warner) ++static void DPPP_(my_warner)(U32 err, const char *pat, ...); ++static ++#else ++extern void DPPP_(my_warner)(U32 err, const char *pat, ...); ++#endif ++ ++#define Perl_warner DPPP_(my_warner) ++ ++#if defined(NEED_warner) || defined(NEED_warner_GLOBAL) ++ ++void ++DPPP_(my_warner)(U32 err, const char *pat, ...) ++{ ++ SV *sv; ++ va_list args; ++ ++ PERL_UNUSED_ARG(err); ++ ++ va_start(args, pat); ++ sv = vnewSVpvf(pat, &args); ++ va_end(args); ++ sv_2mortal(sv); ++ warn("%s", SvPV_nolen(sv)); ++} ++ ++#define warner Perl_warner ++ ++#define Perl_warner_nocontext Perl_warner ++ ++#endif ++#endif ++ ++/* concatenating with "" ensures that only literal strings are accepted as argument ++ * note that STR_WITH_LEN() can't be used as argument to macros or functions that ++ * under some configurations might be macros ++ */ ++#ifndef STR_WITH_LEN ++# define STR_WITH_LEN(s) (s ""), (sizeof(s)-1) ++#endif ++#ifndef newSVpvs ++# define newSVpvs(str) newSVpvn(str "", sizeof(str) - 1) ++#endif ++ ++#ifndef newSVpvs_flags ++# define newSVpvs_flags(str, flags) newSVpvn_flags(str "", sizeof(str) - 1, flags) ++#endif ++ ++#ifndef newSVpvs_share ++# define newSVpvs_share(str) newSVpvn_share(str "", sizeof(str) - 1, 0) ++#endif ++ ++#ifndef sv_catpvs ++# define sv_catpvs(sv, str) sv_catpvn(sv, str "", sizeof(str) - 1) ++#endif ++ ++#ifndef sv_setpvs ++# define sv_setpvs(sv, str) sv_setpvn(sv, str "", sizeof(str) - 1) ++#endif ++ ++#ifndef hv_fetchs ++# define hv_fetchs(hv, key, lval) hv_fetch(hv, key "", sizeof(key) - 1, lval) ++#endif ++ ++#ifndef hv_stores ++# define hv_stores(hv, key, val) hv_store(hv, key "", sizeof(key) - 1, val, 0) ++#endif ++#ifndef gv_fetchpvs ++# define gv_fetchpvs(name, flags, svt) gv_fetchpvn_flags(name "", sizeof(name) - 1, flags, svt) ++#endif ++ ++#ifndef gv_stashpvs ++# define gv_stashpvs(name, flags) gv_stashpvn(name "", sizeof(name) - 1, flags) ++#endif ++#ifndef get_cvs ++# define get_cvs(name, flags) get_cvn_flags(name "", sizeof(name)-1, flags) ++#endif ++#ifndef SvGETMAGIC ++# define SvGETMAGIC(x) STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_END ++#endif ++#ifndef PERL_MAGIC_sv ++# define PERL_MAGIC_sv '\0' ++#endif ++ ++#ifndef PERL_MAGIC_overload ++# define PERL_MAGIC_overload 'A' ++#endif ++ ++#ifndef PERL_MAGIC_overload_elem ++# define PERL_MAGIC_overload_elem 'a' ++#endif ++ ++#ifndef PERL_MAGIC_overload_table ++# define PERL_MAGIC_overload_table 'c' ++#endif ++ ++#ifndef PERL_MAGIC_bm ++# define PERL_MAGIC_bm 'B' ++#endif ++ ++#ifndef PERL_MAGIC_regdata ++# define PERL_MAGIC_regdata 'D' ++#endif ++ ++#ifndef PERL_MAGIC_regdatum ++# define PERL_MAGIC_regdatum 'd' ++#endif ++ ++#ifndef PERL_MAGIC_env ++# define PERL_MAGIC_env 'E' ++#endif ++ ++#ifndef PERL_MAGIC_envelem ++# define PERL_MAGIC_envelem 'e' ++#endif ++ ++#ifndef PERL_MAGIC_fm ++# define PERL_MAGIC_fm 'f' ++#endif ++ ++#ifndef PERL_MAGIC_regex_global ++# define PERL_MAGIC_regex_global 'g' ++#endif ++ ++#ifndef PERL_MAGIC_isa ++# define PERL_MAGIC_isa 'I' ++#endif ++ ++#ifndef PERL_MAGIC_isaelem ++# define PERL_MAGIC_isaelem 'i' ++#endif ++ ++#ifndef PERL_MAGIC_nkeys ++# define PERL_MAGIC_nkeys 'k' ++#endif ++ ++#ifndef PERL_MAGIC_dbfile ++# define PERL_MAGIC_dbfile 'L' ++#endif ++ ++#ifndef PERL_MAGIC_dbline ++# define PERL_MAGIC_dbline 'l' ++#endif ++ ++#ifndef PERL_MAGIC_mutex ++# define PERL_MAGIC_mutex 'm' ++#endif ++ ++#ifndef PERL_MAGIC_shared ++# define PERL_MAGIC_shared 'N' ++#endif ++ ++#ifndef PERL_MAGIC_shared_scalar ++# define PERL_MAGIC_shared_scalar 'n' ++#endif ++ ++#ifndef PERL_MAGIC_collxfrm ++# define PERL_MAGIC_collxfrm 'o' ++#endif ++ ++#ifndef PERL_MAGIC_tied ++# define PERL_MAGIC_tied 'P' ++#endif ++ ++#ifndef PERL_MAGIC_tiedelem ++# define PERL_MAGIC_tiedelem 'p' ++#endif ++ ++#ifndef PERL_MAGIC_tiedscalar ++# define PERL_MAGIC_tiedscalar 'q' ++#endif ++ ++#ifndef PERL_MAGIC_qr ++# define PERL_MAGIC_qr 'r' ++#endif ++ ++#ifndef PERL_MAGIC_sig ++# define PERL_MAGIC_sig 'S' ++#endif ++ ++#ifndef PERL_MAGIC_sigelem ++# define PERL_MAGIC_sigelem 's' ++#endif ++ ++#ifndef PERL_MAGIC_taint ++# define PERL_MAGIC_taint 't' ++#endif ++ ++#ifndef PERL_MAGIC_uvar ++# define PERL_MAGIC_uvar 'U' ++#endif ++ ++#ifndef PERL_MAGIC_uvar_elem ++# define PERL_MAGIC_uvar_elem 'u' ++#endif ++ ++#ifndef PERL_MAGIC_vstring ++# define PERL_MAGIC_vstring 'V' ++#endif ++ ++#ifndef PERL_MAGIC_vec ++# define PERL_MAGIC_vec 'v' ++#endif ++ ++#ifndef PERL_MAGIC_utf8 ++# define PERL_MAGIC_utf8 'w' ++#endif ++ ++#ifndef PERL_MAGIC_substr ++# define PERL_MAGIC_substr 'x' ++#endif ++ ++#ifndef PERL_MAGIC_defelem ++# define PERL_MAGIC_defelem 'y' ++#endif ++ ++#ifndef PERL_MAGIC_glob ++# define PERL_MAGIC_glob '*' ++#endif ++ ++#ifndef PERL_MAGIC_arylen ++# define PERL_MAGIC_arylen '#' ++#endif ++ ++#ifndef PERL_MAGIC_pos ++# define PERL_MAGIC_pos '.' ++#endif ++ ++#ifndef PERL_MAGIC_backref ++# define PERL_MAGIC_backref '<' ++#endif ++ ++#ifndef PERL_MAGIC_ext ++# define PERL_MAGIC_ext '~' ++#endif ++ ++/* That's the best we can do... */ ++#ifndef sv_catpvn_nomg ++# define sv_catpvn_nomg sv_catpvn ++#endif ++ ++#ifndef sv_catsv_nomg ++# define sv_catsv_nomg sv_catsv ++#endif ++ ++#ifndef sv_setsv_nomg ++# define sv_setsv_nomg sv_setsv ++#endif ++ ++#ifndef sv_pvn_nomg ++# define sv_pvn_nomg sv_pvn ++#endif ++ ++#ifndef SvIV_nomg ++# define SvIV_nomg SvIV ++#endif ++ ++#ifndef SvUV_nomg ++# define SvUV_nomg SvUV ++#endif ++ ++#ifndef sv_catpv_mg ++# define sv_catpv_mg(sv, ptr) \ ++ STMT_START { \ ++ SV *TeMpSv = sv; \ ++ sv_catpv(TeMpSv,ptr); \ ++ SvSETMAGIC(TeMpSv); \ ++ } STMT_END ++#endif ++ ++#ifndef sv_catpvn_mg ++# define sv_catpvn_mg(sv, ptr, len) \ ++ STMT_START { \ ++ SV *TeMpSv = sv; \ ++ sv_catpvn(TeMpSv,ptr,len); \ ++ SvSETMAGIC(TeMpSv); \ ++ } STMT_END ++#endif ++ ++#ifndef sv_catsv_mg ++# define sv_catsv_mg(dsv, ssv) \ ++ STMT_START { \ ++ SV *TeMpSv = dsv; \ ++ sv_catsv(TeMpSv,ssv); \ ++ SvSETMAGIC(TeMpSv); \ ++ } STMT_END ++#endif ++ ++#ifndef sv_setiv_mg ++# define sv_setiv_mg(sv, i) \ ++ STMT_START { \ ++ SV *TeMpSv = sv; \ ++ sv_setiv(TeMpSv,i); \ ++ SvSETMAGIC(TeMpSv); \ ++ } STMT_END ++#endif ++ ++#ifndef sv_setnv_mg ++# define sv_setnv_mg(sv, num) \ ++ STMT_START { \ ++ SV *TeMpSv = sv; \ ++ sv_setnv(TeMpSv,num); \ ++ SvSETMAGIC(TeMpSv); \ ++ } STMT_END ++#endif ++ ++#ifndef sv_setpv_mg ++# define sv_setpv_mg(sv, ptr) \ ++ STMT_START { \ ++ SV *TeMpSv = sv; \ ++ sv_setpv(TeMpSv,ptr); \ ++ SvSETMAGIC(TeMpSv); \ ++ } STMT_END ++#endif ++ ++#ifndef sv_setpvn_mg ++# define sv_setpvn_mg(sv, ptr, len) \ ++ STMT_START { \ ++ SV *TeMpSv = sv; \ ++ sv_setpvn(TeMpSv,ptr,len); \ ++ SvSETMAGIC(TeMpSv); \ ++ } STMT_END ++#endif ++ ++#ifndef sv_setsv_mg ++# define sv_setsv_mg(dsv, ssv) \ ++ STMT_START { \ ++ SV *TeMpSv = dsv; \ ++ sv_setsv(TeMpSv,ssv); \ ++ SvSETMAGIC(TeMpSv); \ ++ } STMT_END ++#endif ++ ++#ifndef sv_setuv_mg ++# define sv_setuv_mg(sv, i) \ ++ STMT_START { \ ++ SV *TeMpSv = sv; \ ++ sv_setuv(TeMpSv,i); \ ++ SvSETMAGIC(TeMpSv); \ ++ } STMT_END ++#endif ++ ++#ifndef sv_usepvn_mg ++# define sv_usepvn_mg(sv, ptr, len) \ ++ STMT_START { \ ++ SV *TeMpSv = sv; \ ++ sv_usepvn(TeMpSv,ptr,len); \ ++ SvSETMAGIC(TeMpSv); \ ++ } STMT_END ++#endif ++#ifndef SvVSTRING_mg ++# define SvVSTRING_mg(sv) (SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_vstring) : NULL) ++#endif ++ ++/* Hint: sv_magic_portable ++ * This is a compatibility function that is only available with ++ * Devel::PPPort. It is NOT in the perl core. ++ * Its purpose is to mimic the 5.8.0 behaviour of sv_magic() when ++ * it is being passed a name pointer with namlen == 0. In that ++ * case, perl 5.8.0 and later store the pointer, not a copy of it. ++ * The compatibility can be provided back to perl 5.004. With ++ * earlier versions, the code will not compile. ++ */ ++ ++#if (PERL_BCDVERSION < 0x5004000) ++ ++ /* code that uses sv_magic_portable will not compile */ ++ ++#elif (PERL_BCDVERSION < 0x5008000) ++ ++# define sv_magic_portable(sv, obj, how, name, namlen) \ ++ STMT_START { \ ++ SV *SvMp_sv = (sv); \ ++ char *SvMp_name = (char *) (name); \ ++ I32 SvMp_namlen = (namlen); \ ++ if (SvMp_name && SvMp_namlen == 0) \ ++ { \ ++ MAGIC *mg; \ ++ sv_magic(SvMp_sv, obj, how, 0, 0); \ ++ mg = SvMAGIC(SvMp_sv); \ ++ mg->mg_len = -42; /* XXX: this is the tricky part */ \ ++ mg->mg_ptr = SvMp_name; \ ++ } \ ++ else \ ++ { \ ++ sv_magic(SvMp_sv, obj, how, SvMp_name, SvMp_namlen); \ ++ } \ ++ } STMT_END ++ ++#else ++ ++# define sv_magic_portable(a, b, c, d, e) sv_magic(a, b, c, d, e) ++ ++#endif ++ ++#ifdef USE_ITHREADS ++#ifndef CopFILE ++# define CopFILE(c) ((c)->cop_file) ++#endif ++ ++#ifndef CopFILEGV ++# define CopFILEGV(c) (CopFILE(c) ? gv_fetchfile(CopFILE(c)) : Nullgv) ++#endif ++ ++#ifndef CopFILE_set ++# define CopFILE_set(c,pv) ((c)->cop_file = savepv(pv)) ++#endif ++ ++#ifndef CopFILESV ++# define CopFILESV(c) (CopFILE(c) ? GvSV(gv_fetchfile(CopFILE(c))) : Nullsv) ++#endif ++ ++#ifndef CopFILEAV ++# define CopFILEAV(c) (CopFILE(c) ? GvAV(gv_fetchfile(CopFILE(c))) : Nullav) ++#endif ++ ++#ifndef CopSTASHPV ++# define CopSTASHPV(c) ((c)->cop_stashpv) ++#endif ++ ++#ifndef CopSTASHPV_set ++# define CopSTASHPV_set(c,pv) ((c)->cop_stashpv = ((pv) ? savepv(pv) : Nullch)) ++#endif ++ ++#ifndef CopSTASH ++# define CopSTASH(c) (CopSTASHPV(c) ? gv_stashpv(CopSTASHPV(c),GV_ADD) : Nullhv) ++#endif ++ ++#ifndef CopSTASH_set ++# define CopSTASH_set(c,hv) CopSTASHPV_set(c, (hv) ? HvNAME(hv) : Nullch) ++#endif ++ ++#ifndef CopSTASH_eq ++# define CopSTASH_eq(c,hv) ((hv) && (CopSTASHPV(c) == HvNAME(hv) \ ++ || (CopSTASHPV(c) && HvNAME(hv) \ ++ && strEQ(CopSTASHPV(c), HvNAME(hv))))) ++#endif ++ ++#else ++#ifndef CopFILEGV ++# define CopFILEGV(c) ((c)->cop_filegv) ++#endif ++ ++#ifndef CopFILEGV_set ++# define CopFILEGV_set(c,gv) ((c)->cop_filegv = (GV*)SvREFCNT_inc(gv)) ++#endif ++ ++#ifndef CopFILE_set ++# define CopFILE_set(c,pv) CopFILEGV_set((c), gv_fetchfile(pv)) ++#endif ++ ++#ifndef CopFILESV ++# define CopFILESV(c) (CopFILEGV(c) ? GvSV(CopFILEGV(c)) : Nullsv) ++#endif ++ ++#ifndef CopFILEAV ++# define CopFILEAV(c) (CopFILEGV(c) ? GvAV(CopFILEGV(c)) : Nullav) ++#endif ++ ++#ifndef CopFILE ++# define CopFILE(c) (CopFILESV(c) ? SvPVX(CopFILESV(c)) : Nullch) ++#endif ++ ++#ifndef CopSTASH ++# define CopSTASH(c) ((c)->cop_stash) ++#endif ++ ++#ifndef CopSTASH_set ++# define CopSTASH_set(c,hv) ((c)->cop_stash = (hv)) ++#endif ++ ++#ifndef CopSTASHPV ++# define CopSTASHPV(c) (CopSTASH(c) ? HvNAME(CopSTASH(c)) : Nullch) ++#endif ++ ++#ifndef CopSTASHPV_set ++# define CopSTASHPV_set(c,pv) CopSTASH_set((c), gv_stashpv(pv,GV_ADD)) ++#endif ++ ++#ifndef CopSTASH_eq ++# define CopSTASH_eq(c,hv) (CopSTASH(c) == (hv)) ++#endif ++ ++#endif /* USE_ITHREADS */ ++#ifndef IN_PERL_COMPILETIME ++# define IN_PERL_COMPILETIME (PL_curcop == &PL_compiling) ++#endif ++ ++#ifndef IN_LOCALE_RUNTIME ++# define IN_LOCALE_RUNTIME (PL_curcop->op_private & HINT_LOCALE) ++#endif ++ ++#ifndef IN_LOCALE_COMPILETIME ++# define IN_LOCALE_COMPILETIME (PL_hints & HINT_LOCALE) ++#endif ++ ++#ifndef IN_LOCALE ++# define IN_LOCALE (IN_PERL_COMPILETIME ? IN_LOCALE_COMPILETIME : IN_LOCALE_RUNTIME) ++#endif ++#ifndef IS_NUMBER_IN_UV ++# define IS_NUMBER_IN_UV 0x01 ++#endif ++ ++#ifndef IS_NUMBER_GREATER_THAN_UV_MAX ++# define IS_NUMBER_GREATER_THAN_UV_MAX 0x02 ++#endif ++ ++#ifndef IS_NUMBER_NOT_INT ++# define IS_NUMBER_NOT_INT 0x04 ++#endif ++ ++#ifndef IS_NUMBER_NEG ++# define IS_NUMBER_NEG 0x08 ++#endif ++ ++#ifndef IS_NUMBER_INFINITY ++# define IS_NUMBER_INFINITY 0x10 ++#endif ++ ++#ifndef IS_NUMBER_NAN ++# define IS_NUMBER_NAN 0x20 ++#endif ++#ifndef GROK_NUMERIC_RADIX ++# define GROK_NUMERIC_RADIX(sp, send) grok_numeric_radix(sp, send) ++#endif ++#ifndef PERL_SCAN_GREATER_THAN_UV_MAX ++# define PERL_SCAN_GREATER_THAN_UV_MAX 0x02 ++#endif ++ ++#ifndef PERL_SCAN_SILENT_ILLDIGIT ++# define PERL_SCAN_SILENT_ILLDIGIT 0x04 ++#endif ++ ++#ifndef PERL_SCAN_ALLOW_UNDERSCORES ++# define PERL_SCAN_ALLOW_UNDERSCORES 0x01 ++#endif ++ ++#ifndef PERL_SCAN_DISALLOW_PREFIX ++# define PERL_SCAN_DISALLOW_PREFIX 0x02 ++#endif ++ ++#ifndef grok_numeric_radix ++#if defined(NEED_grok_numeric_radix) ++static bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send); ++static ++#else ++extern bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send); ++#endif ++ ++#ifdef grok_numeric_radix ++# undef grok_numeric_radix ++#endif ++#define grok_numeric_radix(a,b) DPPP_(my_grok_numeric_radix)(aTHX_ a,b) ++#define Perl_grok_numeric_radix DPPP_(my_grok_numeric_radix) ++ ++#if defined(NEED_grok_numeric_radix) || defined(NEED_grok_numeric_radix_GLOBAL) ++bool ++DPPP_(my_grok_numeric_radix)(pTHX_ const char **sp, const char *send) ++{ ++#ifdef USE_LOCALE_NUMERIC ++#ifdef PL_numeric_radix_sv ++ if (PL_numeric_radix_sv && IN_LOCALE) { ++ STRLEN len; ++ char* radix = SvPV(PL_numeric_radix_sv, len); ++ if (*sp + len <= send && memEQ(*sp, radix, len)) { ++ *sp += len; ++ return TRUE; ++ } ++ } ++#else ++ /* older perls don't have PL_numeric_radix_sv so the radix ++ * must manually be requested from locale.h ++ */ ++#include ++ dTHR; /* needed for older threaded perls */ ++ struct lconv *lc = localeconv(); ++ char *radix = lc->decimal_point; ++ if (radix && IN_LOCALE) { ++ STRLEN len = strlen(radix); ++ if (*sp + len <= send && memEQ(*sp, radix, len)) { ++ *sp += len; ++ return TRUE; ++ } ++ } ++#endif ++#endif /* USE_LOCALE_NUMERIC */ ++ /* always try "." if numeric radix didn't match because ++ * we may have data from different locales mixed */ ++ if (*sp < send && **sp == '.') { ++ ++*sp; ++ return TRUE; ++ } ++ return FALSE; ++} ++#endif ++#endif ++ ++#ifndef grok_number ++#if defined(NEED_grok_number) ++static int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep); ++static ++#else ++extern int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep); ++#endif ++ ++#ifdef grok_number ++# undef grok_number ++#endif ++#define grok_number(a,b,c) DPPP_(my_grok_number)(aTHX_ a,b,c) ++#define Perl_grok_number DPPP_(my_grok_number) ++ ++#if defined(NEED_grok_number) || defined(NEED_grok_number_GLOBAL) ++int ++DPPP_(my_grok_number)(pTHX_ const char *pv, STRLEN len, UV *valuep) ++{ ++ const char *s = pv; ++ const char *send = pv + len; ++ const UV max_div_10 = UV_MAX / 10; ++ const char max_mod_10 = UV_MAX % 10; ++ int numtype = 0; ++ int sawinf = 0; ++ int sawnan = 0; ++ ++ while (s < send && isSPACE(*s)) ++ s++; ++ if (s == send) { ++ return 0; ++ } else if (*s == '-') { ++ s++; ++ numtype = IS_NUMBER_NEG; ++ } ++ else if (*s == '+') ++ s++; ++ ++ if (s == send) ++ return 0; ++ ++ /* next must be digit or the radix separator or beginning of infinity */ ++ if (isDIGIT(*s)) { ++ /* UVs are at least 32 bits, so the first 9 decimal digits cannot ++ overflow. */ ++ UV value = *s - '0'; ++ /* This construction seems to be more optimiser friendly. ++ (without it gcc does the isDIGIT test and the *s - '0' separately) ++ With it gcc on arm is managing 6 instructions (6 cycles) per digit. ++ In theory the optimiser could deduce how far to unroll the loop ++ before checking for overflow. */ ++ if (++s < send) { ++ int digit = *s - '0'; ++ if (digit >= 0 && digit <= 9) { ++ value = value * 10 + digit; ++ if (++s < send) { ++ digit = *s - '0'; ++ if (digit >= 0 && digit <= 9) { ++ value = value * 10 + digit; ++ if (++s < send) { ++ digit = *s - '0'; ++ if (digit >= 0 && digit <= 9) { ++ value = value * 10 + digit; ++ if (++s < send) { ++ digit = *s - '0'; ++ if (digit >= 0 && digit <= 9) { ++ value = value * 10 + digit; ++ if (++s < send) { ++ digit = *s - '0'; ++ if (digit >= 0 && digit <= 9) { ++ value = value * 10 + digit; ++ if (++s < send) { ++ digit = *s - '0'; ++ if (digit >= 0 && digit <= 9) { ++ value = value * 10 + digit; ++ if (++s < send) { ++ digit = *s - '0'; ++ if (digit >= 0 && digit <= 9) { ++ value = value * 10 + digit; ++ if (++s < send) { ++ digit = *s - '0'; ++ if (digit >= 0 && digit <= 9) { ++ value = value * 10 + digit; ++ if (++s < send) { ++ /* Now got 9 digits, so need to check ++ each time for overflow. */ ++ digit = *s - '0'; ++ while (digit >= 0 && digit <= 9 ++ && (value < max_div_10 ++ || (value == max_div_10 ++ && digit <= max_mod_10))) { ++ value = value * 10 + digit; ++ if (++s < send) ++ digit = *s - '0'; ++ else ++ break; ++ } ++ if (digit >= 0 && digit <= 9 ++ && (s < send)) { ++ /* value overflowed. ++ skip the remaining digits, don't ++ worry about setting *valuep. */ ++ do { ++ s++; ++ } while (s < send && isDIGIT(*s)); ++ numtype |= ++ IS_NUMBER_GREATER_THAN_UV_MAX; ++ goto skip_value; ++ } ++ } ++ } ++ } ++ } ++ } ++ } ++ } ++ } ++ } ++ } ++ } ++ } ++ } ++ } ++ } ++ } ++ } ++ numtype |= IS_NUMBER_IN_UV; ++ if (valuep) ++ *valuep = value; ++ ++ skip_value: ++ if (GROK_NUMERIC_RADIX(&s, send)) { ++ numtype |= IS_NUMBER_NOT_INT; ++ while (s < send && isDIGIT(*s)) /* optional digits after the radix */ ++ s++; ++ } ++ } ++ else if (GROK_NUMERIC_RADIX(&s, send)) { ++ numtype |= IS_NUMBER_NOT_INT | IS_NUMBER_IN_UV; /* valuep assigned below */ ++ /* no digits before the radix means we need digits after it */ ++ if (s < send && isDIGIT(*s)) { ++ do { ++ s++; ++ } while (s < send && isDIGIT(*s)); ++ if (valuep) { ++ /* integer approximation is valid - it's 0. */ ++ *valuep = 0; ++ } ++ } ++ else ++ return 0; ++ } else if (*s == 'I' || *s == 'i') { ++ s++; if (s == send || (*s != 'N' && *s != 'n')) return 0; ++ s++; if (s == send || (*s != 'F' && *s != 'f')) return 0; ++ s++; if (s < send && (*s == 'I' || *s == 'i')) { ++ s++; if (s == send || (*s != 'N' && *s != 'n')) return 0; ++ s++; if (s == send || (*s != 'I' && *s != 'i')) return 0; ++ s++; if (s == send || (*s != 'T' && *s != 't')) return 0; ++ s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0; ++ s++; ++ } ++ sawinf = 1; ++ } else if (*s == 'N' || *s == 'n') { ++ /* XXX TODO: There are signaling NaNs and quiet NaNs. */ ++ s++; if (s == send || (*s != 'A' && *s != 'a')) return 0; ++ s++; if (s == send || (*s != 'N' && *s != 'n')) return 0; ++ s++; ++ sawnan = 1; ++ } else ++ return 0; ++ ++ if (sawinf) { ++ numtype &= IS_NUMBER_NEG; /* Keep track of sign */ ++ numtype |= IS_NUMBER_INFINITY | IS_NUMBER_NOT_INT; ++ } else if (sawnan) { ++ numtype &= IS_NUMBER_NEG; /* Keep track of sign */ ++ numtype |= IS_NUMBER_NAN | IS_NUMBER_NOT_INT; ++ } else if (s < send) { ++ /* we can have an optional exponent part */ ++ if (*s == 'e' || *s == 'E') { ++ /* The only flag we keep is sign. Blow away any "it's UV" */ ++ numtype &= IS_NUMBER_NEG; ++ numtype |= IS_NUMBER_NOT_INT; ++ s++; ++ if (s < send && (*s == '-' || *s == '+')) ++ s++; ++ if (s < send && isDIGIT(*s)) { ++ do { ++ s++; ++ } while (s < send && isDIGIT(*s)); ++ } ++ else ++ return 0; ++ } ++ } ++ while (s < send && isSPACE(*s)) ++ s++; ++ if (s >= send) ++ return numtype; ++ if (len == 10 && memEQ(pv, "0 but true", 10)) { ++ if (valuep) ++ *valuep = 0; ++ return IS_NUMBER_IN_UV; ++ } ++ return 0; ++} ++#endif ++#endif ++ ++/* ++ * The grok_* routines have been modified to use warn() instead of ++ * Perl_warner(). Also, 'hexdigit' was the former name of PL_hexdigit, ++ * which is why the stack variable has been renamed to 'xdigit'. ++ */ ++ ++#ifndef grok_bin ++#if defined(NEED_grok_bin) ++static UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result); ++static ++#else ++extern UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result); ++#endif ++ ++#ifdef grok_bin ++# undef grok_bin ++#endif ++#define grok_bin(a,b,c,d) DPPP_(my_grok_bin)(aTHX_ a,b,c,d) ++#define Perl_grok_bin DPPP_(my_grok_bin) ++ ++#if defined(NEED_grok_bin) || defined(NEED_grok_bin_GLOBAL) ++UV ++DPPP_(my_grok_bin)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) ++{ ++ const char *s = start; ++ STRLEN len = *len_p; ++ UV value = 0; ++ NV value_nv = 0; ++ ++ const UV max_div_2 = UV_MAX / 2; ++ bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES; ++ bool overflowed = FALSE; ++ ++ if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) { ++ /* strip off leading b or 0b. ++ for compatibility silently suffer "b" and "0b" as valid binary ++ numbers. */ ++ if (len >= 1) { ++ if (s[0] == 'b') { ++ s++; ++ len--; ++ } ++ else if (len >= 2 && s[0] == '0' && s[1] == 'b') { ++ s+=2; ++ len-=2; ++ } ++ } ++ } ++ ++ for (; len-- && *s; s++) { ++ char bit = *s; ++ if (bit == '0' || bit == '1') { ++ /* Write it in this wonky order with a goto to attempt to get the ++ compiler to make the common case integer-only loop pretty tight. ++ With gcc seems to be much straighter code than old scan_bin. */ ++ redo: ++ if (!overflowed) { ++ if (value <= max_div_2) { ++ value = (value << 1) | (bit - '0'); ++ continue; ++ } ++ /* Bah. We're just overflowed. */ ++ warn("Integer overflow in binary number"); ++ overflowed = TRUE; ++ value_nv = (NV) value; ++ } ++ value_nv *= 2.0; ++ /* If an NV has not enough bits in its mantissa to ++ * represent a UV this summing of small low-order numbers ++ * is a waste of time (because the NV cannot preserve ++ * the low-order bits anyway): we could just remember when ++ * did we overflow and in the end just multiply value_nv by the ++ * right amount. */ ++ value_nv += (NV)(bit - '0'); ++ continue; ++ } ++ if (bit == '_' && len && allow_underscores && (bit = s[1]) ++ && (bit == '0' || bit == '1')) ++ { ++ --len; ++ ++s; ++ goto redo; ++ } ++ if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT)) ++ warn("Illegal binary digit '%c' ignored", *s); ++ break; ++ } ++ ++ if ( ( overflowed && value_nv > 4294967295.0) ++#if UVSIZE > 4 ++ || (!overflowed && value > 0xffffffff ) ++#endif ++ ) { ++ warn("Binary number > 0b11111111111111111111111111111111 non-portable"); ++ } ++ *len_p = s - start; ++ if (!overflowed) { ++ *flags = 0; ++ return value; ++ } ++ *flags = PERL_SCAN_GREATER_THAN_UV_MAX; ++ if (result) ++ *result = value_nv; ++ return UV_MAX; ++} ++#endif ++#endif ++ ++#ifndef grok_hex ++#if defined(NEED_grok_hex) ++static UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result); ++static ++#else ++extern UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result); ++#endif ++ ++#ifdef grok_hex ++# undef grok_hex ++#endif ++#define grok_hex(a,b,c,d) DPPP_(my_grok_hex)(aTHX_ a,b,c,d) ++#define Perl_grok_hex DPPP_(my_grok_hex) ++ ++#if defined(NEED_grok_hex) || defined(NEED_grok_hex_GLOBAL) ++UV ++DPPP_(my_grok_hex)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) ++{ ++ const char *s = start; ++ STRLEN len = *len_p; ++ UV value = 0; ++ NV value_nv = 0; ++ ++ const UV max_div_16 = UV_MAX / 16; ++ bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES; ++ bool overflowed = FALSE; ++ const char *xdigit; ++ ++ if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) { ++ /* strip off leading x or 0x. ++ for compatibility silently suffer "x" and "0x" as valid hex numbers. ++ */ ++ if (len >= 1) { ++ if (s[0] == 'x') { ++ s++; ++ len--; ++ } ++ else if (len >= 2 && s[0] == '0' && s[1] == 'x') { ++ s+=2; ++ len-=2; ++ } ++ } ++ } ++ ++ for (; len-- && *s; s++) { ++ xdigit = strchr((char *) PL_hexdigit, *s); ++ if (xdigit) { ++ /* Write it in this wonky order with a goto to attempt to get the ++ compiler to make the common case integer-only loop pretty tight. ++ With gcc seems to be much straighter code than old scan_hex. */ ++ redo: ++ if (!overflowed) { ++ if (value <= max_div_16) { ++ value = (value << 4) | ((xdigit - PL_hexdigit) & 15); ++ continue; ++ } ++ warn("Integer overflow in hexadecimal number"); ++ overflowed = TRUE; ++ value_nv = (NV) value; ++ } ++ value_nv *= 16.0; ++ /* If an NV has not enough bits in its mantissa to ++ * represent a UV this summing of small low-order numbers ++ * is a waste of time (because the NV cannot preserve ++ * the low-order bits anyway): we could just remember when ++ * did we overflow and in the end just multiply value_nv by the ++ * right amount of 16-tuples. */ ++ value_nv += (NV)((xdigit - PL_hexdigit) & 15); ++ continue; ++ } ++ if (*s == '_' && len && allow_underscores && s[1] ++ && (xdigit = strchr((char *) PL_hexdigit, s[1]))) ++ { ++ --len; ++ ++s; ++ goto redo; ++ } ++ if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT)) ++ warn("Illegal hexadecimal digit '%c' ignored", *s); ++ break; ++ } ++ ++ if ( ( overflowed && value_nv > 4294967295.0) ++#if UVSIZE > 4 ++ || (!overflowed && value > 0xffffffff ) ++#endif ++ ) { ++ warn("Hexadecimal number > 0xffffffff non-portable"); ++ } ++ *len_p = s - start; ++ if (!overflowed) { ++ *flags = 0; ++ return value; ++ } ++ *flags = PERL_SCAN_GREATER_THAN_UV_MAX; ++ if (result) ++ *result = value_nv; ++ return UV_MAX; ++} ++#endif ++#endif ++ ++#ifndef grok_oct ++#if defined(NEED_grok_oct) ++static UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result); ++static ++#else ++extern UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result); ++#endif ++ ++#ifdef grok_oct ++# undef grok_oct ++#endif ++#define grok_oct(a,b,c,d) DPPP_(my_grok_oct)(aTHX_ a,b,c,d) ++#define Perl_grok_oct DPPP_(my_grok_oct) ++ ++#if defined(NEED_grok_oct) || defined(NEED_grok_oct_GLOBAL) ++UV ++DPPP_(my_grok_oct)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) ++{ ++ const char *s = start; ++ STRLEN len = *len_p; ++ UV value = 0; ++ NV value_nv = 0; ++ ++ const UV max_div_8 = UV_MAX / 8; ++ bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES; ++ bool overflowed = FALSE; ++ ++ for (; len-- && *s; s++) { ++ /* gcc 2.95 optimiser not smart enough to figure that this subtraction ++ out front allows slicker code. */ ++ int digit = *s - '0'; ++ if (digit >= 0 && digit <= 7) { ++ /* Write it in this wonky order with a goto to attempt to get the ++ compiler to make the common case integer-only loop pretty tight. ++ */ ++ redo: ++ if (!overflowed) { ++ if (value <= max_div_8) { ++ value = (value << 3) | digit; ++ continue; ++ } ++ /* Bah. We're just overflowed. */ ++ warn("Integer overflow in octal number"); ++ overflowed = TRUE; ++ value_nv = (NV) value; ++ } ++ value_nv *= 8.0; ++ /* If an NV has not enough bits in its mantissa to ++ * represent a UV this summing of small low-order numbers ++ * is a waste of time (because the NV cannot preserve ++ * the low-order bits anyway): we could just remember when ++ * did we overflow and in the end just multiply value_nv by the ++ * right amount of 8-tuples. */ ++ value_nv += (NV)digit; ++ continue; ++ } ++ if (digit == ('_' - '0') && len && allow_underscores ++ && (digit = s[1] - '0') && (digit >= 0 && digit <= 7)) ++ { ++ --len; ++ ++s; ++ goto redo; ++ } ++ /* Allow \octal to work the DWIM way (that is, stop scanning ++ * as soon as non-octal characters are seen, complain only iff ++ * someone seems to want to use the digits eight and nine). */ ++ if (digit == 8 || digit == 9) { ++ if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT)) ++ warn("Illegal octal digit '%c' ignored", *s); ++ } ++ break; ++ } ++ ++ if ( ( overflowed && value_nv > 4294967295.0) ++#if UVSIZE > 4 ++ || (!overflowed && value > 0xffffffff ) ++#endif ++ ) { ++ warn("Octal number > 037777777777 non-portable"); ++ } ++ *len_p = s - start; ++ if (!overflowed) { ++ *flags = 0; ++ return value; ++ } ++ *flags = PERL_SCAN_GREATER_THAN_UV_MAX; ++ if (result) ++ *result = value_nv; ++ return UV_MAX; ++} ++#endif ++#endif ++ ++#if !defined(my_snprintf) ++#if defined(NEED_my_snprintf) ++static int DPPP_(my_my_snprintf)(char * buffer, const Size_t len, const char * format, ...); ++static ++#else ++extern int DPPP_(my_my_snprintf)(char * buffer, const Size_t len, const char * format, ...); ++#endif ++ ++#define my_snprintf DPPP_(my_my_snprintf) ++#define Perl_my_snprintf DPPP_(my_my_snprintf) ++ ++#if defined(NEED_my_snprintf) || defined(NEED_my_snprintf_GLOBAL) ++ ++int ++DPPP_(my_my_snprintf)(char *buffer, const Size_t len, const char *format, ...) ++{ ++ dTHX; ++ int retval; ++ va_list ap; ++ va_start(ap, format); ++#ifdef HAS_VSNPRINTF ++ retval = vsnprintf(buffer, len, format, ap); ++#else ++ retval = vsprintf(buffer, format, ap); ++#endif ++ va_end(ap); ++ if (retval < 0 || (len > 0 && (Size_t)retval >= len)) ++ Perl_croak(aTHX_ "panic: my_snprintf buffer overflow"); ++ return retval; ++} ++ ++#endif ++#endif ++ ++#if !defined(my_sprintf) ++#if defined(NEED_my_sprintf) ++static int DPPP_(my_my_sprintf)(char * buffer, const char * pat, ...); ++static ++#else ++extern int DPPP_(my_my_sprintf)(char * buffer, const char * pat, ...); ++#endif ++ ++#define my_sprintf DPPP_(my_my_sprintf) ++#define Perl_my_sprintf DPPP_(my_my_sprintf) ++ ++#if defined(NEED_my_sprintf) || defined(NEED_my_sprintf_GLOBAL) ++ ++int ++DPPP_(my_my_sprintf)(char *buffer, const char* pat, ...) ++{ ++ va_list args; ++ va_start(args, pat); ++ vsprintf(buffer, pat, args); ++ va_end(args); ++ return strlen(buffer); ++} ++ ++#endif ++#endif ++ ++#ifdef NO_XSLOCKS ++# ifdef dJMPENV ++# define dXCPT dJMPENV; int rEtV = 0 ++# define XCPT_TRY_START JMPENV_PUSH(rEtV); if (rEtV == 0) ++# define XCPT_TRY_END JMPENV_POP; ++# define XCPT_CATCH if (rEtV != 0) ++# define XCPT_RETHROW JMPENV_JUMP(rEtV) ++# else ++# define dXCPT Sigjmp_buf oldTOP; int rEtV = 0 ++# define XCPT_TRY_START Copy(top_env, oldTOP, 1, Sigjmp_buf); rEtV = Sigsetjmp(top_env, 1); if (rEtV == 0) ++# define XCPT_TRY_END Copy(oldTOP, top_env, 1, Sigjmp_buf); ++# define XCPT_CATCH if (rEtV != 0) ++# define XCPT_RETHROW Siglongjmp(top_env, rEtV) ++# endif ++#endif ++ ++#if !defined(my_strlcat) ++#if defined(NEED_my_strlcat) ++static Size_t DPPP_(my_my_strlcat)(char * dst, const char * src, Size_t size); ++static ++#else ++extern Size_t DPPP_(my_my_strlcat)(char * dst, const char * src, Size_t size); ++#endif ++ ++#define my_strlcat DPPP_(my_my_strlcat) ++#define Perl_my_strlcat DPPP_(my_my_strlcat) ++ ++#if defined(NEED_my_strlcat) || defined(NEED_my_strlcat_GLOBAL) ++ ++Size_t ++DPPP_(my_my_strlcat)(char *dst, const char *src, Size_t size) ++{ ++ Size_t used, length, copy; ++ ++ used = strlen(dst); ++ length = strlen(src); ++ if (size > 0 && used < size - 1) { ++ copy = (length >= size - used) ? size - used - 1 : length; ++ memcpy(dst + used, src, copy); ++ dst[used + copy] = '\0'; ++ } ++ return used + length; ++} ++#endif ++#endif ++ ++#if !defined(my_strlcpy) ++#if defined(NEED_my_strlcpy) ++static Size_t DPPP_(my_my_strlcpy)(char * dst, const char * src, Size_t size); ++static ++#else ++extern Size_t DPPP_(my_my_strlcpy)(char * dst, const char * src, Size_t size); ++#endif ++ ++#define my_strlcpy DPPP_(my_my_strlcpy) ++#define Perl_my_strlcpy DPPP_(my_my_strlcpy) ++ ++#if defined(NEED_my_strlcpy) || defined(NEED_my_strlcpy_GLOBAL) ++ ++Size_t ++DPPP_(my_my_strlcpy)(char *dst, const char *src, Size_t size) ++{ ++ Size_t length, copy; ++ ++ length = strlen(src); ++ if (size > 0) { ++ copy = (length >= size) ? size - 1 : length; ++ memcpy(dst, src, copy); ++ dst[copy] = '\0'; ++ } ++ return length; ++} ++ ++#endif ++#endif ++#ifndef PERL_PV_ESCAPE_QUOTE ++# define PERL_PV_ESCAPE_QUOTE 0x0001 ++#endif ++ ++#ifndef PERL_PV_PRETTY_QUOTE ++# define PERL_PV_PRETTY_QUOTE PERL_PV_ESCAPE_QUOTE ++#endif ++ ++#ifndef PERL_PV_PRETTY_ELLIPSES ++# define PERL_PV_PRETTY_ELLIPSES 0x0002 ++#endif ++ ++#ifndef PERL_PV_PRETTY_LTGT ++# define PERL_PV_PRETTY_LTGT 0x0004 ++#endif ++ ++#ifndef PERL_PV_ESCAPE_FIRSTCHAR ++# define PERL_PV_ESCAPE_FIRSTCHAR 0x0008 ++#endif ++ ++#ifndef PERL_PV_ESCAPE_UNI ++# define PERL_PV_ESCAPE_UNI 0x0100 ++#endif ++ ++#ifndef PERL_PV_ESCAPE_UNI_DETECT ++# define PERL_PV_ESCAPE_UNI_DETECT 0x0200 ++#endif ++ ++#ifndef PERL_PV_ESCAPE_ALL ++# define PERL_PV_ESCAPE_ALL 0x1000 ++#endif ++ ++#ifndef PERL_PV_ESCAPE_NOBACKSLASH ++# define PERL_PV_ESCAPE_NOBACKSLASH 0x2000 ++#endif ++ ++#ifndef PERL_PV_ESCAPE_NOCLEAR ++# define PERL_PV_ESCAPE_NOCLEAR 0x4000 ++#endif ++ ++#ifndef PERL_PV_ESCAPE_RE ++# define PERL_PV_ESCAPE_RE 0x8000 ++#endif ++ ++#ifndef PERL_PV_PRETTY_NOCLEAR ++# define PERL_PV_PRETTY_NOCLEAR PERL_PV_ESCAPE_NOCLEAR ++#endif ++#ifndef PERL_PV_PRETTY_DUMP ++# define PERL_PV_PRETTY_DUMP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_QUOTE ++#endif ++ ++#ifndef PERL_PV_PRETTY_REGPROP ++# define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE ++#endif ++ ++/* Hint: pv_escape ++ * Note that unicode functionality is only backported to ++ * those perl versions that support it. For older perl ++ * versions, the implementation will fall back to bytes. ++ */ ++ ++#ifndef pv_escape ++#if defined(NEED_pv_escape) ++static char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags); ++static ++#else ++extern char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags); ++#endif ++ ++#ifdef pv_escape ++# undef pv_escape ++#endif ++#define pv_escape(a,b,c,d,e,f) DPPP_(my_pv_escape)(aTHX_ a,b,c,d,e,f) ++#define Perl_pv_escape DPPP_(my_pv_escape) ++ ++#if defined(NEED_pv_escape) || defined(NEED_pv_escape_GLOBAL) ++ ++char * ++DPPP_(my_pv_escape)(pTHX_ SV *dsv, char const * const str, ++ const STRLEN count, const STRLEN max, ++ STRLEN * const escaped, const U32 flags) ++{ ++ const char esc = flags & PERL_PV_ESCAPE_RE ? '%' : '\\'; ++ const char dq = flags & PERL_PV_ESCAPE_QUOTE ? '"' : esc; ++ char octbuf[32] = "%123456789ABCDF"; ++ STRLEN wrote = 0; ++ STRLEN chsize = 0; ++ STRLEN readsize = 1; ++#if defined(is_utf8_string) && defined(utf8_to_uvchr) ++ bool isuni = flags & PERL_PV_ESCAPE_UNI ? 1 : 0; ++#endif ++ const char *pv = str; ++ const char * const end = pv + count; ++ octbuf[0] = esc; ++ ++ if (!(flags & PERL_PV_ESCAPE_NOCLEAR)) ++ sv_setpvs(dsv, ""); ++ ++#if defined(is_utf8_string) && defined(utf8_to_uvchr) ++ if ((flags & PERL_PV_ESCAPE_UNI_DETECT) && is_utf8_string((U8*)pv, count)) ++ isuni = 1; ++#endif ++ ++ for (; pv < end && (!max || wrote < max) ; pv += readsize) { ++ const UV u = ++#if defined(is_utf8_string) && defined(utf8_to_uvchr) ++ isuni ? utf8_to_uvchr((U8*)pv, &readsize) : ++#endif ++ (U8)*pv; ++ const U8 c = (U8)u & 0xFF; ++ ++ if (u > 255 || (flags & PERL_PV_ESCAPE_ALL)) { ++ if (flags & PERL_PV_ESCAPE_FIRSTCHAR) ++ chsize = my_snprintf(octbuf, sizeof octbuf, ++ "%"UVxf, u); ++ else ++ chsize = my_snprintf(octbuf, sizeof octbuf, ++ "%cx{%"UVxf"}", esc, u); ++ } else if (flags & PERL_PV_ESCAPE_NOBACKSLASH) { ++ chsize = 1; ++ } else { ++ if (c == dq || c == esc || !isPRINT(c)) { ++ chsize = 2; ++ switch (c) { ++ case '\\' : /* fallthrough */ ++ case '%' : if (c == esc) ++ octbuf[1] = esc; ++ else ++ chsize = 1; ++ break; ++ case '\v' : octbuf[1] = 'v'; break; ++ case '\t' : octbuf[1] = 't'; break; ++ case '\r' : octbuf[1] = 'r'; break; ++ case '\n' : octbuf[1] = 'n'; break; ++ case '\f' : octbuf[1] = 'f'; break; ++ case '"' : if (dq == '"') ++ octbuf[1] = '"'; ++ else ++ chsize = 1; ++ break; ++ default: chsize = my_snprintf(octbuf, sizeof octbuf, ++ pv < end && isDIGIT((U8)*(pv+readsize)) ++ ? "%c%03o" : "%c%o", esc, c); ++ } ++ } else { ++ chsize = 1; ++ } ++ } ++ if (max && wrote + chsize > max) { ++ break; ++ } else if (chsize > 1) { ++ sv_catpvn(dsv, octbuf, chsize); ++ wrote += chsize; ++ } else { ++ char tmp[2]; ++ my_snprintf(tmp, sizeof tmp, "%c", c); ++ sv_catpvn(dsv, tmp, 1); ++ wrote++; ++ } ++ if (flags & PERL_PV_ESCAPE_FIRSTCHAR) ++ break; ++ } ++ if (escaped != NULL) ++ *escaped= pv - str; ++ return SvPVX(dsv); ++} ++ ++#endif ++#endif ++ ++#ifndef pv_pretty ++#if defined(NEED_pv_pretty) ++static char * DPPP_(my_pv_pretty)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags); ++static ++#else ++extern char * DPPP_(my_pv_pretty)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags); ++#endif ++ ++#ifdef pv_pretty ++# undef pv_pretty ++#endif ++#define pv_pretty(a,b,c,d,e,f,g) DPPP_(my_pv_pretty)(aTHX_ a,b,c,d,e,f,g) ++#define Perl_pv_pretty DPPP_(my_pv_pretty) ++ ++#if defined(NEED_pv_pretty) || defined(NEED_pv_pretty_GLOBAL) ++ ++char * ++DPPP_(my_pv_pretty)(pTHX_ SV *dsv, char const * const str, const STRLEN count, ++ const STRLEN max, char const * const start_color, char const * const end_color, ++ const U32 flags) ++{ ++ const U8 dq = (flags & PERL_PV_PRETTY_QUOTE) ? '"' : '%'; ++ STRLEN escaped; ++ ++ if (!(flags & PERL_PV_PRETTY_NOCLEAR)) ++ sv_setpvs(dsv, ""); ++ ++ if (dq == '"') ++ sv_catpvs(dsv, "\""); ++ else if (flags & PERL_PV_PRETTY_LTGT) ++ sv_catpvs(dsv, "<"); ++ ++ if (start_color != NULL) ++ sv_catpv(dsv, D_PPP_CONSTPV_ARG(start_color)); ++ ++ pv_escape(dsv, str, count, max, &escaped, flags | PERL_PV_ESCAPE_NOCLEAR); ++ ++ if (end_color != NULL) ++ sv_catpv(dsv, D_PPP_CONSTPV_ARG(end_color)); ++ ++ if (dq == '"') ++ sv_catpvs(dsv, "\""); ++ else if (flags & PERL_PV_PRETTY_LTGT) ++ sv_catpvs(dsv, ">"); ++ ++ if ((flags & PERL_PV_PRETTY_ELLIPSES) && escaped < count) ++ sv_catpvs(dsv, "..."); ++ ++ return SvPVX(dsv); ++} ++ ++#endif ++#endif ++ ++#ifndef pv_display ++#if defined(NEED_pv_display) ++static char * DPPP_(my_pv_display)(pTHX_ SV * dsv, const char * pv, STRLEN cur, STRLEN len, STRLEN pvlim); ++static ++#else ++extern char * DPPP_(my_pv_display)(pTHX_ SV * dsv, const char * pv, STRLEN cur, STRLEN len, STRLEN pvlim); ++#endif ++ ++#ifdef pv_display ++# undef pv_display ++#endif ++#define pv_display(a,b,c,d,e) DPPP_(my_pv_display)(aTHX_ a,b,c,d,e) ++#define Perl_pv_display DPPP_(my_pv_display) ++ ++#if defined(NEED_pv_display) || defined(NEED_pv_display_GLOBAL) ++ ++char * ++DPPP_(my_pv_display)(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim) ++{ ++ pv_pretty(dsv, pv, cur, pvlim, NULL, NULL, PERL_PV_PRETTY_DUMP); ++ if (len > cur && pv[cur] == '\0') ++ sv_catpvs(dsv, "\\0"); ++ return SvPVX(dsv); ++} ++ ++#endif ++#endif ++ ++#endif /* _P_P_PORTABILITY_H_ */ ++ ++/* End of File ppport.h */ diff --git a/lang/perl-xml-parser/patches/020-xml-parser-expat-lib-inc-path-anchor.patch b/lang/perl-xml-parser/patches/020-xml-parser-expat-lib-inc-path-anchor.patch new file mode 100644 index 00000000..4e17daa1 --- /dev/null +++ b/lang/perl-xml-parser/patches/020-xml-parser-expat-lib-inc-path-anchor.patch @@ -0,0 +1,12 @@ +--- a/Expat/Makefile.PL ++++ b/Expat/Makefile.PL +@@ -2,6 +2,9 @@ use ExtUtils::MakeMaker; + use Config; + use English; + ++$expat_libpath = '%%EXPAT_LIBPATH%%'; ++$expat_incpath = '%%EXPAT_INCPATH%%'; ++ + my $libs = "-lexpat"; + my @extras = (); + diff --git a/lang/perl/Config.in b/lang/perl/Config.in new file mode 100644 index 00000000..65a3a47d --- /dev/null +++ b/lang/perl/Config.in @@ -0,0 +1,31 @@ +menu "Configuration" + depends on PACKAGE_perl + +config PERL_THREADS + bool "Enable threading support" + default y if (mips || mipsel || i386 || i686 || x86_64 || armeb || arm) + default n + +config PERL_TESTS + bool "Include perl tests" + default n + help + Include test suites for all perl packages. + + This will increase the size of perl and related packages + considerably. + Test support is still in development. Some tests will fail, + others are just missing completely. + +config PERL_NOCOMMENT + bool "Strip comments and pod sections from modules" + default y + help + Remove comments and pod sections for all perl packages. + + This will descrease the size of perl libraries moderately. + + Stripping occasionally gets confused and mangles valid code, + so disable this option if you're not pressed for space. + +endmenu diff --git a/lang/perl/Makefile b/lang/perl/Makefile new file mode 100644 index 00000000..86a4351a --- /dev/null +++ b/lang/perl/Makefile @@ -0,0 +1,186 @@ +# +# Copyright (C) 2006-2018 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +include perlver.mk + +PKG_NAME:=perl +PKG_VERSION:=$(PERL_VERSION) +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=\ + https://cpan.metacpan.org/src/5.0 \ + https://cpan.uib.no/src/5.0 \ + https://mirrors.rit.edu/CPAN/src/5.0 \ + https://mirror.transip.net/CPAN/src/5.0 \ + https://mirrors.sonic.net/cpan/src/5.0 \ + https://www.cpan.org/src/5.0 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_HASH:=059b3cb69970d8c8c5964caced0335b4af34ac990c8e61f7e3f90cd1c2d11e49 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE_FILES:=Copying Artistic README +PKG_MAINTAINER:=Marcel Denia , \ + Philip Prindeville + +# Build settings +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_NAME)-$(PKG_VERSION) +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/$(PKG_NAME)-$(PKG_VERSION) +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=perl/host +PKG_BUILD_PARALLEL:=1 +HOST_BUILD_PARALLEL:=1 + +# Variables used during configuration/build +HOST_PERL_PREFIX:=$(STAGING_DIR_HOSTPKG)/usr + +# Filter -g3, it will break Compress-Raw-Zlib +TARGET_CFLAGS_PERL:=$(patsubst -g3,-g,$(TARGET_CFLAGS)) +TARGET_CPPFLAGS_PERL:=$(patsubst -g3,-g,$(TARGET_CPPFLAGS)) + +# A list of disabled tests +# ExtUtils tests are disabled for now as we don't support building +# native extensions on the target machine at the moment +PERL_DISABLEDTESTS:=cpan/ExtUtils-Constant cpan/ExtUtils-MakeMaker +# We're on Linux, so don't even package them +PERL_DISABLEDTESTS+=cpan/Win32API-File cpan/Win32 ext/VMS-DCLsym ext/VMS-Filespec ext/VMS-Stdio ext/Win32CORE os2/ +# NDBM and ODBM not supported +PERL_DISABLEDTESTS+=ext/NDBM_File ext/ODBM_File + + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk +include perlmod.mk + +define Package/perl + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=The Perl intepreter + URL:=http://www.perl.com/ + DEPENDS:=+USE_GLIBC:libbsd +PERL_THREADS:libpthread +endef + +define Package/perl/description + Perl is a stable, cross platform programming language. + It is used for mission critical projects in the public and private sectors + and is widely used to program web applications of all needs. +endef + +define Package/perl/config + source "$(SOURCE)/Config.in" +endef + +# Static host perl +define Host/Configure + ( cd $(HOST_BUILD_DIR); ./Configure -der -Uusedl -Duserelocatableinc -Dprefix=$(HOST_PERL_PREFIX) $(if $(CONFIG_PERL_THREADS),-Dusethreads,)) +endef + +define Host/Install + ( cd $(HOST_BUILD_DIR); ./miniperl installperl ) + $(INSTALL_DIR) $(HOST_PERL_PREFIX)/bin/ + $(CP) $(HOST_BUILD_DIR)/generate_uudmap $(HOST_PERL_PREFIX)/bin/ + + # Link any possibly installed static extension in + $(MAKE) -C $(HOST_BUILD_DIR)/relink clean || true + ( cd $(HOST_BUILD_DIR)/relink && $(HOST_PERL_PREFIX)/bin/perl Makefile.PL ) + $(call perlmod/host/relink,$(HOST_BUILD_DIR)/relink) +endef + +# Target perl +define Build/Configure + $(PERL_CMD) files/perlconfig.pl -Dowrt:target_cc='$(TARGET_CC)' \ + -Dowrt:gccversion=$(CONFIG_GCC_VERSION) \ + -Dowrt:target_cross='$(TARGET_CROSS)' \ + -Dowrt:cflags='$(TARGET_CFLAGS_PERL) $(TARGET_CPPFLAGS_PERL)' \ + -Dowrt:ldflags='$(TARGET_LDFLAGS)' \ + -Dowrt:libc=$(subst uClibc,uclibc,$(CONFIG_LIBC)) \ + -Dowrt:ipv6=$(if $($(CONFIG_IPV6)),define,undef) \ + -Dowrt:threads=$(if $(CONFIG_PERL_THREADS),yes,no) \ + -Dowrt:staging_dir='$(STAGING_DIR)' \ + -Dowrt:host_perl_prefix='$(HOST_PERL_PREFIX)' \ + files/version.config \ + files/base.config \ + files/$(patsubst i386,i486,$(ARCH)).config \ + files/architecture.config \ + files/signal.config \ + files/threads.config \ + files/libc.config \ + files/misc.config \ + > $(PKG_BUILD_DIR)/config.sh + (cd $(PKG_BUILD_DIR) && ./Configure -S) + install -m 0644 $(PKG_BUILD_DIR)/config.h $(PKG_BUILD_DIR)/xconfig.h +endef + +define Build/Compile + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib/perl5/$(PERL_VERSION) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/perl5/$(PERL_VERSION) $(1)/usr/lib/perl5/ +endef + +define Package/perl/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/perl$(PKG_VERSION) $(1)/usr/bin + ln -nsf perl$(PKG_VERSION) $(1)/usr/bin/perl + + $(INSTALL_DIR) $(1)/usr/lib/perl5/$(PERL_VERSION)/CORE + $(CP) $(PKG_INSTALL_DIR)/usr/lib/perl5/$(PERL_VERSION)/CORE/libperl.so $(1)/usr/lib/perl5/$(PERL_VERSION)/CORE/ +endef + + +$(eval $(call RequireCommand,rsync, \ + $(PKG_NAME) requires rsync installed on the host-system. \ +)) + +$(eval $(call BuildPackage,perl)) +$(eval $(call HostBuild)) + +-include perlbase.mk + +# A helper package that includes all sort of supplementary files for tests +define Package/perl-tests-common +$(call Package/perlbase-template) +TITLE:=Common test support files +DEPENDS:=@PERL_TESTS +endef + +define Package/perl-tests-common/install + $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR) + $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/Porting + $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/regen + $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/lib + $(INSTALL_DIR) $(1)/usr/lib/perl5/$(PERL_VERSION)/XS + $(INSTALL_DIR) $(1)/usr/lib/perl5/$(PERL_VERSION)/auto/XS + $(INSTALL_DIR) $(1)/usr/lib/perl5/$(PERL_VERSION)/unicore + + $(CP) $(PKG_BUILD_DIR)/t $(1)/$(PERL_TESTSDIR) + $(CP) $(PKG_BUILD_DIR)/Porting $(1)/$(PERL_TESTSDIR) + $(CP) $(PKG_BUILD_DIR)/regen $(1)/$(PERL_TESTSDIR) + $(CP) $(PKG_BUILD_DIR)/MANIFEST $(1)/$(PERL_TESTSDIR) + $(CP) $(PKG_BUILD_DIR)/TestInit.pm $(1)/$(PERL_TESTSDIR) + $(CP) $(PKG_BUILD_DIR)/vutil.c $(1)/$(PERL_TESTSDIR) + $(CP) $(PKG_BUILD_DIR)/vxs.inc $(1)/$(PERL_TESTSDIR) + $(CP) $(PKG_BUILD_DIR)/lib/XS $(1)/usr/lib/perl5/$(PERL_VERSION)/ + $(CP) $(PKG_BUILD_DIR)/lib/auto/XS $(1)/usr/lib/perl5/$(PERL_VERSION)/auto + $(CP) $(PKG_BUILD_DIR)/lib/vmsish.pm $(1)/usr/lib/perl5/$(PERL_VERSION)/ + $(CP) $(PKG_BUILD_DIR)/lib/vmsish.t $(1)/$(PERL_TESTSDIR)/lib + $(CP) $(PKG_BUILD_DIR)/lib/Internals.t $(1)/$(PERL_TESTSDIR)/lib + $(CP) $(PKG_BUILD_DIR)/lib/unicore/TestProp.pl $(1)/usr/lib/perl5/$(PERL_VERSION)/unicore + $(CP) files/perl-run_tests.sh $(1)/$(PERL_TESTSDIR)/run_tests.sh + sed \ + -e 's!%%PERL_DISABLEDTESTS%%!$(PERL_DISABLEDTESTS)!' \ + -e 's!%%PERL_VERSION%%!$(PERL_VERSION)!' \ + -i $(1)/$(PERL_TESTSDIR)/run_tests.sh + $(CP) $(PKG_BUILD_DIR)/config_h.SH $(1)/$(PERL_TESTSDIR) + $(CP) $(PKG_BUILD_DIR)/perl.h $(1)/$(PERL_TESTSDIR) +endef + +$(eval $(call BuildPackage,perl-tests-common)) diff --git a/lang/perl/README.patches b/lang/perl/README.patches new file mode 100644 index 00000000..5f3b5951 --- /dev/null +++ b/lang/perl/README.patches @@ -0,0 +1,9 @@ +The patches in this package are loosely sorted into the following categories: + +0xx - Bugfixes +1xx - Cross-compile fixes +3xx - Workarounds +7xx - Testsuite fixes + +Feel free to add another one if your new patch doesn't seem to fit into an +existing category. \ No newline at end of file diff --git a/lang/perl/files/README.config b/lang/perl/files/README.config new file mode 100644 index 00000000..16bf0583 --- /dev/null +++ b/lang/perl/files/README.config @@ -0,0 +1,59 @@ +-- Perl configuration -- + +Perl uses a huge configuration file, normally generated via the Configure script +at build-time. This fails when cross-compiling though, so we need to supply our +own. + +We're using perlconfig.pl to piece together the final configuration from a bunch +of configuration files(all ending in .config). Please refer to perlconfig.pl's +POD for information on usage and syntax. + +Throughout the files, you will see a bunch of references to private symbols with +the prefix "owrt". These are used to control output in an effort to both +simplify writing configuration files, as well as to provide switchable options +to select the feature set of the resulting perl installation. + +The following will be a summary/quick reference of all private symbols we're +currently using: + +Passed via architecture configuration file(mipsel.config, i486.config, ...) +--------------------------------------------------------------------------- +Symbol Values Description +owrt:bits 32/64 Target's native word length. +owrt:endian little/big Target's endianness. +owrt:arch mipsel, i486, ... Target's architecture name. +owrt:sig_count 64/128 Number of signals the target + provides(NSIG - 1). +owrt:sigs * Symbolic names of the first 32 signals + this architecture provides, in numeric + order. Separated by whitespaces. +owrt:sig_name_extra * Symbolic names of any additional signals + this architecture provides after + owrt:sig_count. Separated by + whitespaces. +owrt:sig_num_extra * Numeric values associated with the + signal names provided in + owrt:sig_name_extra. Separated by + whitespaces. + +Passed via command line +----------------------- +Symbol Values Description +owrt:libc glibc/uclibc/musl Which C library implementation is in + use. +owrt:threads yes/no Whether to enable threading support. +owrt:ipv6 define/undef Whether to enable IPv6 support. +owrt:target_cross * Target architecture's host triplet. +owrt:target_cc * C compiler to use. +owrt:gccversion * target_cc's version number. +owrt:cflags * Additional C compiler flags. +owrt:ldflags * Additional linker flags. +owrt:staging_dir * Same as OpenWRT buildroot's + $(STAGING_DIR). +owrt:host_perl_prefix * host-perl installation prefix. + +Passed via version.config +------------------------- +Symbol Values Description +owrt:perllibpath * Path to perl library files, from the + target's point of view. diff --git a/lang/perl/files/aarch64.config b/lang/perl/files/aarch64.config new file mode 100644 index 00000000..cf3cfcb6 --- /dev/null +++ b/lang/perl/files/aarch64.config @@ -0,0 +1,20 @@ +owrt:arch=aarch64 +owrt:bits=64 +owrt:endian=little + +ccsymbols='' +cppccsymbols='' +cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE=1 _LP64=1 _STDC_PREDEF_H= _XOPEN_SOURCE=700 __AARCH64EL__=1 __AARCH64_CMODEL_SMALL__=1 __ARM_64BIT_STATE=1 __ARM_ARCH=8 __ARM_ARCH_8A=1 __ARM_ARCH_ISA_A64=1 __ARM_ARCH_PROFILE=65 __ARM_FEATURE_CLZ=1 __ARM_FEATURE_FMA=1 __ARM_FEATURE_IDIV=1 __ARM_FEATURE_NUMERIC_MAXMIN=1 __ARM_FEATURE_UNALIGNED=1 __ARM_FP=12 __ARM_NEON=1 __ARM_NEON_FP=12 __ARM_PCS_AAPCS64=1 __ARM_SIZEOF_MINIMAL_ENUM=4 __ARM_SIZEOF_WCHAR_T=4 __ATOMIC_ACQUIRE=2 __ATOMIC_ACQ_REL=4 __ATOMIC_CONSUME=1 __ATOMIC_RELAXED=0 __ATOMIC_RELEASE=3 __ATOMIC_SEQ_CST=5 __BIGGEST_ALIGNMENT__=16 __BYTE_ORDER__=1234 __CHAR16_TYPE__=short\ unsigned\ int __CHAR32_TYPE__=unsigned\ int __CHAR_BIT__=8 __CHAR_UNSIGNED__=1 __DBL_DECIMAL_DIG__=17 __DBL_DENORM_MIN__=((double)4.94065645841246544176568792868221372e-324L) __DBL_DIG__=15 __DBL_EPSILON__=((double)2.22044604925031308084726333618164062e-16L) __DBL_HAS_DENORM__=1 __DBL_HAS_INFINITY__=1 __DBL_HAS_QUIET_NAN__=1 __DBL_MANT_DIG__=53 __DBL_MAX_10_EXP__=308 __DBL_MAX_EXP__=1024 __DBL_MAX__=((double)1.79769313486231570814527423731704357e+308L) __DBL_MIN_10_EXP__=(-307) __DBL_MIN_EXP__=(-1021) __DBL_MIN__=((double)2.22507385850720138309023271733240406e-308L) __DEC128_EPSILON__=1E-33DL __DEC128_MANT_DIG__=34 __DEC128_MAX_EXP__=6145 __DEC128_MAX__=9.999999999999999999999999999999999E6144DL __DEC128_MIN_EXP__=(-6142) __DEC128_MIN__=1E-6143DL __DEC128_SUBNORMAL_MIN__=0.000000000000000000000000000000001E-6143DL __DEC32_EPSILON__=1E-6DF __DEC32_MANT_DIG__=7 __DEC32_MAX_EXP__=97 __DEC32_MAX__=9.999999E96DF __DEC32_MIN_EXP__=(-94) __DEC32_MIN__=1E-95DF __DEC32_SUBNORMAL_MIN__=0.000001E-95DF __DEC64_EPSILON__=1E-15DD __DEC64_MANT_DIG__=16 __DEC64_MAX_EXP__=385 __DEC64_MAX__=9.999999999999999E384DD __DEC64_MIN_EXP__=(-382) __DEC64_MIN__=1E-383DD __DEC64_SUBNORMAL_MIN__=0.000000000000001E-383DD __DECIMAL_DIG__=36 __DEC_EVAL_METHOD__=2 __ELF__=1 __FINITE_MATH_ONLY__=0 __FLOAT_WORD_ORDER__=1234 __FLT_DECIMAL_DIG__=9 __FLT_DENORM_MIN__=1.40129846432481707092372958328991613e-45F __FLT_DIG__=6 __FLT_EPSILON__=1.19209289550781250000000000000000000e-7F __FLT_EVAL_METHOD__=0 __FLT_HAS_DENORM__=1 __FLT_HAS_INFINITY__=1 __FLT_HAS_QUIET_NAN__=1 __FLT_MANT_DIG__=24 __FLT_MAX_10_EXP__=38 __FLT_MAX_EXP__=128 __FLT_MAX__=3.40282346638528859811704183484516925e+38F __FLT_MIN_10_EXP__=(-37) __FLT_MIN_EXP__=(-125) __FLT_MIN__=1.17549435082228750796873653722224568e-38F __FLT_RADIX__=2 __FP_FAST_FMA=1 __FP_FAST_FMAF=1 __GCC_ATOMIC_BOOL_LOCK_FREE=2 __GCC_ATOMIC_CHAR16_T_LOCK_FREE=2 __GCC_ATOMIC_CHAR32_T_LOCK_FREE=2 __GCC_ATOMIC_CHAR_LOCK_FREE=2 __GCC_ATOMIC_INT_LOCK_FREE=2 __GCC_ATOMIC_LLONG_LOCK_FREE=2 __GCC_ATOMIC_LONG_LOCK_FREE=2 __GCC_ATOMIC_POINTER_LOCK_FREE=2 __GCC_ATOMIC_SHORT_LOCK_FREE=2 __GCC_ATOMIC_TEST_AND_SET_TRUEVAL=1 __GCC_ATOMIC_WCHAR_T_LOCK_FREE=2 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1 __GCC_IEC_559=2 __GCC_IEC_559_COMPLEX=2 __GNUC_MINOR__=4 __GNUC_PATCHLEVEL__=0 __GNUC_STDC_INLINE__=1 __GNUC__=5 __INT16_C=__INT16_C __INT16_MAX__=0x7fff __INT16_TYPE__=short\ int __INT32_C=__INT32_C __INT32_MAX__=0x7fffffff __INT32_TYPE__=int __INT64_C=__INT64_C __INT64_MAX__=0x7fffffffffffffffL __INT64_TYPE__=long\ int __INT8_C=__INT8_C __INT8_MAX__=0x7f __INT8_TYPE__=signed\ char __INTMAX_C=__INTMAX_C __INTMAX_MAX__=0x7fffffffffffffffL __INTMAX_TYPE__=long\ int __INTPTR_MAX__=0x7fffffffffffffffL __INTPTR_TYPE__=long\ int __INT_FAST16_MAX__=0x7fffffff __INT_FAST16_TYPE__=int __INT_FAST32_MAX__=0x7fffffff __INT_FAST32_TYPE__=int __INT_FAST64_MAX__=0x7fffffffffffffffL __INT_FAST64_TYPE__=long\ int __INT_FAST8_MAX__=0x7f __INT_FAST8_TYPE__=signed\ char __INT_LEAST16_MAX__=0x7fff __INT_LEAST16_TYPE__=short\ int __INT_LEAST32_MAX__=0x7fffffff __INT_LEAST32_TYPE__=int __INT_LEAST64_MAX__=0x7fffffffffffffffL __INT_LEAST64_TYPE__=long\ int __INT_LEAST8_MAX__=0x7f __INT_LEAST8_TYPE__=signed\ char __INT_MAX__=0x7fffffff __LDBL_DENORM_MIN__=6.47517511943802511092443895822764655e-4966L __LDBL_DIG__=33 __LDBL_EPSILON__=1.92592994438723585305597794258492732e-34L __LDBL_HAS_DENORM__=1 __LDBL_HAS_INFINITY__=1 __LDBL_HAS_QUIET_NAN__=1 __LDBL_MANT_DIG__=113 __LDBL_MAX_10_EXP__=4932 __LDBL_MAX_EXP__=16384 __LDBL_MAX__=1.18973149535723176508575932662800702e+4932L __LDBL_MIN_10_EXP__=(-4931) __LDBL_MIN_EXP__=(-16381) __LDBL_MIN__=3.36210314311209350626267781732175260e-4932L __LONG_LONG_MAX__=0x7fffffffffffffffLL __LONG_MAX__=0x7fffffffffffffffL __LP64__=1 __ORDER_BIG_ENDIAN__=4321 __ORDER_LITTLE_ENDIAN__=1234 __ORDER_PDP_ENDIAN__=3412 __PRAGMA_REDEFINE_EXTNAME=1 __PTRDIFF_MAX__=0x7fffffffffffffffL __PTRDIFF_TYPE__=long\ int __REGISTER_PREFIX__= __SCHAR_MAX__=0x7f __SHRT_MAX__=0x7fff __SIG_ATOMIC_MAX__=0x7fffffff __SIG_ATOMIC_MIN__=(-0x7fffffff\ -\ 1) __SIG_ATOMIC_TYPE__=int __SIZEOF_DOUBLE__=8 __SIZEOF_FLOAT__=4 __SIZEOF_INT128__=16 __SIZEOF_INT__=4 __SIZEOF_LONG_DOUBLE__=16 __SIZEOF_LONG_LONG__=8 __SIZEOF_LONG__=8 __SIZEOF_POINTER__=8 __SIZEOF_PTRDIFF_T__=8 __SIZEOF_SHORT__=2 __SIZEOF_SIZE_T__=8 __SIZEOF_WCHAR_T__=4 __SIZEOF_WINT_T__=4 __SIZE_MAX__=0xffffffffffffffffUL __SIZE_TYPE__=long\ unsigned\ int __STDC_HOSTED__=1 __STDC_IEC_559__=1 __STDC_ISO_10646__=201206L __STDC_UTF_16__=1 __STDC_UTF_32__=1 __STDC__=1 __UINT16_C=__UINT16_C __UINT16_MAX__=0xffff __UINT16_TYPE__=short\ unsigned\ int __UINT32_C=__UINT32_C __UINT32_MAX__=0xffffffffU __UINT32_TYPE__=unsigned\ int __UINT64_C=__UINT64_C __UINT64_MAX__=0xffffffffffffffffUL __UINT64_TYPE__=long\ unsigned\ int __UINT8_C=__UINT8_C __UINT8_MAX__=0xff __UINT8_TYPE__=unsigned\ char __UINTMAX_C=__UINTMAX_C __UINTMAX_MAX__=0xffffffffffffffffUL __UINTMAX_TYPE__=long\ unsigned\ int __UINTPTR_MAX__=0xffffffffffffffffUL __UINTPTR_TYPE__=long\ unsigned\ int __UINT_FAST16_MAX__=0xffffffffU __UINT_FAST16_TYPE__=unsigned\ int __UINT_FAST32_MAX__=0xffffffffU __UINT_FAST32_TYPE__=unsigned\ int __UINT_FAST64_MAX__=0xffffffffffffffffUL __UINT_FAST64_TYPE__=long\ unsigned\ int __UINT_FAST8_MAX__=0xff __UINT_FAST8_TYPE__=unsigned\ char __UINT_LEAST16_MAX__=0xffff __UINT_LEAST16_TYPE__=short\ unsigned\ int __UINT_LEAST32_MAX__=0xffffffffU __UINT_LEAST32_TYPE__=unsigned\ int __UINT_LEAST64_MAX__=0xffffffffffffffffUL __UINT_LEAST64_TYPE__=long\ unsigned\ int __UINT_LEAST8_MAX__=0xff __UINT_LEAST8_TYPE__=unsigned\ char __USER_LABEL_PREFIX__= __WCHAR_MAX__=0xffffffffU __WCHAR_MIN__=0U __WCHAR_TYPE__=unsigned\ int __WINT_MAX__=0xffffffffU __WINT_MIN__=0U __WINT_TYPE__=unsigned\ int __aarch64__=1 __linux=1 __linux__=1 __unix=1 __unix__=1 linux=1 unix=1' +d_casti32='define' +d_double_style_ieee='define' +d_modflproto='define' +doublekind='3' +fpossize='16' +longdblkind='1' +need_va_copy='undef' +quadkind='2' + +owrt:sig_count='64' +owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS' +owrt:sig_name_extra='IOT CLD POLL UNUSED' +owrt:sig_num_extra='6 17 29 31' diff --git a/lang/perl/files/architecture.config b/lang/perl/files/architecture.config new file mode 100644 index 00000000..cc972816 --- /dev/null +++ b/lang/perl/files/architecture.config @@ -0,0 +1,121 @@ +alignbytes='8' + +($owrt:bits eq '32') { + ($owrt:endian eq 'little') { + byteorder='1234' + } + ($owrt:endian eq 'big') { + byteorder='4321' + } + + # Types + ivsize='4' + uvsize='4' + longsize='4' + longdblsize='8' + ptrsize='4' + + #quadkind='3' + #doublekind='3' + #longdblkind='0' + + i8type='signed char' + i16type='signed short' + i32type='signed long' + i64type='signed long long' + u32type='unsigned long' + u64type='unsigned long long' + quadtype='long long' + uquadtype='unsigned long long' + + sizesize='4' + + use64bitall='undef' + use64bitint='undef' + + uidformat='"lu"' + gidformat='"lu"' + + selectminbits='32' + + sGMTIME_max='2147483647' + sGMTIME_min='-2147483648' + sLOCALTIME_max='2147483647' + sLOCALTIME_min='-2147483648' + + sPRIi64='"Li"' + sPRIo64='"Lo"' + sPRIu64='"Lu"' + sPRIx64='"Lx"' + sPRId64='"Ld"' + + netdb_host_type='const void *' + nv_preserves_uv_bits='32' + d_nv_preserves_uv='define' + d_printf_format_null='define' + d_u32align='undef' +} +($owrt:bits eq '64') { + ($owrt:endian eq 'little') { + byteorder='12345678' + } + ($owrt:endian eq 'big') { + byteorder='87654321' + } + + # Types + ivsize='8' + uvsize='8' + longsize='8' + longdblsize='16' + ptrsize='8' + + quadtype='long' + + i16type='signed short' + i32type='signed int' + i64type='signed long' + i8type='signed char' + + u32type='unsigned int' + u64type='unsigned long' + uquadtype='unsigned long' + + sizesize='8' + + uidformat='"u"' + gidformat='"u"' + + selectminbits='64' + + sGMTIME_max='67768036191676799' + sGMTIME_min='-62167219200' + sLOCALTIME_max='67768036191673199' + sLOCALTIME_min='-62167222408' + + sPRIi64='"li"' + sPRIo64='"lo"' + sPRIu64='"lu"' + sPRIx64='"lx"' + sPRId64='"ld"' + + netdb_host_type='char *' + nv_preserves_uv_bits='53' + d_nv_preserves_uv='undef' + d_printf_format_null='undef' + d_u32align='define' + use64bitall='define' + use64bitint='define' +} + +# Only defined by i486 and x86_64. Provide defaults for all others +(!defined($sPRIEUldbl)) { + sPRIEUldbl='"E"' + sPRIFUldbl='"F"' + sPRIGUldbl='"G"' + sPRIXU64='"LX"' + sPRIeldbl='"e"' + sPRIfldbl='"f"' + sPRIgldbl='"g"' + sSCNfldbl='"f"' +} diff --git a/lang/perl/files/arm.config b/lang/perl/files/arm.config new file mode 100644 index 00000000..0f94d4ee --- /dev/null +++ b/lang/perl/files/arm.config @@ -0,0 +1,20 @@ +owrt:arch=arm +owrt:bits=32 +owrt:endian=little + +ccsymbols='__ARM_ARCH_3__=1' +cppccsymbols='' +cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1' +d_casti32='define' +d_double_style_ieee='define' +d_modflproto='undef' +doublekind='3' +fpossize='20' +longdblkind='0' +need_va_copy='undef' +quadkind='3' + +owrt:sig_count='64' +owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS' +owrt:sig_name_extra='IOT CLD POLL UNUSED' +owrt:sig_num_extra='6 17 29 31' diff --git a/lang/perl/files/armeb.config b/lang/perl/files/armeb.config new file mode 100644 index 00000000..d23a7d01 --- /dev/null +++ b/lang/perl/files/armeb.config @@ -0,0 +1,20 @@ +owrt:arch=armeb +owrt:bits=32 +owrt:endian=big + +ccsymbols='__ARM_ARCH_3__=1' +cppccsymbols='' +cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1' +d_casti32='define' +d_double_style_ieee='define' +d_modflproto='undef' +doublekind='4' +fpossize='20' +longdblkind='0' +need_va_copy='undef' +quadkind='3' + +owrt:sig_count='64' +owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS' +owrt:sig_name_extra='IOT CLD POLL UNUSED' +owrt:sig_num_extra='6 17 29 31' diff --git a/lang/perl/files/base.config b/lang/perl/files/base.config new file mode 100644 index 00000000..90a2cfbf --- /dev/null +++ b/lang/perl/files/base.config @@ -0,0 +1,1058 @@ +Author='' +Date='' +Header='' +Id='' +Locker='' +Log='' +PERL_CONFIG_SH=true +PERL_PATCHLEVEL= +RCSfile='' +Revision='' +Source='' +State='' +_a='.a' +_exe='' +_o='.o' +afs='false' +afsroot='/afs' +ansi2knr='' +aphostname='/bin/hostname' +ar='ar' +archname64='' +archobjs='' +awk='awk' +baserev='5.0' +bash='' +bin='/usr/bin' +bin_ELF='define' +binexp='/usr/bin' +bison='bison' +byacc='byacc' +c='' +castflags='0' +cat='cat' +ccname='gcc' +ccversion='' +cf_by='root' +charbits='8' +charsize='1' +chgrp='' +chmod='chmod' +chown='' +clocktype='clock_t' +comm='comm' +compress='' +config_arg0='./Configure' +config_arg1='-der' +contains='grep' +cp='cp' +cpio='' +cpp='cpp' +cpp_stuff='42' +cpplast='-' +cppminus='-' +cryptlib='' +csh='csh' +ctermid_r_proto='0' +d_Gconvert='sprintf((b),"%.*g",(n),(x))' +d_PRIEUldbl='define' +d_PRIFUldbl='define' +d_PRIGUldbl='define' +d_PRIXU64='define' +d_PRId64='define' +d_PRIeldbl='define' +d_PRIfldbl='define' +d_PRIgldbl='define' +d_PRIi64='define' +d_PRIo64='define' +d_PRIu64='define' +d_PRIx64='define' +d_SCNfldbl='define' +d__fwalk='undef' +d_accept4='define' +d_access='define' +d_accessx='undef' +d_acosh='define' +d_aintl='undef' +d_alarm='define' +d_archlib='undef' +d_asctime64='undef' +d_asinh='define' +d_atanh='define' +d_atolf='undef' +d_atoll='define' +d_attribute_deprecated='define' +d_attribute_format='define' +d_attribute_malloc='define' +d_attribute_nonnull='define' +d_attribute_noreturn='define' +d_attribute_pure='define' +d_attribute_unused='define' +d_attribute_warn_unused_result='define' +d_backtrace='define' +d_bcmp='define' +d_bcopy='define' +d_bsd='undef' +d_bsdgetpgrp='undef' +d_bsdsetpgrp='undef' +d_builtin_add_overflow='define' +d_builtin_choose_expr='define' +d_builtin_expect='undef' +d_builtin_mul_overflow='define' +d_builtin_sub_overflow='define' +d_bzero='define' +d_c99_variadic_macros='define' +d_castneg='define' +d_cbrt='define' +d_charvspr='undef' +d_chown='define' +d_chroot='define' +d_chsize='undef' +d_class='undef' +d_clearenv='define' +d_clock='define' +d_clock_getres='define' +d_clock_gettime='define' +d_clock_nanosleep='define' +d_closedir='define' +d_cmsghdr_s='define' +d_const='define' +d_copysign='define' +d_copysignl='undef' +d_cplusplus='undef' +d_csh='undef' +d_ctermid='define' +d_ctermid_r='undef' +d_ctime64='undef' +d_cuserid='define' +d_dbl_dig='define' +d_dbminitproto='undef' +d_difftime='define' +d_difftime64='undef' +d_dir_dd_fd='undef' +d_dirfd='define' +d_dirnamlen='undef' +d_dladdr='define' +d_dlerror='define' +d_dlopen='define' +d_dlsymun='undef' +d_dosuid='undef' +d_double_has_inf='define' +d_double_has_nan='define' +d_double_has_negative_zero='define' +d_double_has_subnormals='define' +d_double_style_cray='undef' +d_double_style_ibm='undef' +d_double_style_ieee='define' +d_double_style_vax='undef' +d_drand48proto='define' +d_dup2='define' +d_dup3='define' +d_duplocale='define' +d_eaccess='undef' +d_endgrent='define' +d_endgrent_r='undef' +d_endhent='define' +d_endhostent_r='undef' +d_endnent='define' +d_endnetent_r='undef' +d_endpent='define' +d_endprotoent_r='undef' +d_endpwent='define' +d_endpwent_r='undef' +d_endsent='define' +d_endservent_r='undef' +d_eofnblk='define' +d_erf='define' +d_erfc='define' +d_eunice='undef' +d_exp2='define' +d_expm1='define' +d_faststdio='undef' +d_fchdir='define' +d_fchmod='define' +d_fchmodat='define' +d_fchown='define' +d_fcntl='define' +d_fcntl_can_lock='define' +d_fd_macros='define' +d_fd_set='define' +d_fdclose='undef' +d_fdim='define' +d_fgetpos='define' +d_finite='define' +d_finitel='undef' +d_flexfnam='define' +d_flock='define' +d_flockproto='define' +d_fma='define' +d_fmax='define' +d_fmin='define' +d_fork='define' +d_fp_class='undef' +d_fp_classify='undef' +d_fp_classl='undef' +d_fpathconf='define' +d_fpclass='undef' +d_fpclassify='define' +d_fpclassl='undef' +d_fpgetround='undef' +d_fpos64_t='undef' +d_freelocale='define' +d_frexpl='undef' +d_fs_data_s='undef' +d_fseeko='define' +d_fsetpos='define' +d_fstatfs='define' +d_fstatvfs='define' +d_fsync='define' +d_ftello='define' +d_ftime='undef' +d_futimes='undef' +d_gai_strerror='define' +d_gdbm_ndbm_h_uses_prototypes='undef' +d_gdbmndbm_h_uses_prototypes='undef' +d_getaddrinfo='define' +d_getcwd='define' +d_getespwnam='undef' +d_getfsstat='undef' +d_getgrent='define' +d_getgrps='define' +d_gethbyaddr='define' +d_gethbyname='define' +d_gethent='define' +d_gethname='define' +d_gethostprotos='define' +d_getitimer='define' +d_getlogin='define' +d_getmnt='undef' +d_getmntent='define' +d_getnameinfo='define' +d_getnbyaddr='define' +d_getnbyname='define' +d_getnent='define' +d_getnetprotos='define' +d_getpagsz='define' +d_getpbyname='define' +d_getpbynumber='define' +d_getpent='define' +d_getpgid='define' +d_getpgrp='define' +d_getpgrp2='undef' +d_getppid='define' +d_getprior='define' +d_getprotoprotos='define' +d_getprpwnam='undef' +d_getpwent='define' +d_getsbyname='define' +d_getsbyport='define' +d_getsent='define' +d_getservprotos='define' +d_getspnam='define' +d_gettimeod='define' +d_gmtime64='undef' +d_gnulibc='undef' +d_grpasswd='define' +d_hasmntopt='define' +d_htonl='define' +d_hypot='define' +d_ilogb='define' +d_ilogbl='undef' +d_inc_version_list='undef' +d_index='undef' +d_inetaton='define' +d_inetntop='define' +d_inetpton='define' +d_int64_t='define' +d_ip_mreq='define' +d_ip_mreq_source='define' +d_ipv6_mreq="$owrt:ipv6" +d_ipv6_mreq_source='undef' +d_isascii='define' +d_isblank='define' +d_isfinite='define' +d_isfinitel='undef' +d_isinf='define' +d_isinfl='define' +d_isless='undef' +d_isnan='define' +d_isnanl='undef' +d_isnormal='define' +d_killpg='define' +d_lc_monetary_2008='define' +d_lchown='define' +d_ldbl_dig='define' +d_ldexpl='define' +d_lgamma='define' +d_lgamma_r='define' +d_libm_lib_version='define' +d_libname_unique='undef' +d_link='define' +d_linkat='define' +d_llrint='define' +d_llrintl='define' +d_llround='define' +d_llroundl='define' +d_localeconv_l='undef' +d_localtime64='undef' +d_locconv='define' +d_lockf='define' +d_log1p='define' +d_log2='define' +d_logb='define' +d_long_double_style_ieee='undef' +d_long_double_style_ieee_doubledouble='undef' +d_long_double_style_ieee_extended='undef' +d_long_double_style_ieee_std='undef' +d_long_double_style_vax='undef' +d_longdbl='define' +d_longlong='define' +d_lrint='define' +d_lrintl='define' +d_lround='define' +d_lroundl='define' +d_lseekproto='define' +d_lstat='define' +d_madvise='define' +d_malloc_good_size='undef' +d_malloc_size='undef' +d_mblen='define' +d_mbrlen='define' +d_mbrtowc='define' +d_mbstowcs='define' +d_mbtowc='define' +d_memchr='define' +d_memcmp='define' +d_memcpy='define' +d_memmem='define' +d_memmove='define' +d_memrchr='undef' +d_memset='define' +d_mkdir='define' +d_mkdtemp='define' +d_mkfifo='define' +d_mkostemp='define' +d_mkstemp='define' +d_mkstemps='undef' +d_mktime='define' +d_mktime64='undef' +d_mmap='define' +d_modfl='undef' +d_modfl_pow32_bug='undef' +d_mprotect='define' +d_msg='define' +d_msg_ctrunc='define' +d_msg_dontroute='define' +d_msg_oob='define' +d_msg_peek='define' +d_msg_proxy='define' +d_msgctl='define' +d_msgget='define' +d_msghdr_s='define' +d_msgrcv='define' +d_msgsnd='define' +d_msync='define' +d_munmap='define' +d_mymalloc='undef' +d_nan='define' +d_nanosleep='define' +d_ndbm='undef' +d_ndbm_h_uses_prototypes='undef' +d_nearbyint='define' +d_newlocale='define' +d_nextafter='define' +d_nice='define' +d_nl_langinfo='define' +d_nv_zero_is_allbits_zero='define' +d_old_pthread_create_joinable='undef' +d_oldpthreads='undef' +d_oldsock='undef' +d_open3='define' +d_openat='define' +d_pathconf='define' +d_pause='define' +d_perl_otherlibdirs='undef' +d_phostname='undef' +d_pipe='define' +d_pipe2='define' +d_poll='define' +d_portable='define' +d_prctl='define' +d_prctl_set_name='define' +d_procselfexe='define' +d_pseudofork='undef' +d_pthread_attr_setscope='define' +d_ptrdiff_t='define' +d_pwage='undef' +d_pwchange='undef' +d_pwclass='undef' +d_pwcomment='undef' +d_pwexpire='undef' +d_pwgecos='define' +d_pwpasswd='define' +d_pwquota='undef' +d_qgcvt='undef' +d_quad='define' +d_querylocale='undef' +d_re_comp='undef' +d_readdir='define' +d_readlink='define' +d_readv='define' +d_recvmsg='define' +d_regcmp='undef' +d_regcomp='define' +d_remainder='define' +d_remquo='define' +d_renameat='define' +d_rename='define' +d_rewinddir='define' +d_rint='define' +d_rmdir='define' +d_round='define' +d_safebcpy='undef' +d_safemcpy='undef' +d_sanemcmp='define' +d_sbrkproto='define' +d_scalbn='define' +d_scalbnl='undef' +d_sched_yield='define' +d_scm_rights='define' +d_seekdir='define' +d_select='define' +d_sem='define' +d_semctl='define' +d_semctl_semid_ds='define' +d_semctl_semun='define' +d_semget='define' +d_semop='define' +d_sendmsg='define' +d_setegid='define' +d_seteuid='define' +d_setgrent='define' +d_setgrent_r='undef' +d_setgrps='define' +d_sethent='define' +d_sethostent_r='undef' +d_setitimer='define' +d_setlinebuf='define' +d_setlocale='define' +d_setlocale_r='undef' +d_setnent='define' +d_setnetent_r='undef' +d_setpent='define' +d_setpgid='define' +d_setpgrp='define' +d_setpgrp2='undef' +d_setprior='define' +d_setproctitle='undef' +d_setprotoent_r='undef' +d_setpwent='define' +d_setpwent_r='undef' +d_setregid='define' +d_setresgid='define' +d_setresuid='define' +d_setreuid='define' +d_setrgid='undef' +d_setruid='undef' +d_setsent='define' +d_setservent_r='undef' +d_setsid='define' +d_setvbuf='define' +d_sfio='undef' +d_shm='define' +d_shmat='define' +d_shmatprototype='define' +d_shmctl='define' +d_shmdt='define' +d_shmget='define' +d_sigaction='define' +d_siginfo_si_addr='define' +d_siginfo_si_band='define' +d_siginfo_si_errno='define' +d_siginfo_si_fd='define' +d_siginfo_si_pid='define' +d_siginfo_si_status='define' +d_siginfo_si_uid='define' +d_siginfo_si_value='define' +d_signbit='undef' +d_sigprocmask='define' +d_sigsetjmp='define' +d_sin6_scope_id="$owrt:ipv6" +d_sitearch='define' +d_snprintf='define' +d_sockaddr_in6="$owrt:ipv6" +d_sockaddr_sa_len='undef' +d_sockatmark='undef' +d_sockatmarkproto='undef' +d_socket='define' +d_socklen_t='define' +d_sockpair='define' +d_socks5_init='undef' +d_sprintf_returns_strlen='define' +d_sqrtl='undef' +d_stat='define' +d_statblks='define' +d_statfs_f_flags='undef' +d_statfs_s='define' +d_static_inline='define' +d_statvfs='define' +d_stdio_cnt_lval='undef' +d_stdio_ptr_lval='undef' +d_stdio_ptr_lval_nochange_cnt='undef' +d_stdio_ptr_lval_sets_cnt='undef' +d_stdio_stream_array='undef' +d_stdiobase='undef' +d_stdstdio='undef' +d_strchr='define' +d_strcoll='define' +d_strctcpy='define' +d_strerrm='strerror(e)' +d_strerror='define' +d_strerror_l='define' +d_strftime='define' +d_strlcat='define' +d_strlcpy='define' +d_strnlen='define' +d_strtod='define' +d_strtod_l='define' +d_strtol='define' +d_strtold='define' +d_strtold_l='define' +d_strtoll='define' +d_strtoq='define' +d_strtoul='define' +d_strtoull='define' +d_strtouq='define' +d_strxfrm='define' +d_suidsafe='undef' +d_symlink='define' +d_syscall='define' +d_syscallproto='define' +d_sysconf='define' +d_sysernlst='' +d_syserrlst='undef' +d_system='define' +d_tcgetpgrp='define' +d_tcsetpgrp='define' +d_telldir='define' +d_telldirproto='define' +d_tgamma='define' +d_thread_safe_nl_langinfo_l='define' +d_time='define' +d_timegm='define' +d_times='define' +d_tm_tm_gmtoff='define' +d_tm_tm_zone='define' +d_trunc='define' +d_truncate='define' +d_truncl='define' +d_tzname='define' +d_ualarm='define' +d_umask='define' +d_uname='define' +d_union_semun='undef' +d_unlinkat='define' +d_unordered='undef' +d_unsetenv='define' +d_uselocale='define' +d_usleep='define' +d_usleepproto='define' +d_ustat='define' +d_vendorarch='undef' +d_vendorbin='undef' +d_vendorlib='undef' +d_vendorscript='undef' +d_vfork='undef' +d_void_closedir='undef' +d_voidsig='define' +d_voidtty='' +d_volatile='define' +d_vprintf='define' +d_vsnprintf='define' +d_wait4='define' +d_waitpid='define' +d_wcscmp='define' +d_wcstombs='define' +d_wcsxfrm='define' +d_wctomb='define' +d_writev='define' +d_xenix='undef' +date='date' +db_hashtype='u_int32_t' +db_prefixtype='size_t' +db_version_major='' +db_version_minor='' +db_version_patch='' +default_inc_excludes_dot='define' +defvoidused='15' +direntrytype='struct dirent' +dlext='so' +dlsrc='dl_dlopen.xs' +doublesize='8' +drand01='drand48()' +dtrace='' +eagain='EAGAIN' +ebcdic='undef' +echo='echo' +egrep='egrep' +emacs='' +endgrent_r_proto='0' +endhostent_r_proto='0' +endnetent_r_proto='0' +endprotoent_r_proto='0' +endpwent_r_proto='0' +endservent_r_proto='0' +eunicefix=':' +exe_ext='' +expr='expr' +extern_C='extern' +extras='' +fflushNULL='define' +fflushall='undef' +find='' +firstmakefile='makefile' +flex='' +fpostype='fpos_t' +freetype='void' +from=':' +full_csh='csh' +full_sed='sed' +gccansipedantic='' +gccosandvers='' +gidsign='1' +gidsize='4' +gidtype='gid_t' +glibpth='/usr/shlib /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib ' +gmake='gmake' +gnulibc_version='' +grep='grep' +groupcat='cat /etc/group' +groupstype='gid_t' +gzip='gzip' +h_fcntl='false' +h_sysfile='true' +hint='recommended' +hostcat='cat /etc/hosts' +hostgenerate="$owrt:host_perl_prefix/bin/generate_uudmap" +hostosname='' +hostperl="$owrt:host_perl_prefix/bin/perl" +html1dir=' ' +html1direxp='' +html3dir=' ' +html3direxp='' +i16size='2' +i32size='4' +i64size='8' +i8size='1' +i_arpainet='define' +i_assert='define' +i_bfd='undef' +i_bsdioctl='' +i_db='define' +i_dbm='undef' +i_dirent='define' +i_dld='undef' +i_dlfcn='define' +i_execinfo='define' +i_fcntl='undef' +i_fenv='undef' +i_float='define' +i_fp='undef' +i_fp_class='undef' +i_gdbm='define' +i_gdbm_ndbm='undef' +i_gdbmndbm='undef' +i_grp='define' +i_ieeefp='undef' +i_inttypes='define' +i_langinfo='define' +i_libutil='undef' +i_limits='define' +i_locale='define' +i_machcthr='undef' +i_malloc='define' +i_mallocmalloc='undef' +i_math='define' +i_memory='undef' +i_mntent='define' +i_ndbm='undef' +i_netdb='define' +i_neterrno='undef' +i_netinettcp='define' +i_niin='define' +i_poll='define' +i_prot='undef' +i_pthread='define' +i_pwd='define' +i_quadmath='define' +i_rpcsvcdbm='undef' +i_sfio='undef' +i_sgtty='undef' +i_shadow='define' +i_socks='undef' +i_stdarg='define' +i_stdbool='define' +i_stddef='define' +i_stdint='define' +i_stdlib='define' +i_string='define' +i_sunmath='undef' +i_sysaccess='undef' +i_sysdir='define' +i_sysfile='define' +i_sysfilio='undef' +i_sysin='undef' +i_sysioctl='define' +i_syslog='define' +i_sysmman='define' +i_sysmode='undef' +i_sysmount='define' +i_sysndir='undef' +i_sysparam='define' +i_syspoll='define' +i_sysresrc='define' +i_syssecrt='undef' +i_sysselct='define' +i_syssockio='undef' +i_sysstat='define' +i_sysstatfs='define' +i_sysstatvfs='define' +i_systime='define' +i_systimek='undef' +i_systimes='define' +i_systypes='define' +i_sysuio='define' +i_sysun='define' +i_sysutsname='define' +i_sysvfs='define' +i_syswait='define' +i_termio='undef' +i_termios='define' +i_time='define' +i_unistd='define' +i_ustat='define' +i_utime='define' +i_values='define' +i_varargs='undef' +i_varhdr='stdarg.h' +i_vfork='undef' +i_wchar='define' +i_xlocale='undef' +ignore_versioned_solibs='y' +inc_version_list=' ' +inc_version_list_init='0' +incpath='' +inews='' +initialinstalllocation='/usr/bin' +installbin='/usr/bin' +installhtml1dir='' +installhtml3dir='' +installman1dir='' +installman3dir='' +installprefix='/usr' +installprefixexp='/usr' +installscript='/usr/bin' +installsitebin='/usr/bin' +installsitehtml1dir='' +installsitehtml3dir='' +installsiteman1dir='' +installsiteman3dir='' +installsitescript='/usr/bin' +installstyle='lib/perl5' +installusrbinperl='define' +installvendorarch='' +installvendorbin='' +installvendorhtml1dir='' +installvendorhtml3dir='' +installvendorlib='' +installvendorman1dir='' +installvendorman3dir='' +installvendorscript='' +intsize='4' +issymlink='test -h' +ivdformat='"ld"' +ivtype='long' +ksh='' +ld_can_script='define' +ldlibpthname='LD_LIBRARY_PATH' +less='less' +lib_ext='.a' +libc='' +libdb_needs_pthread='N' +libperl='libperl.so' +libpth="$owrt:staging_dir/lib $owrt:staging_dir/usr/lib" +libsdirs="$owrt:staging_dir/lib $owrt:staging_dir/usr/lib" +libspath="$owrt:staging_dir/lib $owrt:staging_dir/usr/lib" +libswanted_uselargefiles='' +line='' +lint='' +lkflags='' +ln='ln' +lns='/bin/ln -s' +locincpth=' ' +loclibpth=' ' +longlongsize='8' +lp='' +lpr='' +ls='ls' +lseeksize='8' +lseektype='off_t' +mail='' +mailx='' +make='make' +make_set_make='#' +mallocobj='' +mallocsrc='' +malloctype='void *' +man1dir=' ' +man1direxp='' +man1ext='0' +man3dir=' ' +man3direxp='' +man3ext='0' +mips_type='' +mistrustnm='' +mkdir='mkdir' +mmaptype='void *' +modetype='mode_t' +more='more' +multiarch='undef' +mv='' +mydomain='.dev.null' +n='-n' +netdb_hlen_type='size_t' +netdb_name_type='const char *' +netdb_net_type='in_addr_t' +nm='nm' +nm_opt='' +nm_so_opt='--dynamic' +nroff='nroff' +nvEUformat='"E"' +nvFUformat='"F"' +nvGUformat='"G"' +nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0' +nveformat='"e"' +nvfformat='"f"' +nvgformat='"g"' +nvsize='8' +nvtype='double' +o_nonblock='O_NONBLOCK' +obj_ext='.o' +old_pthread_create_joinable='' +optimize='-O2' +orderlib='false' +osname='linux' +otherlibdirs=' ' +package='perl5' +pager='/usr/bin/less' +passcat='cat /etc/passwd' +path_sep=':' +perl='' +perl5='' +perl_patchlevel='' +perl_static_inline='static __inline__' +perlpath='/usr/bin/perl' +pg='pg' +phostname='hostname' +pidtype='pid_t' +plibpth='' +pmake='' +pr='' +prefix='/usr' +prefixexp='/usr' +procselfexe='"/proc/self/exe"' +prototype='define' +randbits='48' +randfunc='drand48' +randseedtype='long' +ranlib=':' +rd_nodata='-1' +rm='rm' +rm_try='/bin/rm -f try try a.out .out try.[cho] try..o core core.try* try.core*' +rmail='' +run='' +runnm='false' +sched_yield='sched_yield()' +scriptdir='/usr/bin' +scriptdirexp='/usr/bin' +sed='sed' +seedfunc='srand48' +selecttype='fd_set *' +sendmail='' +setgrent_r_proto='0' +sethostent_r_proto='0' +setlocale_r_proto='0' +setnetent_r_proto='0' +setprotoent_r_proto='0' +setpwent_r_proto='0' +setservent_r_proto='0' +sh='/bin/sh' +shar='' +sharpbang='#!' +shmattype='void *' +shortsize='2' +shrpenv='' +shsharp='true' +signal_t='void' +sitearch='' +sitearchexp='' +sitebin='/usr/bin' +sitebinexp='/usr/bin' +sitehtml1dir='' +sitehtml1direxp='' +sitehtml3dir='' +sitehtml3direxp='' +sitelib='' +sitelibexp='' +siteman1dir='' +siteman1direxp='' +siteman3dir='' +siteman3direxp='' +siteprefix='/usr' +siteprefixexp='/usr' +sitescript='/usr/bin' +sitescriptexp='/usr/bin' +sizetype='size_t' +sleep='' +smail='' +so='so' +sockethdr='' +socketlib='' +socksizetype='socklen_t' +sort='sort' +spackage='Perl5' +spitshell='cat' +src='.' +ssizetype='ssize_t' +st_ino_sign='1' +st_ino_size='8' +startperl='#!/usr/bin/perl' +startsh='#!/bin/sh' +static_ext=' ' +stdchar='char' +stdio_base='((fp)->_base)' +stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)' +stdio_cnt='((fp)->_cnt)' +stdio_filbuf='' +stdio_ptr='((fp)->_ptr)' +stdio_stream_array='' +submit='' +sysman='/usr/share/man/man1' +sysroot='' +tail='' +tar='' +targetdir='' +targetenv='' +targethost='' +targetmkdir='' +targetport='' +targetsh='/bin/sh' +tbl='' +tee='' +test='test' +timetype='time_t' +to=':' +touch='touch' +tr='tr' +trnl='\n' +troff='' +u16size='2' +u16type='unsigned short' +u32size='4' +u64size='8' +u8size='1' +u8type='unsigned char' +uidsign='1' +uidsize='4' +uidtype='uid_t' +uname='uname' +uniq='uniq' +use5005threads='undef' +usecbacktrace='undef' +usecrosscompile='define' +usedevel='undef' +usedl='define' +usedtrace='undef' +usefaststdio='undef' +usekernprocpathname='undef' +uselargefiles='define' +uselongdouble='undef' +usemallocwrap='define' +usemorebits='undef' +usemymalloc='n' +usenm='true' +usensgetexecutablepath='undef' +useopcode='true' +useperlio='define' +useposix='true' +usequadmath='undef' +usereentrant='undef' +userelocatableinc='undef' +usesfio='false' +useshrplib='true' +usesitecustomize='undef' +usesocks='undef' +usevendorprefix='undef' +useversionedarchname='undef' +usevfork='false' +usrinc="$owrt:staging_dir/include $owrt:staging_dir/usr/include" +uuname='' +uvXUformat='"lX"' +uvoformat='"lo"' +uvtype='unsigned long' +uvuformat='"lu"' +uvxformat='"lx"' +vaproto='define' +vendorarch='' +vendorarchexp='' +vendorbin='' +vendorbinexp='' +vendorhtml1dir=' ' +vendorhtml1direxp='' +vendorhtml3dir=' ' +vendorhtml3direxp='' +vendorlib='' +vendorlib_stem='' +vendorlibexp='' +vendorman1dir=' ' +vendorman1direxp='' +vendorman3dir=' ' +vendorman3direxp='' +vendorprefix='' +vendorprefixexp='' +vendorscript='' +vendorscriptexp='' +versiononly='undef' +vi='' +voidflags='15' +xlibpth='/usr/lib/386 /lib/386' +yacc='yacc' +yaccflags='' +zcat='' +zip='zip' + +config_argc=1 +config_args='-der' + +# Tools +cpprun="$owrt:target_cc -E" +cppstdin="$owrt:target_cc -E" +cc="$owrt:target_cc" +ld="$cc" +full_ar="${owrt:target_cross}ar" + +# Tool flags +cppflags="$owrt:cflags" +ccflags="-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $owrt:cflags" +ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' +ccdlflags="-fPIC -rdynamic -Wl,-rpath,$owrt:perllibpath/CORE" +cccdlflags='-fPIC' +ldflags="$owrt:ldflags" +ldflags_uselargefiles='' +lddlflags="-shared $owrt:ldflags" + +# Libraries +perllibs='-ldl -lm -lcrypt -lutil -lc' +libs='-lgdbm -ldb -ldl -lm -lcrypt -lutil -lc' +libsfiles='libdl.so libm.so libcrypt.so libutil.so libc.so' +libswanted='sfio socket inet nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util c cposix posix ucb BSD' diff --git a/lang/perl/files/i486.config b/lang/perl/files/i486.config new file mode 100644 index 00000000..1ed70395 --- /dev/null +++ b/lang/perl/files/i486.config @@ -0,0 +1,31 @@ +owrt:arch=i486 +owrt:bits=32 +owrt:endian=little + +ccsymbols='' +cppccsymbols='' +cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 i386=1 __i386=1 __i386__=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1' +d_casti32='undef' +d_double_style_ieee='define' +d_long_double_style_ieee='define' +d_long_double_style_ieee_extended='define' +d_modflproto='define' +doublekind='3' +fpossize='20' +longdblkind='3' +need_va_copy='undef' +quadkind='3' + +sPRIEUldbl='"LE"' +sPRIFUldbl='"LF"' +sPRIGUldbl='"LG"' +sPRIXU64='"LX"' +sPRIeldbl='"Le"' +sPRIfldbl='"Lf"' +sPRIgldbl='"Lg"' +sSCNfldbl='"Lf"' + +owrt:sig_count='64' +owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS' +owrt:sig_name_extra='IOT CLD POLL UNUSED' +owrt:sig_num_extra='6 17 29 31' diff --git a/lang/perl/files/libc.config b/lang/perl/files/libc.config new file mode 100644 index 00000000..93d190c5 --- /dev/null +++ b/lang/perl/files/libc.config @@ -0,0 +1,47 @@ +($owrt:libc eq 'glibc') { + perllibs="$perllibs -lbsd" + ldflags="$ldflags -L$owrt:staging_dir/lib" +} + +# uclibc does not provide crypt_r(). +($owrt:libc eq 'uclibc') { + crypt_r_proto='0' + d_crypt_r='undef' +} + +($owrt:libc eq 'musl') { + # musl does not provide a working setlocale(). It accepts arbitrary locales + # and makes them act as if they were C.UTF-8. + d_setlocale='undef' + + d_stdio_ptr_lval='undef' + d_stdio_ptr_lval_sets_cnt='undef' + d_stdiobase='undef' + d_stdstdio='undef' + + d_getnetbyname_r='undef' + + d_getprotobyname_r='undef' + d_getpwent_r='undef' + d_getservent_r='undef' + d_gethostent_r='undef' + d_getnetent_r='undef' + d_getnetbyaddr_r='undef' + d_getprotoent_r='undef' + d_getprotobynumber_r='undef' + d_getgrent_r='undef' + + getprotobyname_r='undef' + getpwent_r='undef' + getservent_r='undef' + gethostent_r='undef' + getnetent_r='undef' + getnetbyaddr_r='undef' + getprotoent_r='undef' + getprotobynumber_r='undef' + getgrent_r='undef' + + i_fcntl='define' + h_fcntl='true' + d_strerror_r='undef' +} diff --git a/lang/perl/files/mips.config b/lang/perl/files/mips.config new file mode 100644 index 00000000..0ed9eb1c --- /dev/null +++ b/lang/perl/files/mips.config @@ -0,0 +1,20 @@ +owrt:arch=mips +owrt:bits=32 +owrt:endian=big + +ccsymbols='' +cppccsymbols='' +cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 LANGUAGE_C=1 _LANGUAGE_C=1 __LANGUAGE_C=1 __LANGUAGE_C__=1 _LARGEFILE_SOURCE=1 MIPSEL=1 _MIPSEL=1 __MIPSEL=1 __MIPSEL__=1 _MIPS_FPSET=16 _MIPS_ISA=_MIPS_ISA_MIPS1 _MIPS_SIM=1 _MIPS_SZINT=32 _MIPS_SZLONG=32 _MIPS_SZPTR=32 __PIC__=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 R3000=1 _R3000=1 __R3000=1 __R3000__=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 mips=1 _mips=1 __mips=1 __mips__=1 __pic__=1 unix=1 __unix=1 __unix__=1' +d_casti32='define' +d_double_style_ieee='define' +d_modflproto='undef' +doublekind='4' +fpossize='24' +longdblkind='0' +need_va_copy='undef' +quadkind='3' + +owrt:sig_count=128 +owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ' +owrt:sig_name_extra='IOT CLD POLL' +owrt:sig_num_extra='6 18 22' diff --git a/lang/perl/files/mips64.config b/lang/perl/files/mips64.config new file mode 100644 index 00000000..470cb4e3 --- /dev/null +++ b/lang/perl/files/mips64.config @@ -0,0 +1,21 @@ +owrt:arch=mips64 +owrt:bits=64 +owrt:endian=big + +ccsymbols='' +cppccsymbols='' +cppsymbols='' +d_casti32='define' +d_double_style_ieee='define' +d_long_double_style_ieee_doubledouble='define' +d_modflproto='undef' +doublekind='4' +fpossize='24' +longdblkind='6' +need_va_copy='define' +quadkind='2' + +owrt:sig_count=128 +owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ' +owrt:sig_name_extra='IOT CLD POLL' +owrt:sig_num_extra='6 18 22' diff --git a/lang/perl/files/mipsel.config b/lang/perl/files/mipsel.config new file mode 100644 index 00000000..3c5dada7 --- /dev/null +++ b/lang/perl/files/mipsel.config @@ -0,0 +1,20 @@ +owrt:arch=mipsel +owrt:bits=32 +owrt:endian=little + +ccsymbols='' +cppccsymbols='' +cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 LANGUAGE_C=1 _LANGUAGE_C=1 __LANGUAGE_C=1 __LANGUAGE_C__=1 _LARGEFILE_SOURCE=1 MIPSEL=1 _MIPSEL=1 __MIPSEL=1 __MIPSEL__=1 _MIPS_FPSET=16 _MIPS_ISA=_MIPS_ISA_MIPS1 _MIPS_SIM=1 _MIPS_SZINT=32 _MIPS_SZLONG=32 _MIPS_SZPTR=32 __PIC__=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 R3000=1 _R3000=1 __R3000=1 __R3000__=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 mips=1 _mips=1 __mips=1 __mips__=1 __pic__=1 unix=1 __unix=1 __unix__=1' +d_casti32='define' +d_double_style_ieee='define' +d_modflproto='undef' +doublekind='3' +fpossize='24' +longdblkind='0' +need_va_copy='undef' +quadkind='3' + +owrt:sig_count=128 +owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ' +owrt:sig_name_extra='IOT CLD POLL' +owrt:sig_num_extra='6 18 22' diff --git a/lang/perl/files/misc.config b/lang/perl/files/misc.config new file mode 100644 index 00000000..3e8f6bd7 --- /dev/null +++ b/lang/perl/files/misc.config @@ -0,0 +1,11 @@ +cf_email='naoir@gmx.net' +osvers='3.18.19' +gccversion="$owrt:gccversion" +myhostname='OpenWrt' +cf_time='Thu Jan 1 12:00:00 CEST 2015' + +perladmin="$cf_email" +archname="$owrt:arch-linux-$owrt:libc" +targetarch="$archname" +myarchname="$archname" +myuname="Linux $myhostname $osvers #1 SMP $cf_time @{[$owrt:arch =~ s/(el|eb)$//r]} GNU/Linux" diff --git a/lang/perl/files/perl-run_tests.sh b/lang/perl/files/perl-run_tests.sh new file mode 100755 index 00000000..bf83c0a3 --- /dev/null +++ b/lang/perl/files/perl-run_tests.sh @@ -0,0 +1,81 @@ +#!/bin/sh + +PERL_TESTSDIR="/usr/share/perl/perl-tests" +PERL_LIBDIR="/usr/lib/perl5/%%PERL_VERSION%%/" +PERL_DISABLEDTESTS="%%PERL_DISABLEDTESTS%%" + +no_run="" +manual_run="" +manual_run_no_base="" + +while [ ! -z "$1" ]; do + case $1 in + -n) + no_run="yes" + ;; + -m) + manual_run="yes" + ;; + -mb) + manual_run="yes" + manual_run_no_base="yes" + ;; + --help) + echo "run_tests.sh [-n|-m|-mb|--help]" + echo "" + echo "Options:" + echo " -n Just prepare the environment. Don't actually run any tests" + echo " -m Run tests manually according to MANIFEST, instead of whatever t/TEST chooses" + echo " -mb Don't run base tests. Implies -m" + echo " --help Print this help ;)" + echo "" + exit 0 + ;; + *) + echo "Invalid argument: $1" + ;; + esac + shift +done + +if [ ! -f "$PERL_TESTSDIR/__prepared" ]; then + # Many tests insist on having PERL5LIB in $PERL_TESTSDIR/lib. However, + # that directory may also contain tests. Some of them(FindBin.t in particular) + # also demand being located in a directory ending with "lib". So we can't do symlink + # trickery here. + # Our solution is to just copy PERL5LIB over. + if [ -d "$PERL_TESTSDIR/lib" ]; then + cp -a "$PERL_LIBDIR/"* "$PERL_TESTSDIR/lib/" + else + ln -s "$PERL_LIBDIR" "$PERL_TESTSDIR/lib" + fi + + ln -s /usr/bin/perl "$PERL_TESTSDIR/perl" + ln -s /usr/bin/perl "$PERL_TESTSDIR/t/perl" + touch "$PERL_TESTSDIR/__prepared" + + for i in $PERL_DISABLEDTESTS; do + echo "Disabling $i tests" + sed 's!^'$i'.*$!!' -i $PERL_TESTSDIR/MANIFEST + done + + cat $PERL_TESTSDIR/MANIFEST | grep -v '^$' > $PERL_TESTSDIR/MANIFEST_NEW + rm $PERL_TESTSDIR/MANIFEST + mv $PERL_TESTSDIR/MANIFEST_NEW $PERL_TESTSDIR/MANIFEST +fi + +if [ -z "$no_run" ]; then + cd "$PERL_TESTSDIR/t" + if [ ! -z "$manual_run" ]; then + for i in $(cat ../MANIFEST | sed 's/\t.*$//g' | grep '\.t$'); do + if [ ! -z "$manual_run_no_base" ] && [ ! -z "$(echo $i | grep '^t/')" ]; then + continue; + fi + echo "Running $i" + ./TEST ../$i + echo "" + done + else + ./perl TEST + fi +fi diff --git a/lang/perl/files/perlconfig.pl b/lang/perl/files/perlconfig.pl new file mode 100644 index 00000000..f169980d --- /dev/null +++ b/lang/perl/files/perlconfig.pl @@ -0,0 +1,313 @@ +#!/usr/bin/perl + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Copyright 2015 Marcel Denia + +=head1 NAME + +perlconfig.pl + +=head1 SYNOPSIS + +B [B<-Dsymbol>=I, ...] [B<-dsymbol>=I, ...] I<[files]> + +Generate a configuration file suitable for (cross-)compiling perl 5. + +=head1 OPTIONS + +=over + +=item B<-Dsymbol=value> + +The symbol identified by I will have the literal value I. +When generating the configuration file, it's value will be printed enclosed by +single quotation marks('). + +=item B<-dsymbol=value> + +The symbol identified by I will have the literal value I. + +=back + +=head1 DESCRIPTION + +B is a program to compile and generate configuration files ready +to be used as a "config.sh" file for compiling perl 5. It does so by processing +specially-made configuration files(usually called *.config), typically augmented +by command-line definitions. + +B's intent is to be used in place of perl 5's own Configure +script in situations where it can not be run, like cross-compiling. + +=head2 File syntax + +B's configuration files a consist of symbol definitions in +different variations, each one assigning a specific symbol identified by a name +some value, as well as conditional blocks in order to allow for some +flexibility. + +=head3 Symbol names + +A symbol name has to consist entirely of alphanumeric characters as well as +the underscore(_) character. In addition, symbol names may be prefixed with an +all-lowercase string, separated by a colon(:): + + my:name=value + +Having a zero-length prefix string is also valid: + + :name=value + +Symbols prefixed that way are called private symbols. They act exactly like +regular symbols, with the only difference being that they will B be written +to the final configuration file. + +=head3 Symbol definitions + +A symbol definition is in the form of a simple name/value pair, separated by +an equals sign(=): + + name=value + +I can be anything really. However, there are 3 notations, with +differences in quoting and interpolation: + +=over + +=item name=foo + +The symbol identified by I will have the literal value I. + +=item name='foo' + +The symbol identified by I will have the literal value I. +When generating the configuration file, it's value will be printed enclosed by +single quotation marks('). + +=item name="foo" + +The symbol identified by I will have the value of I +S>(as described in L). +When generating the configuration file, it's value will be printed enclosed by +single quotation marks('). + +=back + +=head3 Conditional blocks + +A conditional block is of the form + + (condition) { + ... + } + +B will execute everything enclosed in the curly braces({ and }), +or inside the BLOCK in Perl 5 terms, if I evaluates to any true +value. I will go through interpolation as described in +L. It may contain any valid Perl 5 expression. Some common +examples are: + +=over + +=item $name eq 'foo' + +Evaluates to true if configuration symbol I is literally equal to I. + +=item $name ne 'foo' + +Evaluates to true if configuration symbol I is B literally equal to +I. + +=item defined($name) + +Evaluates to true if configuration symbol I is defined(has any usable +value, see L). + +=back + +Conditional blocks may be nested inside conditional blocks. Note that the +opening curl brace({) has to be on the same line as your condition. + +=head3 Comments + +All lines starting with nothing or any number of whitespaces, followed by a +hash sign(#), are considered comments and will be completely ignored by +B. + +=head3 Interpolation + +In certain situations(see above), B will interpolate strings or +constructs in order to allow you to refer to configuration symbols or embed +code. + +Interpolated strings are subject to the following rules: + +=over + +=item You may not include any single(') or double(") quotation marks. + +You can use \qq in order to include double quotation marks(") in your string. + +=item $name and ${name} reference configuration symbols + +You can easily refer to existing configuration symbols using the commmon $name +or ${name} syntax. In case you want to refer to the perl variable named $name, +write \$name. This is useful for embedding code. + +=item Perl 5 interpolation rules apply + +Aside from the above, you may include anything that is also valid for an +interpolated(qq//) string in Perl 5. For instance, it's perfectly valid to +execute code using the @{[]} construct. + +=back + +=head1 EXAMPLES + +As a simple example, consider the following configuration file, named +"example.config": + + recommendation='The Perl you want is' + ($:maturity eq 'stable') { + recommendation="$recommendation Perl 5" + } + ($:maturity eq 'experimental') { + recommendation="$recommendation Perl 6(try Rakudo!)" + } + +Executing it using these command-lines will yield the following results: + +=over + +=item $ perlconfig.pl -D:maturity=stable example.config + + recommendation='The Perl you want is Perl 5' + +=item $ perlconfig.pl -D:maturity=experimental example.config + + recommendation='The Perl you want is Perl 6(try Rakudo!)' + +=back + +=head1 AUTHOR + +Marcel Denia + +=head1 COPYRIGHT AND LICENSE + +Copyright 2015 Marcel Denia + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +=cut + +use strict; +use warnings; +use List::Util qw/all/; +my $symbol_name_prefix_regex = '(?:[a-z]*:)'; +my $symbol_name_regex = "($symbol_name_prefix_regex?(?:[a-zA-Z0-9_]+))"; + +my %config; + +sub interpolate { + my $string = shift; + my %options = @_; + + # First, convert $foo into ${foo} + $string =~ s/(?{value} + $string =~ s/\$\{$symbol_name_regex\}/\$config{\'$1\'}->{value}/g; + + # Un-escape \$foo + $string =~ s/\\\$/\$/g; + + # Turn \qq into " + $string =~ s/\\qq/\\"/g; + + return $string; +} + +# Parse command-line symbol definitions +while ($ARGV[0]) { + if ($ARGV[0] =~ /^-([D|d])$symbol_name_regex=(.*)$/) { + $config{$2} = { value => $3, quoted => $1 eq 'D' }; + shift(@ARGV); + } + else { + last; + } +} + +# Process configuration files +my @condition_stack = ( 1 ); +for my $file (@ARGV) { + open(my $fh, '<', $file) or die "Can't open $file: $!\n"; + while (my $line = <$fh>) { + chomp($line); + + if ($line =~ /^\s*$symbol_name_regex=(.*)$/) { # A symbol definition + if (all {$_ == 1} @condition_stack) { + my $symbol = $1; + (my $quote_begin, my $value, my $quote_end) = $2 =~ /^(['|"])?([^'"]*)(['|"])?$/; + + $quote_begin = '' unless defined $quote_begin; + $quote_end = '' unless defined $quote_end; + die "$file:$.: Unmatched quotes in \"$line\"\n" unless $quote_begin eq $quote_end; + + if ($quote_begin eq '"') { + $config{$symbol} = { value => eval('"' . interpolate($2) . '"'), quoted => 1 }; + } + else { + $config{$symbol} = { value => $2, quoted => $quote_begin eq '\'' }; + } + } + } + elsif ($line =~ /^\s*\((.*)\)\s?{$/) { # A conditional block + if (eval(interpolate($1))) { + push(@condition_stack, 1); + } + else { + push(@condition_stack, 0); + } + } + elsif ($line =~ /^\s*}$/) { # Closing a conditional block + pop(@condition_stack); + die "$file:$.: Closing non-existent block\n" unless @condition_stack; + } + elsif ($line =~ (/^\s*$/) || ($line =~ /^\s*#/)) { # An empty line or comment + } + else { + die "$file:$.: Malformed line: \"$line\"\n"; + } + } +} + +# Output +for (sort(keys(%config))) { + my $quote = $config{$_}->{quoted} ? '\'' : ''; + print("$_=$quote$config{$_}->{value}$quote\n") unless $_ =~ /^$symbol_name_prefix_regex/; +} \ No newline at end of file diff --git a/lang/perl/files/powerpc.config b/lang/perl/files/powerpc.config new file mode 100644 index 00000000..287ce6c6 --- /dev/null +++ b/lang/perl/files/powerpc.config @@ -0,0 +1,20 @@ +owrt:arch=powerpc +owrt:bits=32 +owrt:endian=big + +ccsymbols='__gnu_linux__=1 __linux=1 __linux__=1 __unix=1 __unix__=1 system=linux system=posix system=unix' +cppccsymbols='linux=1 unix=1' +cppsymbols='_BIG_ENDIAN=1 __BIG_ENDIAN__=1 __ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 __linux=1 __linux__=1 __unix=1 __unix__=1' +d_casti32='undef' +d_double_style_ieee='define' +d_modflproto='undef' +doublekind='4' +fpossize='24' +longdblkind='0' +need_va_copy='define' +quadkind='3' + +owrt:sig_count='64' +owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS' +owrt:sig_name_extra='IOT CLD POLL UNUSED' +owrt:sig_num_extra='6 17 29 31' diff --git a/lang/perl/files/signal.config b/lang/perl/files/signal.config new file mode 100644 index 00000000..183d3b98 --- /dev/null +++ b/lang/perl/files/signal.config @@ -0,0 +1,18 @@ +# Signal table helper + +(defined($owrt:sigs)) { + sig_name="$owrt:sigs" + (($owrt:libc eq 'glibc') || ($owrt:libc eq 'uclibc')) { + sig_name="$sig_name NUM32 NUM33 RTMIN NUM35 NUM36" + } + ($owrt:libc eq 'musl') { + sig_name="$sig_name NUM32 NUM33 NUM34 RTMIN NUM36" + } + + sig_name="$sig_name @{[map({qq/NUM\$_/} 37..$owrt:sig_count - 2)]} RTMAX $owrt:sig_name_extra" + sig_num="@{[0..$owrt:sig_count - 1]} $owrt:sig_num_extra " + sig_count="$owrt:sig_count" + sig_size="@{[scalar(split(q/ /, $sig_name))]}" + sig_name_init="@{[join(q/, /, map({qq/\qq\$_\qq/} split(q/ /, $sig_name)))]}, 0" + sig_num_init="@{[join(q/, /, split(q/ /, $sig_num))]}, 0" +} diff --git a/lang/perl/files/threads.config b/lang/perl/files/threads.config new file mode 100644 index 00000000..e0a2f82d --- /dev/null +++ b/lang/perl/files/threads.config @@ -0,0 +1,197 @@ +($owrt:threads eq 'yes') { + # Configure arguments + config_args="$config_args -Dusethreads" + config_arg2='-Dusethreads' + config_argc=2 + + # Options + useithreads='define' + usemultiplicity='define' + usethreads='define' + + # Flags and related + ccflags="-D_REENTRANT -D_GNU_SOURCE $ccflags" + cppflags="-D_REENTRANT -D_GNU_SOURCE $cppflags" + perllibs="-lpthread $perllibs" + libs="-lpthread $libs" + libsfiles="libpthread.so $libsfiles" + libswanted="pthread $libswanted" + + + crypt_r_proto='REENTRANT_PROTO_B_CCS' + i_crypt='define' + d_crypt='define' + d_crypt_r='define' + + # Prototypes + asctime_r_proto='REENTRANT_PROTO_B_SB' + ctime_r_proto='REENTRANT_PROTO_B_SB' + drand48_r_proto='REENTRANT_PROTO_I_ST' + getgrent_r_proto='REENTRANT_PROTO_I_SBWR' + getgrgid_r_proto='REENTRANT_PROTO_I_TSBWR' + getgrnam_r_proto='REENTRANT_PROTO_I_CSBWR' + gethostbyaddr_r_proto='REENTRANT_PROTO_I_TsISBWRE' + gethostbyname_r_proto='REENTRANT_PROTO_I_CSBWRE' + gethostent_r_proto='REENTRANT_PROTO_I_SBWRE' + getlogin_r_proto='REENTRANT_PROTO_I_BW' + getnetbyaddr_r_proto='REENTRANT_PROTO_I_uISBWRE' + getnetbyname_r_proto='REENTRANT_PROTO_I_CSBWRE' + getnetent_r_proto='REENTRANT_PROTO_I_SBWRE' + getprotobyname_r_proto='REENTRANT_PROTO_I_CSBWR' + getprotobynumber_r_proto='REENTRANT_PROTO_I_ISBWR' + getprotoent_r_proto='REENTRANT_PROTO_I_SBWR' + getpwent_r_proto='REENTRANT_PROTO_I_SBWR' + getpwnam_r_proto='REENTRANT_PROTO_I_CSBWR' + getpwuid_r_proto='REENTRANT_PROTO_I_TSBWR' + getservbyname_r_proto='REENTRANT_PROTO_I_CCSBWR' + getservbyport_r_proto='REENTRANT_PROTO_I_ICSBWR' + getservent_r_proto='REENTRANT_PROTO_I_SBWR' + getspnam_r_proto='REENTRANT_PROTO_I_CSBWR' + gmtime_r_proto='REENTRANT_PROTO_S_TS' + localtime_r_proto='REENTRANT_PROTO_S_TS' + random_r_proto='REENTRANT_PROTO_I_St' + readdir64_r_proto='REENTRANT_PROTO_I_TSR' + readdir_r_proto='REENTRANT_PROTO_I_TSR' + srand48_r_proto='REENTRANT_PROTO_I_LS' + srandom_r_proto='REENTRANT_PROTO_I_TS' + strerror_r_proto='REENTRANT_PROTO_B_IBW' + tmpnam_r_proto='REENTRANT_PROTO_B_B' + ttyname_r_proto='REENTRANT_PROTO_I_IBW' + + # Defines + d_asctime_r='define' + d_ctime_r='define' + d_drand48_r='define' + d_fds_bits='define' + d_fegetround='undef' + d_getgrent_r='define' + d_getgrgid_r='define' + d_getgrnam_r='define' + d_gethostbyaddr_r='define' + d_gethostbyname_r='define' + d_gethostent_r='define' + d_getlogin_r='define' + d_getnetbyaddr_r='define' + d_getnetbyname_r='define' + d_getnetent_r='define' + d_getprotobyname_r='define' + d_getprotobynumber_r='define' + d_getprotoent_r='define' + d_getpwent_r='define' + d_getpwnam_r='define' + d_getpwuid_r='define' + d_getservbyname_r='define' + d_getservbyport_r='define' + d_getservent_r='define' + d_getspnam_r='define' + d_gmtime_r='define' + d_j0='undef' + d_j0l='undef' + d_localtime_r='define' + d_localtime_r_needs_tzset='define' + d_nexttoward='undef' + d_off64_t='define' + d_pthread_atfork='define' + d_pthread_yield='define' + d_random_r='define' + d_readdir64_r='define' + d_readdir_r='define' + d_srand48_r='define' + d_srandom_r='define' + d_sresgproto='define' + d_sresuproto='define' + d_strerror_r='define' + d_tmpnam_r='define' + d_ttyname_r='define' +} +($owrt:threads eq 'no') { + # Options + useithreads='undef' + usemultiplicity='undef' + usethreads='undef' + + # Prototyypes + asctime_r_proto='0' + crypt_r_proto='0' + ctime_r_proto='0' + drand48_r_proto='0' + getgrent_r_proto='0' + getgrgid_r_proto='0' + getgrnam_r_proto='0' + gethostbyaddr_r_proto='0' + gethostbyname_r_proto='0' + gethostent_r_proto='0' + getlogin_r_proto='0' + getnetbyaddr_r_proto='0' + getnetbyname_r_proto='0' + getnetent_r_proto='0' + getprotobyname_r_proto='0' + getprotobynumber_r_proto='0' + getprotoent_r_proto='0' + getpwent_r_proto='0' + getpwnam_r_proto='0' + getpwuid_r_proto='0' + getservbyname_r_proto='0' + getservbyport_r_proto='0' + getservent_r_proto='0' + getspnam_r_proto='0' + gmtime_r_proto='0' + + # Defines + d_asctime_r='undef' + d_crypt='define' + d_crypt_r='undef' + d_ctime_r='undef' + d_drand48_r='undef' + d_fds_bits='undef' + d_fegetround='define' + d_getgrent_r='undef' + d_getgrgid_r='undef' + d_getgrnam_r='undef' + d_gethostbyaddr_r='undef' + d_gethostbyname_r='undef' + d_gethostent_r='undef' + d_getlogin_r='undef' + d_getnetbyaddr_r='undef' + d_getnetbyname_r='undef' + d_getnetent_r='undef' + d_getprotobyname_r='undef' + d_getprotobynumber_r='undef' + d_getprotoent_r='undef' + d_getpwent_r='undef' + d_getpwnam_r='undef' + d_getpwuid_r='undef' + d_getservbyname_r='undef' + d_getservbyport_r='undef' + d_getservent_r='undef' + d_getspnam_r='undef' + d_gmtime_r='undef' + d_j0='define' + d_j0l='define' + d_localtime_r='undef' + d_localtime_r_needs_tzset='undef' + d_nexttoward='define' + d_off64_t='undef' + d_pthread_atfork='undef' + d_pthread_yield='undef' + d_random_r='undef' + d_readdir64_r='undef' + d_readdir_r='undef' + d_srand48_r='undef' + d_srandom_r='undef' + d_sresgproto='undef' + d_sresuproto='undef' + d_strerror_r='undef' + d_tmpnam_r='undef' + d_ttyname_r='undef' + i_crypt='define' + localtime_r_proto='0' + random_r_proto='0' + readdir64_r_proto='0' + readdir_r_proto='0' + srand48_r_proto='0' + srandom_r_proto='0' + strerror_r_proto='0' + tmpnam_r_proto='0' + ttyname_r_proto='0' +} diff --git a/lang/perl/files/version.config b/lang/perl/files/version.config new file mode 100644 index 00000000..5a5c402f --- /dev/null +++ b/lang/perl/files/version.config @@ -0,0 +1,38 @@ +# Set the version here +PERL_REVISION=5 +PERL_VERSION=28 +PERL_SUBVERSION=0 + +# (api_revison, api_version, api_subversion) = (revision, version, 0) usually +PERL_API_REVISION=5 +PERL_API_VERSION=28 +PERL_API_SUBVERSION=0 + +known_extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize Win32 Win32API/File Win32CORE XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash' +extensions='B Compress/Raw/Bzip2 Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/DosGlob File/Glob Filter/Util/Call GDBM_File Hash/Util Hash/Util/FieldHash I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Tie/Hash/NamedCapture Time/HiRes Time/Piece Unicode/Collate XS/APItest XS/Typemap arybase attributes mro re threads threads/shared Archive/Tar Attribute/Handlers AutoLoader B/Debug CPAN CPAN/Meta CPAN/Meta/Requirements CPAN/Meta/YAML Carp Config/Perl/V Devel/SelfStubber Digest Dumpvalue Env Errno Exporter ExtUtils/CBuilder ExtUtils/Command ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/Miniperl ExtUtils/ParseXS File/Fetch File/Find File/Path File/Temp FileCache Filter/Simple Getopt/Long HTTP/Tiny I18N/Collate I18N/LangTags IO/Compress IO/Socket/IP IO/Zlib IPC/Cmd IPC/Open3 JSON/PP Locale/Codes Locale/Maketext Locale/Maketext/Simple Math/BigInt Math/BigRat Math/Complex Memoize Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Metadata NEXT Net/Ping Params/Check Parse/CPAN/Meta Perl/OSType PerlIO/via/QuotedPrint Pod/Checker Pod/Escapes Pod/Functions Pod/Html Pod/Parser Pod/Perldoc Pod/Simple Pod/Usage Safe Search/Dict SelfLoader Term/ANSIColor Term/Cap Term/Complete Term/ReadLine Test Test/Harness Test/Simple Text/Abbrev Text/Balanced Text/ParseWords Text/Tabs Thread/Queue Thread/Semaphore Tie/File Tie/Memoize Tie/RefHash Time/Local XSLoader autodie autouse base bignum constant encoding/warnings experimental if lib libnet parent perlfaq podlators Unicode/Normalize version' +nonxs_ext='Archive/Tar Attribute/Handlers AutoLoader B/Debug CPAN CPAN/Meta CPAN/Meta/Requirements CPAN/Meta/YAML Carp Config/Perl/V Devel/SelfStubber Digest Dumpvalue Env Errno Exporter ExtUtils/CBuilder ExtUtils/Command ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/Miniperl ExtUtils/ParseXS File/Fetch File/Find File/Path File/Temp FileCache Filter/Simple Getopt/Long HTTP/Tiny I18N/Collate I18N/LangTags IO/Compress IO/Socket/IP IO/Zlib IPC/Cmd IPC/Open3 JSON/PP Locale/Codes Locale/Maketext Locale/Maketext/Simple Math/BigInt Math/BigRat Math/Complex Memoize Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Metadata NEXT Net/Ping Params/Check Parse/CPAN/Meta Perl/OSType PerlIO/via/QuotedPrint Pod/Checker Pod/Escapes Pod/Functions Pod/Html Pod/Parser Pod/Perldoc Pod/Simple Pod/Usage Safe Search/Dict SelfLoader Term/ANSIColor Term/Cap Term/Complete Term/ReadLine Test Test/Harness Test/Simple Text/Abbrev Text/Balanced Text/ParseWords Text/Tabs Thread/Queue Thread/Semaphore Tie/File Tie/Memoize Tie/RefHash Time/Local XSLoader autodie autouse base bignum constant encoding/warnings experimental if lib libnet parent perlfaq podlators Unicode/Normalize version' +dynamic_ext='B Compress/Raw/Bzip2 Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/DosGlob File/Glob Filter/Util/Call GDBM_File Hash/Util Hash/Util/FieldHash I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Tie/Hash/NamedCapture Time/HiRes Time/Piece Unicode/Collate XS/APItest XS/Typemap arybase attributes mro re threads threads/shared' + +# No need to change anything from here on +owrt:perllibpath="/usr/lib/perl5/$PERL_REVISION.$PERL_VERSION" + +revision="$PERL_REVISION" +patchlevel="$PERL_VERSION" +subversion="$PERL_SUBVERSION" +version_patchlevel_string="version $PERL_VERSION subversion $PERL_SUBVERSION" +version="$PERL_REVISION.$PERL_VERSION.$PERL_SUBVERSION" + +api_revision="$PERL_API_REVISION" +api_version="$PERL_API_VERSION" +api_subversion="$PERL_API_SUBVERSION" +api_versionstring="$PERL_API_REVISION.$PERL_API_VERSION.$PERL_API_SUBVERSION" + +privlib="$owrt:perllibpath" +privlibexp="$privlib" +archlib="$owrt:perllibpath" +archlibexp="$archlib" + +installarchlib="$owrt:perllibpath" +installprivlib="$owrt:perllibpath" +installsitearch="$owrt:perllibpath" +installsitelib="$owrt:perllibpath" diff --git a/lang/perl/files/x86_64.config b/lang/perl/files/x86_64.config new file mode 100644 index 00000000..ac16efc4 --- /dev/null +++ b/lang/perl/files/x86_64.config @@ -0,0 +1,31 @@ +owrt:arch=x86_64 +owrt:bits=64 +owrt:endian=little + +ccsymbols='' +cppccsymbols='' +cppsymbols='__ELF__=1 _LP64=1 __FLT_EVAL_METHOD__=0 __FXSR__=1 __GCC_ATOMIC_LLONG_LOCK_FREE=2 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1 __INT64_MAX__=9223372036854775807L __INT64_TYPE__=long\ int __INTMAX_MAX__=9223372036854775807L __INTMAX_TYPE__=long\ int __INTPTR_MAX__=9223372036854775807L __INTPTR_TYPE__=long\ int __INT_FAST16_MAX__=9223372036854775807L __INT_FAST16_TYPE__=long\ int __INT_FAST32_MAX__=9223372036854775807L __INT_FAST32_TYPE__=long\ int __INT_FAST64_MAX__=9223372036854775807L __INT_FAST64_TYPE__=long\ int __INT_LEAST64_MAX__=9223372036854775807L __INT_LEAST64_TYPE__=long\ int __LONG_MAX__=9223372036854775807L __LP64__=1 __MMX__=1 __PTRDIFF_MAX__=9223372036854775807L __PTRDIFF_TYPE__=long\ int __SIZEOF_INT128__=16 __SIZEOF_LONG_DOUBLE__=16 __SIZEOF_LONG__=8 __SIZEOF_POINTER__=8 __SIZEOF_PTRDIFF_T__=8 __SIZEOF_SIZE_T__=8 __SIZE_MAX__=18446744073709551615UL __SIZE_TYPE__=long\ unsigned\ int __SSE2_MATH__=1 __SSE2__=1 __SSE_MATH__=1 __SSE__=1 __UINT64_MAX__=18446744073709551615UL __UINT64_TYPE__=long\ unsigned\ int __UINTMAX_MAX__=18446744073709551615UL __UINTMAX_TYPE__=long\ unsigned\ int __UINTPTR_MAX__=18446744073709551615UL __UINTPTR_TYPE__=long\ unsigned\ int __UINT_FAST16_MAX__=18446744073709551615UL __UINT_FAST16_TYPE__=long\ unsigned\ int __UINT_FAST32_MAX__=18446744073709551615UL __UINT_FAST32_TYPE__=long\ unsigned\ int __UINT_FAST64_MAX__=18446744073709551615UL __UINT_FAST64_TYPE__=long\ unsigned\ int __UINT_LEAST64_MAX__=18446744073709551615UL __UINT_LEAST64_TYPE__=long\ unsigned\ int __WCHAR_MAX__=2147483647 __WCHAR_MIN__=(-2147483647\ -\ 1) __WCHAR_TYPE__=int __amd64=1 __amd64__=1 __code_model_small__=1 __k8=1 __k8__=1 __x86_64=1 __x86_64__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1' +d_casti32='undef' +d_double_style_ieee='define' +d_long_double_style_ieee='define' +d_long_double_style_ieee_extended='define' +d_modflproto='define' +doublekind='3' +fpossize='16' +longdblkind='3' +need_va_copy='define' +quadkind='2' + +sPRIEUldbl='"LE"' +sPRIFUldbl='"LF"' +sPRIGUldbl='"LG"' +sPRIXU64='"lX"' +sPRIeldbl='"Le"' +sPRIfldbl='"Lf"' +sPRIgldbl='"Lg"' +sSCNfldbl='"Lf"' + +owrt:sig_count='64' +owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS' +owrt:sig_name_extra='IOT CLD POLL UNUSED' +owrt:sig_num_extra='6 17 29 31' diff --git a/lang/perl/patches/010-musl-compat.patch b/lang/perl/patches/010-musl-compat.patch new file mode 100644 index 00000000..c1479ff2 --- /dev/null +++ b/lang/perl/patches/010-musl-compat.patch @@ -0,0 +1,11 @@ +--- a/perl.c ++++ b/perl.c +@@ -286,7 +286,7 @@ perl_construct(pTHXx) + PL_localpatches = local_patches; /* For possible -v */ + #endif + +-#if defined(LIBM_LIB_VERSION) ++#if defined(LIBM_LIB_VERSION) && (defined(__GLIBC__) || defined(__UCLIBC__)) + /* + * Some BSDs and Cygwin default to POSIX math instead of IEEE. + * This switches them over to IEEE. diff --git a/lang/perl/patches/020-storables-stacksize.patch b/lang/perl/patches/020-storables-stacksize.patch new file mode 100644 index 00000000..a2fff02f --- /dev/null +++ b/lang/perl/patches/020-storables-stacksize.patch @@ -0,0 +1,73 @@ +From 682a4acb98783a7f9b5c286b308f12863599fec3 Mon Sep 17 00:00:00 2001 +From: Tony Cook +Date: Mon, 30 Jul 2018 21:00:52 +1000 +Subject: (perl #133411) don't try to load Storable with -Dusecrosscompile + +--- + dist/Storable/Makefile.PL | 9 ++++++++- + dist/Storable/stacksize | 10 +++++++--- + 2 files changed, 15 insertions(+), 4 deletions(-) + +diff --git a/dist/Storable/Makefile.PL b/dist/Storable/Makefile.PL +index a5d9e66891..db420ab30b 100644 +--- a/dist/Storable/Makefile.PL ++++ b/dist/Storable/Makefile.PL +@@ -90,12 +90,19 @@ sub depend { + # blib.pm needs arch/lib + $extra_deps = ' Storable.pm'; + } ++ my $whichperl; ++ if ($Config::Config{usecrosscompile}) { ++ $whichperl = '$(PERLRUN)'; ++ } ++ else { ++ $whichperl = '$(FULLPERLRUNINST)'; ++ } + my $linktype = uc($_[0]->{LINKTYPE}); + my $limit_pm = File::Spec->catfile('lib', 'Storable', 'Limit.pm'); + " + $limit_pm : stacksize \$(INST_$linktype)$extra_deps + \$(MKPATH) \$(INST_LIB) +- \$(FULLPERLRUNINST) stacksize $options ++ $whichperl stacksize $options + + release : dist + git tag \$(VERSION) +diff --git a/dist/Storable/stacksize b/dist/Storable/stacksize +index 7abd3a84cc..14e0739734 100644 +--- a/dist/Storable/stacksize ++++ b/dist/Storable/stacksize +@@ -7,6 +7,9 @@ use Cwd; + use File::Spec; + use strict; + ++-d "lib" or mkdir "lib"; ++-d "lib/Storable" or mkdir "lib/Storable"; ++ + my $fn = "lib/Storable/Limit.pm"; + my $ptrsize = $Config{ptrsize}; + my ($bad1, $bad2) = (65001, 25000); +@@ -29,6 +32,10 @@ sub is_miniperl { + } + + if (is_miniperl()) { ++ if ($Config{usecrosscompile}) { ++ write_limits(500, 265); ++ exit; ++ } + die "Should not run during miniperl\n"; + } + my $prefix = ""; +@@ -68,9 +75,6 @@ if ($ENV{PERL_CORE}) { + } + } + +--d "lib" or mkdir "lib"; +--d "lib/Storable" or mkdir "lib/Storable"; +- + if ($^O eq "MSWin32") { + require Win32; + my ($str, $major, $minor) = Win32::GetOSVersion(); +-- +2.11.0 + diff --git a/lang/perl/patches/100-fix-cross-compile-endianness-detection.patch b/lang/perl/patches/100-fix-cross-compile-endianness-detection.patch new file mode 100644 index 00000000..e187941e --- /dev/null +++ b/lang/perl/patches/100-fix-cross-compile-endianness-detection.patch @@ -0,0 +1,22 @@ +--- a/config_h.SH ++++ b/config_h.SH +@@ -52,6 +52,19 @@ sed <$CONFIG_H -e 's!^#und + #ifndef _config_h_ + #define _config_h_ + ++#if defined(USE_CROSS_COMPILE) && !defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) ++# include ++# if defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN) ++# if (__BYTE_ORDER == __LITTLE_ENDIAN) ++# define __LITTLE_ENDIAN__ ++# elif (__BYTE_ORDER == __BIG_ENDIAN) ++# define __BIG_ENDIAN__ ++# else ++# error Unknown endianness ++# endif ++# endif ++#endif ++ + /* LOC_SED: + * This symbol holds the complete pathname to the sed program. + */ diff --git a/lang/perl/patches/110-always_use_miniperl.patch b/lang/perl/patches/110-always_use_miniperl.patch new file mode 100644 index 00000000..147c2d38 --- /dev/null +++ b/lang/perl/patches/110-always_use_miniperl.patch @@ -0,0 +1,27 @@ +--- a/Makefile.SH ++++ b/Makefile.SH +@@ -334,22 +334,11 @@ MANIFEST_SRT = MANIFEST.srt + + !GROK!THIS! + +-case "$usecrosscompile$perl" in +-define?*) +- $spitshell >>$Makefile <>$Makefile <>$Makefile <>$Makefile < "relink"); diff --git a/lang/perl/patches/320-copy-pod-hack.patch b/lang/perl/patches/320-copy-pod-hack.patch new file mode 100644 index 00000000..9afb8a8c --- /dev/null +++ b/lang/perl/patches/320-copy-pod-hack.patch @@ -0,0 +1,42 @@ +--- a/cpan/podlators/Makefile.PL ++++ b/cpan/podlators/Makefile.PL +@@ -18,6 +18,19 @@ use Config; + use ExtUtils::MakeMaker; + use File::Spec; + ++foreach (glob('scripts/pod*.PL')) { ++ # The various pod*.PL extractors change directory. Doing that with relative ++ # paths in @INC breaks. It seems the lesser of two evils to copy (to avoid) ++ # the chdir doing anything, than to attempt to convert lib paths to ++ # absolute, and potentially run into problems with quoting special ++ # characters in the path to our build dir (such as spaces) ++ require File::Copy; ++ ++ my $temp = $_; ++ $temp =~ s!scripts/!!; ++ File::Copy::copy($_, $temp) or die "Can't copy $temp to $_: $!"; ++} ++ + # Generate full paths for scripts distributed in the bin directory. Appends + # the .com extension to scripts on VMS, unless they already have the .PL + # extension. +@@ -28,7 +41,7 @@ use File::Spec; + # (Scalar) Space-separated relative paths from top of distribution + sub scripts { + my (@scripts) = @_; +- my @paths = map { File::Spec->catfile('scripts', $_) } @scripts; ++ my @paths = @scripts; + if ($^O eq 'VMS') { + @paths = map { m{ [.] PL \z }xms ? $_ : $_ . '.com' } @paths; + } +@@ -77,8 +90,8 @@ my %metadata = ( + + # Override the files that generate section 1 man pages. + MAN1PODS => { +- man1pod('scripts', 'pod2man.PL'), +- man1pod('scripts', 'pod2text.PL'), ++ man1pod('.', 'pod2man.PL'), ++ man1pod('.', 'pod2text.PL'), + + # Perl core uses a separate copy in the top-level pod directory. + ($ENV{PERL_CORE} ? () : man1pod('pod', 'perlpodstyle.pod')), diff --git a/lang/perl/patches/710-threads_join-skip_ps_on_busybox.patch b/lang/perl/patches/710-threads_join-skip_ps_on_busybox.patch new file mode 100644 index 00000000..e60ee8cc --- /dev/null +++ b/lang/perl/patches/710-threads_join-skip_ps_on_busybox.patch @@ -0,0 +1,81 @@ +perl: Skip $0 test on busybox + +This test requires a ps which provides the -f option, as well as suitable output. +We can't provide either with busybox. Just skip it for now. + +Signed-off-by: Marcel Denia + +--- a/dist/threads/t/join.t ++++ b/dist/threads/t/join.t +@@ -110,36 +110,41 @@ sub skip { + + # We parse ps output so this is OS-dependent. + if ($^O eq 'linux') { +- # First modify $0 in a subthread. +- #print "# mainthread: \$0 = $0\n"; +- threads->create(sub{ #print "# subthread: \$0 = $0\n"; +- $0 = "foobar"; +- #print "# subthread: \$0 = $0\n" +- })->join; +- #print "# mainthread: \$0 = $0\n"; +- #print "# pid = $$\n"; +- if (open PS, "ps -f |") { # Note: must work in (all) systems. +- my ($sawpid, $sawexe); +- while () { +- chomp; +- #print "# [$_]\n"; +- if (/^\s*\S+\s+$$\s/) { +- $sawpid++; +- if (/\sfoobar\s*$/) { # Linux 2.2 leaves extra trailing spaces. +- $sawexe++; +- } +- last; +- } +- } +- close PS or die; +- if ($sawpid) { +- ok($sawpid && $sawexe, 'altering $0 is effective'); +- } else { +- skip("\$0 check: did not see pid $$ in 'ps -f |'"); +- } +- } else { +- skip("\$0 check: opening 'ps -f |' failed: $!"); +- } ++ if (readlink('/bin/ps') ne 'busybox') { ++ # First modify $0 in a subthread. ++ #print "# mainthread: \$0 = $0\n"; ++ threads->create(sub{ #print "# subthread: \$0 = $0\n"; ++ $0 = "foobar"; ++ #print "# subthread: \$0 = $0\n" ++ })->join; ++ #print "# mainthread: \$0 = $0\n"; ++ #print "# pid = $$\n"; ++ if (open PS, "ps -f |") { # Note: must work in (all) systems. ++ my ($sawpid, $sawexe); ++ while () { ++ chomp; ++ #print "# [$_]\n"; ++ if (/^\s*\S+\s+$$\s/) { ++ $sawpid++; ++ if (/\sfoobar\s*$/) { # Linux 2.2 leaves extra trailing spaces. ++ $sawexe++; ++ } ++ last; ++ } ++ } ++ close PS or die; ++ if ($sawpid) { ++ ok($sawpid && $sawexe, 'altering $0 is effective'); ++ } else { ++ skip("\$0 check: did not see pid $$ in 'ps -f |'"); ++ } ++ } else { ++ skip("\$0 check: opening 'ps -f |' failed: $!"); ++ } ++ } ++ else { ++ skip("\$0 check: incompatible with busybox"); ++ } + } else { + skip("\$0 check: only on Linux"); + } diff --git a/lang/perl/patches/900-use-rm-force.patch b/lang/perl/patches/900-use-rm-force.patch new file mode 100644 index 00000000..1eac6ce3 --- /dev/null +++ b/lang/perl/patches/900-use-rm-force.patch @@ -0,0 +1,285 @@ +--- a/Makefile.SH 2017-10-17 11:59:52.938763142 -0600 ++++ b/Makefile.SH 2017-10-17 12:13:46.202555604 -0600 +@@ -275,6 +275,7 @@ LNS = $lns + # NOTE: some systems don't grok "cp -f". XXX Configure test needed? + CPS = $cp + RMS = rm -f ++RMS_R = rm -rf + ranlib = $ranlib + + # The following are mentioned only to make metaconfig include the +@@ -736,7 +737,7 @@ bitcount.h: generate_uudmap$(HOST_EXE_EX + ./generate_uudmap$(HOST_EXE_EXT) $(generated_headers) + + generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT) +- -@rm generate_uudmap$(HOST_EXE_EXT) ++ @$(RMS) generate_uudmap$(HOST_EXE_EXT) + $(LNS) $(HOST_GENERATE) generate_uudmap$(HOST_EXE_EXT) + + !NO!SUBS! +@@ -876,26 +877,26 @@ mydtrace.h: $(DTRACE_H) + define) + $spitshell >>$Makefile <<'!NO!SUBS!' + $(DTRACE_MINI_O): perldtrace.d $(miniperl_objs_nodt) +- -rm -rf mpdtrace ++ $(RMS_R) mpdtrace + mkdir mpdtrace + cp $(miniperl_objs_nodt) mpdtrace/ + $(DTRACE) -G -s perldtrace.d -o $(DTRACE_MINI_O) $(miniperl_dtrace_objs) + + $(DTRACE_PERLLIB_O): perldtrace.d $(perllib_objs_nodt) +- -rm -rf libpdtrace ++ $(RMS_R) libpdtrace + mkdir libpdtrace + cp $(perllib_objs_nodt) libpdtrace/ + $(DTRACE) -G -s perldtrace.d -o $(DTRACE_PERLLIB_O) $(perllib_dtrace_objs) + + $(DTRACE_MAIN_O): perldtrace.d perlmain$(OBJ_EXT) +- -rm -rf maindtrace ++ $(RMS_R) maindtrace + mkdir maindtrace + cp perlmain$(OBJ_EXT) maindtrace/ + $(DTRACE) -G -s perldtrace.d -o $(DTRACE_MAIN_O) $(perlmain_dtrace_objs) || \ + ( $(ECHO) "No probes in perlmain$(OBJ_EXT), generating a dummy $(DTRACE_MAIN_O)" && \ + $(ECHO) >dtrace_main.c && \ + `$(CCCMD)` $(PLDLFLAGS) dtrace_main.c && \ +- rm -f dtrace_main.c ) ++ $(RMS) dtrace_main.c ) + + !NO!SUBS! + ;; +@@ -906,13 +907,13 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD + case "$useshrplib" in + true) + $spitshell >>$Makefile <<'!NO!SUBS!' +- rm -f $@ ++ $(RMS) $@ + $(LD) -o $@ $(SHRPLDFLAGS) $(perllib_objs) $(DYNALOADER) $(libs) + !NO!SUBS! + case "$osname" in + aix) + $spitshell >>$Makefile <<'!NO!SUBS!' +- rm -f libperl$(OBJ_EXT) ++ $(RMS) libperl$(OBJ_EXT) + mv $@ libperl$(OBJ_EXT) + $(AR) qv $(LIBPERL) libperl$(OBJ_EXT) + !NO!SUBS! +@@ -921,7 +922,7 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD + ;; + *) + $spitshell >>$Makefile <<'!NO!SUBS!' +- rm -f $(LIBPERL) ++ $(RMS) $(LIBPERL) + $(AR) rc $(LIBPERL) $(perllib_objs) $(DYNALOADER) + @$(ranlib) $(LIBPERL) + !NO!SUBS! +@@ -954,7 +955,7 @@ $(MINIPERL_EXE): lib/buildcustomize.pl + amigaos*) + $spitshell >>$Makefile <<'!NO!SUBS!' + lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl +- -@rm -f miniperl.xok ++ @$(RMS) miniperl.xok + $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \ + $(miniperl_objs) $(libs) + # $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' +@@ -992,7 +993,7 @@ NAMESPACEFLAGS = -force_flat_namespace + esac + $spitshell >>$Makefile <<'!NO!SUBS!' + lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl +- -@rm -f miniperl.xok ++ @$(RMS) miniperl.xok + $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \ + $(miniperl_objs) $(libs) + $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' +@@ -1003,8 +1004,8 @@ lib/buildcustomize.pl: $& $(miniperl_obj + if test "X$hostperl" != X; then + $spitshell >>$Makefile <' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' + \$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname" +@@ -1012,7 +1013,7 @@ lib/buildcustomize.pl: \$& \$(miniperl_d + else + $spitshell >>$Makefile <<'!NO!SUBS!' + lib/buildcustomize.pl: $& $(miniperl_dep) write_buildcustomize.pl +- -@rm -f miniperl.xok ++ @$(RMS) miniperl.xok + $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \ + $(miniperl_objs) $(libs) + $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' +@@ -1025,7 +1026,7 @@ lib/buildcustomize.pl: $& $(miniperl_dep + $spitshell >>$Makefile <<'!NO!SUBS!' + + $(PERL_EXE): $& $(perlmain_dep) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) write_buildcustomize.pl +- -@rm -f miniperl.xok ++ @$(RMS) miniperl.xok + !NO!SUBS! + + case $osname in +@@ -1119,8 +1120,8 @@ pod/perl5280delta.pod: pod/perldelta.pod + $(LNS) perldelta.pod pod/perl5280delta.pod + + extra.pods: $(MINIPERL_EXE) +- -@test ! -f extra.pods || rm -f `cat extra.pods` +- -@rm -f extra.pods ++ -@test ! -f extra.pods || $(RMS) `cat extra.pods` ++ @$(RMS) extra.pods + -@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \ + nx=`echo $$x | sed -e "s/README\.//"`; \ + $(LNS) ../$$x "pod/perl"$$nx".pod" ; \ +@@ -1340,11 +1341,11 @@ realclean: _realcleaner _mopup + @echo "Note that '$(MAKE) realclean' does not delete config.sh or Policy.sh" + + _clobber: +- -@rm -f Cross/run-* Cross/to-* Cross/from-* Cross/mkdir +- -rm -rf host +- rm -f t/test_state +- rm -f config.sh cppstdin Policy.sh extras.lst +- rm -f $(MANIFEST_SRT) ++ @$(RMS) Cross/run-* Cross/to-* Cross/from-* Cross/mkdir ++ $(RMS_R) host ++ $(RMS) t/test_state ++ $(RMS) config.sh cppstdin Policy.sh extras.lst ++ $(RMS) $(MANIFEST_SRT) + + clobber: _realcleaner _mopup _clobber + +@@ -1352,23 +1353,23 @@ distclean: clobber + + # Like distclean but also removes emacs backups and *.orig. + veryclean: _verycleaner _mopup _clobber +- -@rm -f Obsolete Wanted ++ $(RMS) Obsolete Wanted + + # Do not 'make _mopup' directly. + _mopup: +- rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c opmini.c perlmini.c generate_uudmap$(EXE_EXT) $(generated_headers) ++ $(RMS) *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c opmini.c perlmini.c generate_uudmap$(EXE_EXT) $(generated_headers) + -rmdir .depending +- -@test -f extra.pods && rm -f `cat extra.pods` +- -@test -f vms/README_vms.pod && rm -f vms/README_vms.pod +- -rm -f perl.exp ext.libs $(generated_pods) uni.data opmini.o perlmini.o pod/roffitall +- -rm -f perl.export perl.dll perl.libexp perl.map perl.def +- -rm -f *perl.xok +- -rm -f cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump +- -rm -f $(PERL_EXE) $(MINIPERL_EXE) $(LIBPERL) libperl.* microperl +- -rm -f config.arch config.over $(DTRACE_H) ++ -@test -f extra.pods && $(RMS) `cat extra.pods` ++ -@test -f vms/README_vms.pod && $(RMS) vms/README_vms.pod ++ $(RMS) perl.exp ext.libs $(generated_pods) uni.data opmini.o perlmini.o pod/roffitall ++ $(RMS) perl.export perl.dll perl.libexp perl.map perl.def ++ $(RMS) *perl.xok ++ $(RMS) cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump ++ $(RMS) $(PERL_EXE) $(MINIPERL_EXE) $(LIBPERL) libperl.* microperl ++ $(RMS) config.arch config.over $(DTRACE_H) + + _cleaner1: +- -cd os2; rm -f Makefile ++ -cd os2; $(RMS) Makefile + -cd pod; $(LDLIBPTH) $(MAKE) $(CLEAN) + -cd utils; $(LDLIBPTH) $(MAKE) $(CLEAN) + -@if test -f $(MINIPERL_EXE) ; then \ +@@ -1378,31 +1379,31 @@ _cleaner1: + else \ + sh $(CLEAN).sh ; \ + fi +- rm -f realclean.sh veryclean.sh +- -rm -f `grep -v ^# mkppport.lst | grep . | sed -e 's/$$/\/ppport.h/'` ++ $(RMS) realclean.sh veryclean.sh ++ $(RMS) `grep -v ^# mkppport.lst | grep . | sed -e 's/$$/\/ppport.h/'` + + # Dear POSIX, thanks for making the default to xargs to be + # run once if nothhing is passed in. It is such a great help. + + # Some systems do not support "?", so keep these files separate. + _cleaner2: +- -rm -f core.*perl.*.? t/core.perl.*.? .?*.c +- rm -f core *perl.core t/core t/*perl.core core.* t/core.* +- rm -f t/$(PERL_EXE) t/rantests +- rm -rf t/tmp* +- rm -rf $(addedbyconf) +- rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old makefile.old utils/Makefile +- rm -f $(private) +- rm -rf $(unidatafiles) $(unidatadirs) +- rm -rf lib/auto +- rm -f lib/.exists lib/*/.exists lib/*/*/.exists +- rm -f h2ph.man +- rm -rf .config +- rm -f preload +- rm -f pod2htmd.tmp +- rm -rf pod/perlfunc pod/perlipc ++ $(RMS) core.*perl.*.? t/core.perl.*.? .?*.c ++ $(RMS) core *perl.core t/core t/*perl.core core.* t/core.* ++ $(RMS) t/$(PERL_EXE) t/rantests ++ $(RMS_R) t/tmp* ++ $(RMS_R) $(addedbyconf) ++ $(RMS) $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old makefile.old utils/Makefile ++ $(RMS) $(private) ++ $(RMS_R) $(unidatafiles) $(unidatadirs) ++ $(RMS_R) lib/auto ++ $(RMS) lib/.exists lib/*/.exists lib/*/*/.exists ++ $(RMS) h2ph.man ++ $(RMS_R) .config ++ $(RMS) preload ++ $(RMS) pod2htmd.tmp ++ $(RMS_R) pod/perlfunc pod/perlipc + -rmdir ext/B/lib +- rm -f so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR) ++ $(RMS) so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR) + -rmdir lib/version lib/threads lib/inc/ExtUtils lib/inc lib/encoding + -rmdir lib/autodie/exception lib/autodie/Scope lib/autodie lib/XS + -rmdir lib/Win32API lib/VMS lib/Unicode/Collate/Locale +@@ -1452,11 +1453,11 @@ _realcleaner: + _verycleaner: + @$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=veryclean + @$(LDLIBPTH) $(MAKE) _cleaner2 +- -rm -f *~ *.orig */*~ */*.orig */*/*~ */*/*.orig ++ $(RMS) *~ *.orig */*~ */*.orig */*/*~ */*/*.orig + + .PHONY: lint + lint: $(c) +- rm -f *.ln ++ $(RMS) *.ln + lint $(lintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(c) + + cscopeflags = -Rb # Recursive, build-only. +@@ -1514,7 +1515,7 @@ case "$targethost" in + '') $spitshell >>$Makefile <<'!NO!SUBS!' + test_prep test-prep: test_prep_pre $(MINIPERL_EXE) $(unidatafiles) $(PERL_EXE) \ + $(dynamic_ext) $(TEST_PERL_DLL) runtests $(generated_pods) common_build +- cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE)) ++ cd t && ($(RMS) $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE)) + + !NO!SUBS! + ;; +@@ -1564,7 +1565,7 @@ test_prep test-prep: test_prep_pre \$(MI + $to config.sh + # --- For lib/diagnostics.t with -Duseshrplib + $to \$(PERL_EXE) +- cd t && (rm -f \$(PERL_EXE); \$(LNS) ../\$(PERL_EXE) \$(PERL_EXE)) && cd .. ++ cd t && (\$(RMS) \$(PERL_EXE); \$(LNS) ../\$(PERL_EXE) \$(PERL_EXE)) && cd .. + $to t/\$(PERL_EXE) + + !GROK!THIS! +@@ -1574,7 +1575,7 @@ esac + $spitshell >>$Makefile <<'!NO!SUBS!' + test_prep_reonly: $(MINIPERL_EXE) $(PERL_EXE) $(dynamic_ext_re) $(TEST_PERL_DLL) + $(MINIPERL) make_ext.pl $(dynamic_ext_re) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic +- cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE)) ++ cd t && ($(RMS) $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE)) + !NO!SUBS! + + case "$targethost" in +@@ -1629,7 +1630,7 @@ minitest_prep: + @echo "You may see some irrelevant test failures if you have been unable" + @echo "to build lib/Config.pm, or the Unicode data files." + @echo " " +- - cd t && (rm -f $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE)) ++ - cd t && ($(RMS) $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE)) + + MINITEST_TESTS = base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t + diff --git a/lang/perl/patches/910-miniperl-needs-inc-dot.patch b/lang/perl/patches/910-miniperl-needs-inc-dot.patch new file mode 100644 index 00000000..d6ef98ba --- /dev/null +++ b/lang/perl/patches/910-miniperl-needs-inc-dot.patch @@ -0,0 +1,39 @@ +--- a/Makefile.SH 2017-10-15 18:57:08.436234652 -0600 ++++ b/Makefile.SH 2017-10-15 19:02:47.587658819 -0600 +@@ -328,7 +328,7 @@ PATH_SEP = $p_ + # Macros to invoke a copy of miniperl during the build. Targets which + # are built using these macros should depend on \$(MINIPERL_EXE) + MINIPERL_EXE = miniperl\$(EXE_EXT) +-MINIPERL = \$(LDLIBPTH) ./miniperl\$(EXE_EXT) -Ilib ++MINIPERL = \$(LDLIBPTH) ./miniperl\$(EXE_EXT) -Ilib -I. + + # Macros to invoke sort the MANIFEST during build + MANIFEST_SRT = MANIFEST.srt +@@ -991,7 +991,7 @@ NAMESPACEFLAGS = -force_flat_namespace + @$(RMS) miniperl.xok + $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \ + $(miniperl_objs) $(libs) +- $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' ++ $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -I. -Idist/Exporter/lib -MExporter -e '' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' + $(MINIPERL) -f write_buildcustomize.pl + !NO!SUBS! + ;; +@@ -1002,16 +1002,16 @@ lib/buildcustomize.pl: $& $(miniperl_obj + @\$(RMS) miniperl.xok + @\$(RMS) \$(MINIPERL_EXE) + \$(LNS) \$(HOST_PERL) \$(MINIPERL_EXE) +- \$(LDLIBPTH) ./miniperl\$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' ++ \$(LDLIBPTH) ./miniperl\$(HOST_EXE_EXT) -w -Ilib -I. -Idist/Exporter/lib -MExporter -e '' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' + \$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname" + !GROK!THIS! + else + $spitshell >>$Makefile <<'!NO!SUBS!' + lib/buildcustomize.pl: $& $(miniperl_dep) write_buildcustomize.pl + @$(RMS) miniperl.xok + $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \ + $(miniperl_objs) $(libs) +- $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' ++ $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -I. -Idist/Exporter/lib -MExporter -e '' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' + $(MINIPERL) -f write_buildcustomize.pl + !NO!SUBS! + fi diff --git a/lang/perl/patches/920-fix-no-locale.patch b/lang/perl/patches/920-fix-no-locale.patch new file mode 100644 index 00000000..594695b4 --- /dev/null +++ b/lang/perl/patches/920-fix-no-locale.patch @@ -0,0 +1,399 @@ +commit d36adde059ed1c4f7af210b4f9fc3a7bd2d7d343 +Author: Karl Williamson +Date: Wed May 23 15:32:47 2018 -0600 + + Fix to compile under -DNO_LOCALE + + Several problems with this compile option were not caught before 5.28 + was frozen. + +diff --git a/embed.fnc b/embed.fnc +index 0f06e38..36f9f97 100644 +--- a/embed.fnc ++++ b/embed.fnc +@@ -2765,9 +2765,11 @@ s |bool |isa_lookup |NN HV *stash|NN const char * const name \ + #endif + + #if defined(PERL_IN_LOCALE_C) ++# ifdef USE_LOCALE + sn |const char*|category_name |const int category + s |const char*|switch_category_locale_to_template|const int switch_category|const int template_category|NULLOK const char * template_locale + s |void |restore_switched_locale|const int category|NULLOK const char * const original_locale ++# endif + # ifdef HAS_NL_LANGINFO + sn |const char*|my_nl_langinfo|const nl_item item|bool toggle + # else +diff --git a/embed.h b/embed.h +index cf3ad9e..fb66c26 100644 +--- a/embed.h ++++ b/embed.h +@@ -1724,16 +1724,16 @@ + #define unshare_hek_or_pvn(a,b,c,d) S_unshare_hek_or_pvn(aTHX_ a,b,c,d) + # endif + # if defined(PERL_IN_LOCALE_C) +-#define category_name S_category_name +-#define restore_switched_locale(a,b) S_restore_switched_locale(aTHX_ a,b) + #define save_to_buffer S_save_to_buffer +-#define switch_category_locale_to_template(a,b,c) S_switch_category_locale_to_template(aTHX_ a,b,c) + # if defined(USE_LOCALE) ++#define category_name S_category_name + #define new_collate(a) S_new_collate(aTHX_ a) + #define new_ctype(a) S_new_ctype(aTHX_ a) + #define new_numeric(a) S_new_numeric(aTHX_ a) ++#define restore_switched_locale(a,b) S_restore_switched_locale(aTHX_ a,b) + #define set_numeric_radix(a) S_set_numeric_radix(aTHX_ a) + #define stdize_locale(a) S_stdize_locale(aTHX_ a) ++#define switch_category_locale_to_template(a,b,c) S_switch_category_locale_to_template(aTHX_ a,b,c) + # if defined(USE_POSIX_2008_LOCALE) + #define emulate_setlocale S_emulate_setlocale + # endif +diff --git a/locale.c b/locale.c +index 7653340..f8f77fb 100644 +--- a/locale.c ++++ b/locale.c +@@ -1264,6 +1264,7 @@ S_locking_setlocale(pTHX_ + } + + #endif ++#ifdef USE_LOCALE + + STATIC void + S_set_numeric_radix(pTHX_ const bool use_locale) +@@ -1299,6 +1300,10 @@ S_set_numeric_radix(pTHX_ const bool use_locale) + } + + # endif ++#else ++ ++ PERL_UNUSED_ARG(use_locale); ++ + #endif /* USE_LOCALE_NUMERIC and can find the radix char */ + + } +@@ -1481,7 +1486,6 @@ S_new_ctype(pTHX_ const char *newctype) + + #ifndef USE_LOCALE_CTYPE + +- PERL_ARGS_ASSERT_NEW_CTYPE; + PERL_UNUSED_ARG(newctype); + PERL_UNUSED_CONTEXT; + +@@ -1994,6 +1998,8 @@ S_new_collate(pTHX_ const char *newcoll) + + } + ++#endif ++ + #ifdef WIN32 + + STATIC char * +@@ -2139,11 +2145,20 @@ Perl_setlocale(const int category, const char * locale) + { + /* This wraps POSIX::setlocale() */ + ++#ifdef NO_LOCALE ++ ++ PERL_UNUSED_ARG(category); ++ PERL_UNUSED_ARG(locale); ++ ++ return "C"; ++ ++#else ++ + const char * retval; + const char * newlocale; + dSAVEDERRNO; +- DECLARATION_FOR_LC_NUMERIC_MANIPULATION; + dTHX; ++ DECLARATION_FOR_LC_NUMERIC_MANIPULATION; + + #ifdef USE_LOCALE_NUMERIC + +@@ -2262,6 +2277,8 @@ Perl_setlocale(const int category, const char * locale) + + return retval; + ++#endif ++ + } + + PERL_STATIC_INLINE const char * +@@ -2414,13 +2431,16 @@ S_my_nl_langinfo(const int item, bool toggle) + dTHX; + const char * retval; + ++#ifdef USE_LOCALE_NUMERIC ++ + /* We only need to toggle into the underlying LC_NUMERIC locale for these + * two items, and only if not already there */ + if (toggle && (( item != RADIXCHAR && item != THOUSEP) + || PL_numeric_underlying)) +- { ++ ++#endif /* No toggling needed if not using LC_NUMERIC */ ++ + toggle = FALSE; +- } + + #if defined(HAS_NL_LANGINFO) /* nl_langinfo() is available. */ + # if ! defined(HAS_THREAD_SAFE_NL_LANGINFO_L) \ +@@ -2468,6 +2488,8 @@ S_my_nl_langinfo(const int item, bool toggle) + do_free = TRUE; + } + ++# ifdef USE_LOCALE_NUMERIC ++ + if (toggle) { + if (PL_underlying_numeric_obj) { + cur = PL_underlying_numeric_obj; +@@ -2478,6 +2500,8 @@ S_my_nl_langinfo(const int item, bool toggle) + } + } + ++# endif ++ + /* We have to save it to a buffer, because the freelocale() just below + * can invalidate the internal one */ + retval = save_to_buffer(nl_langinfo_l(item, cur), +@@ -5169,9 +5193,7 @@ Perl_my_strerror(pTHX_ const int errnum) + LOCALE_UNLOCK; + + # endif /* End of doesn't have strerror_l */ +-#endif /* End of does have locale messages */ +- +-#ifdef DEBUGGING ++# ifdef DEBUGGING + + if (DEBUG_Lv_TEST) { + PerlIO_printf(Perl_debug_log, "Strerror returned; saving a copy: '"); +@@ -5179,7 +5201,8 @@ Perl_my_strerror(pTHX_ const int errnum) + PerlIO_printf(Perl_debug_log, "'\n"); + } + +-#endif ++# endif ++#endif /* End of does have locale messages */ + + SAVEFREEPV(errstr); + return errstr; +@@ -5301,10 +5324,17 @@ L|perlapi/switch_to_global_locale>. + bool + Perl_sync_locale() + { ++ ++#ifndef USE_LOCALE ++ ++ return TRUE; ++ ++#else ++ + const char * newlocale; + dTHX; + +-#ifdef USE_POSIX_2008_LOCALE ++# ifdef USE_POSIX_2008_LOCALE + + bool was_in_global_locale = FALSE; + locale_t cur_obj = uselocale((locale_t) 0); +@@ -5316,11 +5346,11 @@ Perl_sync_locale() + * will affect the */ + if (cur_obj == LC_GLOBAL_LOCALE) { + +-# ifdef HAS_QUERY_LOCALE ++# ifdef HAS_QUERY_LOCALE + + do_setlocale_c(LC_ALL, setlocale(LC_ALL, NULL)); + +-# else ++# else + + unsigned int i; + +@@ -5330,17 +5360,17 @@ Perl_sync_locale() + do_setlocale_r(categories[i], setlocale(categories[i], NULL)); + } + +-# endif ++# endif + + was_in_global_locale = TRUE; + } + +-#else ++# else + + bool was_in_global_locale = TRUE; + +-#endif +-#ifdef USE_LOCALE_CTYPE ++# endif ++# ifdef USE_LOCALE_CTYPE + + newlocale = savepv(do_setlocale_c(LC_CTYPE, NULL)); + DEBUG_Lv(PerlIO_printf(Perl_debug_log, +@@ -5349,8 +5379,8 @@ Perl_sync_locale() + new_ctype(newlocale); + Safefree(newlocale); + +-#endif /* USE_LOCALE_CTYPE */ +-#ifdef USE_LOCALE_COLLATE ++# endif /* USE_LOCALE_CTYPE */ ++# ifdef USE_LOCALE_COLLATE + + newlocale = savepv(do_setlocale_c(LC_COLLATE, NULL)); + DEBUG_Lv(PerlIO_printf(Perl_debug_log, +@@ -5359,8 +5389,8 @@ Perl_sync_locale() + new_collate(newlocale); + Safefree(newlocale); + +-#endif +-#ifdef USE_LOCALE_NUMERIC ++# endif ++# ifdef USE_LOCALE_NUMERIC + + newlocale = savepv(do_setlocale_c(LC_NUMERIC, NULL)); + DEBUG_Lv(PerlIO_printf(Perl_debug_log, +@@ -5369,9 +5399,12 @@ Perl_sync_locale() + new_numeric(newlocale); + Safefree(newlocale); + +-#endif /* USE_LOCALE_NUMERIC */ ++# endif /* USE_LOCALE_NUMERIC */ + + return was_in_global_locale; ++ ++#endif ++ + } + + #if defined(DEBUGGING) && defined(USE_LOCALE) +diff --git a/makedef.pl b/makedef.pl +index dbd756d..661b71d 100644 +--- a/makedef.pl ++++ b/makedef.pl +@@ -574,6 +574,9 @@ unless ($define{USE_LOCALE_COLLATE}) { + PL_collxfrm_mult + Perl_sv_collxfrm + Perl_sv_collxfrm_flags ++ PL_strxfrm_NUL_replacement ++ PL_strxfrm_is_behaved ++ PL_strxfrm_max_cp + ); + } + +@@ -583,6 +586,9 @@ unless ($define{USE_LOCALE_NUMERIC}) { + PL_numeric_name + PL_numeric_radix_sv + PL_numeric_standard ++ PL_numeric_underlying ++ PL_numeric_underlying_is_standard ++ PL_underlying_numeric_obj + ); + } + +diff --git a/perl.h b/perl.h +index 3e1f6cd..d457776 100644 +--- a/perl.h ++++ b/perl.h +@@ -5657,6 +5657,9 @@ typedef struct am_table_short AMTS; + # define IN_LC_COMPILETIME(category) 0 + # define IN_LC_RUNTIME(category) 0 + # define IN_LC(category) 0 ++# define _CHECK_AND_WARN_PROBLEMATIC_LOCALE ++# define _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(s, send) ++# define _CHECK_AND_OUTPUT_WIDE_LOCALE_CP_MSG(c) + #endif + + +diff --git a/proto.h b/proto.h +index 3e027ab..558c33a 100644 +--- a/proto.h ++++ b/proto.h +@@ -4669,8 +4669,6 @@ PERL_CALLCONV SV* Perl_hfree_next_entry(pTHX_ HV *hv, STRLEN *indexp); + assert(hv); assert(indexp) + #endif + #if defined(PERL_IN_LOCALE_C) +-STATIC const char* S_category_name(const int category); +-STATIC void S_restore_switched_locale(pTHX_ const int category, const char * const original_locale); + #ifndef PERL_NO_INLINE_FUNCTIONS + PERL_STATIC_INLINE const char * S_save_to_buffer(const char * string, char **buf, Size_t *buf_size, const Size_t offset) + __attribute__warn_unused_result__; +@@ -4678,17 +4676,19 @@ PERL_STATIC_INLINE const char * S_save_to_buffer(const char * string, char **buf + assert(buf_size) + #endif + +-STATIC const char* S_switch_category_locale_to_template(pTHX_ const int switch_category, const int template_category, const char * template_locale); + # if defined(USE_LOCALE) ++STATIC const char* S_category_name(const int category); + STATIC void S_new_collate(pTHX_ const char* newcoll); + STATIC void S_new_ctype(pTHX_ const char* newctype); + #define PERL_ARGS_ASSERT_NEW_CTYPE \ + assert(newctype) + STATIC void S_new_numeric(pTHX_ const char* newnum); ++STATIC void S_restore_switched_locale(pTHX_ const int category, const char * const original_locale); + STATIC void S_set_numeric_radix(pTHX_ const bool use_locale); + STATIC char* S_stdize_locale(pTHX_ char* locs); + #define PERL_ARGS_ASSERT_STDIZE_LOCALE \ + assert(locs) ++STATIC const char* S_switch_category_locale_to_template(pTHX_ const int switch_category, const int template_category, const char * template_locale); + # if defined(USE_POSIX_2008_LOCALE) + STATIC const char* S_emulate_setlocale(const int category, const char* locale, unsigned int index, const bool is_index_valid); + # endif +diff --git a/sv.c b/sv.c +index 07865bb..81223ca 100644 +--- a/sv.c ++++ b/sv.c +@@ -13330,10 +13330,15 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p + + SvTAINT(sv); + ++#ifdef USE_LOCALE_NUMERIC ++ + if (lc_numeric_set) { + RESTORE_LC_NUMERIC(); /* Done outside loop, so don't have to + save/restore each iteration. */ + } ++ ++#endif ++ + } + + /* ========================================================================= +diff --git a/t/lib/warnings/regexec b/t/lib/warnings/regexec +index 900dd6e..b9e53c9 100644 +--- a/t/lib/warnings/regexec ++++ b/t/lib/warnings/regexec +@@ -215,6 +215,10 @@ Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - + Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 17. + ######## + # NAME (?[ ]) in non-UTF-8 locale ++require '../loc_tools.pl'; ++unless (locales_enabled()) { ++ print("SKIPPED\n# locales not available\n"),exit; ++} + eval { require POSIX; POSIX->import("locale_h") }; + if ($@) { + print("SKIPPED\n# no POSIX\n"),exit; +@@ -229,14 +233,14 @@ setlocale(&POSIX::LC_CTYPE, "C"); + ":" =~ /(?[ \: ])/; + no warnings 'locale'; + EXPECT +-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 9. +-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 9. +-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 10. +-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 10. +-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 11. +-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 11. +-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 12. +-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 12. ++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 13. ++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 13. ++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 14. ++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 14. ++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 15. ++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 15. ++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 16. ++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 16. + ######## + # NAME (?[ ]) in UTF-8 locale + require '../loc_tools.pl'; diff --git a/lang/perl/perlbase.mk b/lang/perl/perlbase.mk new file mode 100644 index 00000000..9ad9d770 --- /dev/null +++ b/lang/perl/perlbase.mk @@ -0,0 +1,1559 @@ +define Package/perlbase-template +SUBMENU:=Perl +SECTION:=lang +CATEGORY:=Languages +URL:=http://www.cpan.org/ +DEPENDS:=perl +endef + +define Package/perlbase-anydbm-file +$(call Package/perlbase-template) +TITLE:=AnyDBM_File perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-anydbm-file/install +$(call perlmod/Install,$(1),AnyDBM_File.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/AnyDBM_File.t) +endef + +$(eval $(call BuildPackage,perlbase-anydbm-file)) + + +define Package/perlbase-app +$(call Package/perlbase-template) +TITLE:=app perl module +DEPENDS+=+perlbase-autouse +perlbase-base +perlbase-config +perlbase-cpan +perlbase-essential +perlbase-file +perlbase-getopt +perlbase-if +perlbase-tap +perlbase-text +endef + +define Package/perlbase-app/install +$(call perlmod/Install,$(1),App,) +endef + +$(eval $(call BuildPackage,perlbase-app)) + + +define Package/perlbase-archive +$(call Package/perlbase-template) +TITLE:=Archive perl module +DEPENDS+=+perlbase-cwd +perlbase-essential +perlbase-file +perlbase-io +endef + +define Package/perlbase-archive/install +$(call perlmod/Install,$(1),Archive,) +$(call perlmod/InstallBaseTests,$(1),cpan/Archive-Tar/bin cpan/Archive-Tar/t) + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ptar $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ptardiff $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ptargrep $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,perlbase-archive)) + + +define Package/perlbase-arybase +$(call Package/perlbase-template) +TITLE:=arybase perl module +DEPENDS+=+perlbase-xsloader +endef + +define Package/perlbase-arybase/install +$(call perlmod/Install,$(1),arybase.pm auto/arybase,) +$(call perlmod/InstallBaseTests,$(1),ext/arybase/t) +endef + +$(eval $(call BuildPackage,perlbase-arybase)) + + +define Package/perlbase-attribute +$(call Package/perlbase-template) +TITLE:=Attribute perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-attribute/install +$(call perlmod/Install,$(1),Attribute,) +$(call perlmod/InstallBaseTests,$(1),dist/Attribute-Handlers/t) +endef + +$(eval $(call BuildPackage,perlbase-attribute)) + + +define Package/perlbase-attributes +$(call Package/perlbase-template) +TITLE:=attributes perl module +DEPENDS+=+perlbase-essential +perlbase-xsloader +endef + +define Package/perlbase-attributes/install +$(call perlmod/Install,$(1),attributes.pm auto/attributes,) +endef + +$(eval $(call BuildPackage,perlbase-attributes)) + + +define Package/perlbase-autodie +$(call Package/perlbase-template) +TITLE:=autodie perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-autodie/install +$(call perlmod/Install,$(1),autodie autodie.pm,) +$(call perlmod/InstallBaseTests,$(1),cpan/autodie/t) +endef + +$(eval $(call BuildPackage,perlbase-autodie)) + + +define Package/perlbase-autoloader +$(call Package/perlbase-template) +TITLE:=AutoLoader perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-autoloader/install +$(call perlmod/Install,$(1),AutoLoader.pm,) +$(call perlmod/InstallBaseTests,$(1),cpan/AutoLoader/t) +endef + +$(eval $(call BuildPackage,perlbase-autoloader)) + + +define Package/perlbase-autosplit +$(call Package/perlbase-template) +TITLE:=AutoSplit perl module +DEPENDS+=+perlbase-config +perlbase-essential +perlbase-file +endef + +define Package/perlbase-autosplit/install +$(call perlmod/Install/NoStrip,$(1),AutoSplit.pm,) +endef + +$(eval $(call BuildPackage,perlbase-autosplit)) + + +define Package/perlbase-autouse +$(call Package/perlbase-template) +TITLE:=autouse perl module +endef + +define Package/perlbase-autouse/install +$(call perlmod/Install,$(1),autouse.pm,) +$(call perlmod/InstallBaseTests,$(1),dist/autouse/t) +endef + +$(eval $(call BuildPackage,perlbase-autouse)) + + +define Package/perlbase-b +$(call Package/perlbase-template) +TITLE:=B perl module +DEPENDS+=+perlbase-config +perlbase-essential +perlbase-feature +endef + +define Package/perlbase-b/install +$(call perlmod/Install,$(1),B B.pm auto/B,) +$(call perlmod/InstallBaseTests,$(1),cpan/B-Debug/t ext/B/t lib/B/Deparse-core.t lib/B/Deparse-subclass.t lib/B/Deparse.t) +endef + +$(eval $(call BuildPackage,perlbase-b)) + + +define Package/perlbase-base +$(call Package/perlbase-template) +TITLE:=base perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-base/install +$(call perlmod/Install,$(1),base.pm,) +$(call perlmod/InstallBaseTests,$(1),dist/base/t) +endef + +$(eval $(call BuildPackage,perlbase-base)) + + +define Package/perlbase-benchmark +$(call Package/perlbase-template) +TITLE:=Benchmark perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-benchmark/install +$(call perlmod/Install,$(1),Benchmark.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/Benchmark.t) +endef + +$(eval $(call BuildPackage,perlbase-benchmark)) + + +define Package/perlbase-bigint +$(call Package/perlbase-template) +TITLE:=bigint perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-bigint/install +$(call perlmod/Install,$(1),bigint.pm,) +endef + +$(eval $(call BuildPackage,perlbase-bigint)) + + +define Package/perlbase-bignum +$(call Package/perlbase-template) +TITLE:=bignum perl module +DEPENDS+=+perlbase-bigint +perlbase-essential +endef + +define Package/perlbase-bignum/install +$(call perlmod/Install,$(1),bignum.pm bigrat.pm,) +$(call perlmod/InstallBaseTests,$(1),dist/bignum/t) +endef + +$(eval $(call BuildPackage,perlbase-bignum)) + + +define Package/perlbase-blib +$(call Package/perlbase-template) +TITLE:=blib perl module +DEPENDS+=+perlbase-cwd +perlbase-essential +perlbase-file +endef + +define Package/perlbase-blib/install +$(call perlmod/Install,$(1),blib.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/blib.t) +endef + +$(eval $(call BuildPackage,perlbase-blib)) + + +define Package/perlbase-bytes +$(call Package/perlbase-template) +TITLE:=bytes perl module +endef + +define Package/perlbase-bytes/install +$(call perlmod/Install,$(1),bytes.pm bytes_heavy.pl,) +$(call perlmod/InstallBaseTests,$(1),lib/bytes.t) +endef + +$(eval $(call BuildPackage,perlbase-bytes)) + + +define Package/perlbase-charnames +$(call Package/perlbase-template) +TITLE:=charnames perl module +DEPENDS+=+perlbase-bytes +perlbase-essential +perlbase-re +perlbase-unicore +endef + +define Package/perlbase-charnames/install +$(call perlmod/Install,$(1),_charnames.pm charnames.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/charnames.t) +endef + +$(eval $(call BuildPackage,perlbase-charnames)) + + +define Package/perlbase-class +$(call Package/perlbase-template) +TITLE:=Class perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-class/install +$(call perlmod/Install,$(1),Class,) +$(call perlmod/InstallBaseTests,$(1),lib/Class/Struct.t) +endef + +$(eval $(call BuildPackage,perlbase-class)) + + +define Package/perlbase-compress +$(call Package/perlbase-template) +TITLE:=Compress perl module +DEPENDS+=+perlbase-bytes +perlbase-essential +perlbase-io +perlbase-scalar +endef + +define Package/perlbase-compress/install +$(call perlmod/Install,$(1),Compress auto/Compress,) +$(call perlmod/InstallBaseTests,$(1),cpan/Compress-Raw-Bzip2/t cpan/Compress-Raw-Zlib/t) +endef + +$(eval $(call BuildPackage,perlbase-compress)) + + +define Package/perlbase-config +$(call Package/perlbase-template) +TITLE:=Config perl module +endef + +define Package/perlbase-config/install +$(call perlmod/Install,$(1),Config Config.pm Config_git.pl Config_heavy.pl,) +$(call perlmod/InstallBaseTests,$(1),cpan/Config-Perl-V/t lib/Config.t lib/Config/Extensions.t) +endef + +$(eval $(call BuildPackage,perlbase-config)) + + +define Package/perlbase-cpan +$(call Package/perlbase-template) +TITLE:=CPAN perl module +DEPENDS+=+perlbase-b +perlbase-config +perlbase-cwd +perlbase-dirhandle +perlbase-essential +perlbase-extutils +perlbase-fcntl +perlbase-file +perlbase-filehandle +perlbase-http-tiny +perlbase-net +perlbase-safe +perlbase-scalar +perlbase-sys +perlbase-text +endef + +define Package/perlbase-cpan/install +$(call perlmod/Install,$(1),CPAN CPAN.pm Parse/CPAN/Meta.pm,CPAN/FirstTime.pm) +$(call perlmod/Install/NoStrip,$(1),CPAN/FirstTime.pm,) +$(call perlmod/InstallBaseTests,$(1),cpan/CPAN-Meta-Requirements/t cpan/CPAN-Meta-YAML/t cpan/CPAN-Meta/t cpan/CPAN/t cpan/Parse-CPAN-Meta/t) +endef + +$(eval $(call BuildPackage,perlbase-cpan)) + + +define Package/perlbase-cwd +$(call Package/perlbase-template) +TITLE:=Cwd perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-cwd/install +$(call perlmod/Install,$(1),Cwd.pm auto/Cwd,) +endef + +$(eval $(call BuildPackage,perlbase-cwd)) + + +define Package/perlbase-data +$(call Package/perlbase-template) +TITLE:=Data perl module +DEPENDS+=+perlbase-bytes +perlbase-essential +endef + +define Package/perlbase-data/install +$(call perlmod/Install,$(1),Data auto/Data,) +$(call perlmod/InstallBaseTests,$(1),dist/Data-Dumper/t) +endef + +$(eval $(call BuildPackage,perlbase-data)) + + +define Package/perlbase-db +$(call Package/perlbase-template) +TITLE:=DB perl module +DEPENDS+=+libdb47 +perlbase-essential +perlbase-meta-notation +endef + +define Package/perlbase-db/install +$(call perlmod/Install,$(1),DB.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/DB.t) +endef + +$(eval $(call BuildPackage,perlbase-db)) + + +define Package/perlbase-db-file +$(call Package/perlbase-template) +TITLE:=DB_File perl module +DEPENDS+=+libdb47 +perlbase-essential +perlbase-tie +endef + +define Package/perlbase-db-file/install +$(call perlmod/Install,$(1),DB_File.pm auto/DB_File,) +$(call perlmod/InstallBaseTests,$(1),cpan/DB_File/t) +endef + +$(eval $(call BuildPackage,perlbase-db-file)) + + +define Package/perlbase-dbm-filter +$(call Package/perlbase-template) +TITLE:=DBM_Filter perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-dbm-filter/install +$(call perlmod/Install,$(1),DBM_Filter DBM_Filter.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/DBM_Filter/t lib/dbm_filter_util.pl) +endef + +$(eval $(call BuildPackage,perlbase-dbm-filter)) + + +define Package/perlbase-devel +$(call Package/perlbase-template) +TITLE:=Devel perl module +DEPENDS+=+perlbase-essential +perlbase-file +perlbase-selfloader +perlbase-xsloader +endef + +define Package/perlbase-devel/install +$(call perlmod/Install,$(1),Devel auto/Devel,Devel/PPPort.pm) +$(call perlmod/Install/NoStrip,$(1),Devel/PPPort.pm,) +$(call perlmod/InstallBaseTests,$(1),cpan/Devel-PPPort/t dist/Devel-SelfStubber/t ext/Devel-Peek/t) +endef + +$(eval $(call BuildPackage,perlbase-devel)) + + +define Package/perlbase-diagnostics +$(call Package/perlbase-template) +TITLE:=diagnostics perl module +DEPENDS+=+perlbase-config +perlbase-essential +perlbase-text +endef + +define Package/perlbase-diagnostics/install +$(call perlmod/Install,$(1),diagnostics.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/diagnostics.t pod/perldiag.pod) +endef + +$(eval $(call BuildPackage,perlbase-diagnostics)) + + +define Package/perlbase-digest +$(call Package/perlbase-template) +TITLE:=Digest perl module +DEPENDS+=+perlbase-dynaloader +perlbase-essential +perlbase-fcntl +perlbase-integer +endef + +define Package/perlbase-digest/install +$(call perlmod/Install,$(1),Digest Digest.pm auto/Digest,) +$(call perlmod/InstallBaseTests,$(1),cpan/Digest-MD5/MD5.xs cpan/Digest-MD5/t cpan/Digest-SHA/t cpan/Digest/t) + $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/cpan/Digest-SHA/src +endef + +$(eval $(call BuildPackage,perlbase-digest)) + + +define Package/perlbase-dirhandle +$(call Package/perlbase-template) +TITLE:=DirHandle perl module +DEPENDS+=+perlbase-essential +perlbase-symbol +endef + +define Package/perlbase-dirhandle/install +$(call perlmod/Install,$(1),DirHandle.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/DirHandle.t) +endef + +$(eval $(call BuildPackage,perlbase-dirhandle)) + + +define Package/perlbase-dumpvalue +$(call Package/perlbase-template) +TITLE:=Dumpvalue perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-dumpvalue/install +$(call perlmod/Install,$(1),Dumpvalue.pm,) +$(call perlmod/InstallBaseTests,$(1),dist/Dumpvalue/t) +endef + +$(eval $(call BuildPackage,perlbase-dumpvalue)) + + +define Package/perlbase-dumpvar +$(call Package/perlbase-template) +TITLE:=dumpvar perl module +endef + +define Package/perlbase-dumpvar/install +$(call perlmod/Install,$(1),dumpvar.pl,) +$(call perlmod/InstallBaseTests,$(1),lib/dumpvar.t) +endef + +$(eval $(call BuildPackage,perlbase-dumpvar)) + + +define Package/perlbase-dynaloader +$(call Package/perlbase-template) +TITLE:=DynaLoader perl module +DEPENDS+=+perlbase-config +endef + +define Package/perlbase-dynaloader/install +$(call perlmod/Install,$(1),DynaLoader.pm,) +$(call perlmod/InstallBaseTests,$(1),ext/DynaLoader/t) +endef + +$(eval $(call BuildPackage,perlbase-dynaloader)) + + +define Package/perlbase-encode +$(call Package/perlbase-template) +TITLE:=Encode perl module +DEPENDS+=+perlbase-essential +perlbase-mime +perlbase-utf8 +perlbase-xsloader +endef + +define Package/perlbase-encode/install +$(call perlmod/Install,$(1),Encode Encode.pm auto/Encode,Encode/PerlIO.pod Encode/Supported.pod) +$(call perlmod/InstallBaseTests,$(1),cpan/Encode/t) +endef + +$(eval $(call BuildPackage,perlbase-encode)) + + +define Package/perlbase-encoding +$(call Package/perlbase-template) +TITLE:=encoding perl module +DEPENDS+=+perlbase-encode +perlbase-essential +endef + +define Package/perlbase-encoding/install +$(call perlmod/Install,$(1),encoding encoding.pm,) +$(call perlmod/InstallBaseTests,$(1),cpan/encoding-warnings/t) +endef + +$(eval $(call BuildPackage,perlbase-encoding)) + + +define Package/perlbase-english +$(call Package/perlbase-template) +TITLE:=English perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-english/install +$(call perlmod/Install,$(1),English.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/English.t) +endef + +$(eval $(call BuildPackage,perlbase-english)) + + +define Package/perlbase-env +$(call Package/perlbase-template) +TITLE:=Env perl module +DEPENDS+=+perlbase-config +perlbase-tie +endef + +define Package/perlbase-env/install +$(call perlmod/Install,$(1),Env.pm,) +$(call perlmod/InstallBaseTests,$(1),dist/Env/t) +endef + +$(eval $(call BuildPackage,perlbase-env)) + + +define Package/perlbase-errno +$(call Package/perlbase-template) +TITLE:=Errno perl module +DEPENDS+=+perlbase-config +perlbase-essential +endef + +define Package/perlbase-errno/install +$(call perlmod/Install,$(1),Errno.pm,) +$(call perlmod/InstallBaseTests,$(1),ext/Errno/t) +endef + +$(eval $(call BuildPackage,perlbase-errno)) + + +define Package/perlbase-essential +$(call Package/perlbase-template) +TITLE:=essential perl module +DEPENDS+=+perlbase-config +endef + +define Package/perlbase-essential/install +$(call perlmod/Install,$(1),Carp Carp.pm Exporter Exporter.pm constant.pm deprecate.pm lib.pm locale.pm overload.pm overloading.pm parent.pm strict.pm subs.pm vars.pm warnings warnings.pm,) +$(call perlmod/Install/NoStrip,$(1),overload/numbers.pm,) +$(call perlmod/InstallBaseTests,$(1),cpan/parent/t dist/Carp/t dist/Exporter/t dist/constant/t dist/lib/t lib/locale.t lib/overload.t lib/overload64.t lib/overloading.t lib/strict.t lib/subs.t lib/vars.t lib/vars_carp.t lib/warnings.t) +endef + +$(eval $(call BuildPackage,perlbase-essential)) + + +define Package/perlbase-experimental +$(call Package/perlbase-template) +TITLE:=experimental perl module +DEPENDS+=+perlbase-essential +perlbase-feature +perlbase-version +endef + +define Package/perlbase-experimental/install +$(call perlmod/Install,$(1),experimental.pm,) +$(call perlmod/InstallBaseTests,$(1),cpan/experimental/t) +endef + +$(eval $(call BuildPackage,perlbase-experimental)) + + +define Package/perlbase-extutils +$(call Package/perlbase-template) +TITLE:=ExtUtils perl module +DEPENDS+=+perlbase-autosplit +perlbase-base +perlbase-config +perlbase-cwd +perlbase-dirhandle +perlbase-encode +perlbase-essential +perlbase-file +perlbase-io +perlbase-ipc +perlbase-ostype +perlbase-symbol +perlbase-text +endef + +define Package/perlbase-extutils/install +$(call perlmod/Install,$(1),ExtUtils,ExtUtils/MakeMaker/FAQ.pod ExtUtils/MakeMaker/Tutorial.pod ExtUtils/ParseXS.pm ExtUtils/ParseXS/Utilities.pm) +$(call perlmod/Install/NoStrip,$(1),ExtUtils/ParseXS.pm ExtUtils/ParseXS/Utilities.pm,) +$(call perlmod/InstallBaseTests,$(1),cpan/ExtUtils-Command/t cpan/ExtUtils-Constant/t cpan/ExtUtils-Install/t cpan/ExtUtils-MakeMaker/t cpan/ExtUtils-Manifest/t dist/ExtUtils-CBuilder/t dist/ExtUtils-ParseXS/t lib/ExtUtils/t lib/h2ph.t lib/h2xs.t utils/h2ph utils/h2xs) +endef + +$(eval $(call BuildPackage,perlbase-extutils)) + + +define Package/perlbase-fatal +$(call Package/perlbase-template) +TITLE:=Fatal perl module +DEPENDS+=+perlbase-autodie +perlbase-config +perlbase-essential +perlbase-scalar +perlbase-tie +endef + +define Package/perlbase-fatal/install +$(call perlmod/Install,$(1),Fatal.pm,) +endef + +$(eval $(call BuildPackage,perlbase-fatal)) + + +define Package/perlbase-fcntl +$(call Package/perlbase-template) +TITLE:=Fcntl perl module +DEPENDS+=+perlbase-essential +perlbase-xsloader +endef + +define Package/perlbase-fcntl/install +$(call perlmod/Install,$(1),Fcntl.pm auto/Fcntl,) +$(call perlmod/InstallBaseTests,$(1),ext/Fcntl/t) +endef + +$(eval $(call BuildPackage,perlbase-fcntl)) + + +define Package/perlbase-feature +$(call Package/perlbase-template) +TITLE:=feature perl module +endef + +define Package/perlbase-feature/install +$(call perlmod/Install,$(1),feature.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/feature.t lib/feature/unicode_strings.t) +endef + +$(eval $(call BuildPackage,perlbase-feature)) + + +define Package/perlbase-fields +$(call Package/perlbase-template) +TITLE:=fields perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-fields/install +$(call perlmod/Install,$(1),fields.pm,) +endef + +$(eval $(call BuildPackage,perlbase-fields)) + + +define Package/perlbase-file +$(call Package/perlbase-template) +TITLE:=File perl module +DEPENDS+=+perlbase-class +perlbase-config +perlbase-cwd +perlbase-errno +perlbase-essential +perlbase-fcntl +perlbase-filehandle +perlbase-io +perlbase-locale +perlbase-params +perlbase-scalar +perlbase-symbol +perlbase-xsloader +endef + +define Package/perlbase-file/install +$(call perlmod/Install,$(1),File auto/File,File/Find.pm) +$(call perlmod/Install/NoStrip,$(1),File/Find.pm,) +$(call perlmod/InstallBaseTests,$(1),cpan/File-Fetch/t cpan/File-Path/t cpan/File-Temp/t dist/PathTools/t ext/File-DosGlob/t ext/File-Find/t ext/File-Glob/t lib/File/Basename.t lib/File/Compare.t lib/File/Copy.t lib/File/stat-7896.t lib/File/stat.t) +endef + +$(eval $(call BuildPackage,perlbase-file)) + + +define Package/perlbase-filecache +$(call Package/perlbase-template) +TITLE:=FileCache perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-filecache/install +$(call perlmod/Install,$(1),FileCache.pm,) +$(call perlmod/InstallBaseTests,$(1),ext/FileCache/t) +endef + +$(eval $(call BuildPackage,perlbase-filecache)) + + +define Package/perlbase-filehandle +$(call Package/perlbase-template) +TITLE:=FileHandle perl module +DEPENDS+=+perlbase-essential +perlbase-io +endef + +define Package/perlbase-filehandle/install +$(call perlmod/Install,$(1),FileHandle.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/FileHandle.t) +endef + +$(eval $(call BuildPackage,perlbase-filehandle)) + + +define Package/perlbase-filetest +$(call Package/perlbase-template) +TITLE:=filetest perl module +endef + +define Package/perlbase-filetest/install +$(call perlmod/Install,$(1),filetest.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/filetest.t) +endef + +$(eval $(call BuildPackage,perlbase-filetest)) + + +define Package/perlbase-filter +$(call Package/perlbase-template) +TITLE:=Filter perl module +DEPENDS+=+perlbase-dynaloader +perlbase-essential +perlbase-text +endef + +define Package/perlbase-filter/install +$(call perlmod/Install,$(1),Filter auto/Filter,) +$(call perlmod/InstallBaseTests,$(1),cpan/Filter-Util-Call/filter-util.pl cpan/Filter-Util-Call/t dist/Filter-Simple/t) +endef + +$(eval $(call BuildPackage,perlbase-filter)) + + +define Package/perlbase-findbin +$(call Package/perlbase-template) +TITLE:=FindBin perl module +DEPENDS+=+perlbase-cwd +perlbase-essential +perlbase-file +endef + +define Package/perlbase-findbin/install +$(call perlmod/Install,$(1),FindBin.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/FindBin.t) +endef + +$(eval $(call BuildPackage,perlbase-findbin)) + + +define Package/perlbase-gdbm-file +$(call Package/perlbase-template) +TITLE:=GDBM_File perl module +DEPENDS+=+libgdbm +perlbase-essential +perlbase-tie +perlbase-xsloader +endef + +define Package/perlbase-gdbm-file/install +$(call perlmod/Install,$(1),GDBM_File.pm auto/GDBM_File,) +$(call perlmod/InstallBaseTests,$(1),ext/GDBM_File/t) +endef + +$(eval $(call BuildPackage,perlbase-gdbm-file)) + + +define Package/perlbase-getopt +$(call Package/perlbase-template) +TITLE:=Getopt perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-getopt/install +$(call perlmod/Install,$(1),Getopt,) +$(call perlmod/InstallBaseTests,$(1),cpan/Getopt-Long/t lib/Getopt/Std.t) +endef + +$(eval $(call BuildPackage,perlbase-getopt)) + + +define Package/perlbase-hash +$(call Package/perlbase-template) +TITLE:=Hash perl module +DEPENDS+=+perlbase-essential +perlbase-scalar +perlbase-xsloader +endef + +define Package/perlbase-hash/install +$(call perlmod/Install,$(1),Hash auto/Hash,) +$(call perlmod/InstallBaseTests,$(1),ext/Hash-Util-FieldHash/t ext/Hash-Util/t) +endef + +$(eval $(call BuildPackage,perlbase-hash)) + + +define Package/perlbase-http-tiny +$(call Package/perlbase-template) +TITLE:=http-tiny perl module +DEPENDS+=+perlbase-errno +perlbase-essential +perlbase-io +endef + +define Package/perlbase-http-tiny/install +$(call perlmod/Install,$(1),HTTP/Tiny.pm,) +$(call perlmod/InstallBaseTests,$(1),cpan/HTTP-Tiny/corpus cpan/HTTP-Tiny/t) +endef + +$(eval $(call BuildPackage,perlbase-http-tiny)) + + +define Package/perlbase-i18n +$(call Package/perlbase-template) +TITLE:=I18N perl module +DEPENDS+=+perlbase-essential +perlbase-posix +perlbase-xsloader +endef + +define Package/perlbase-i18n/install +$(call perlmod/Install,$(1),I18N auto/I18N,I18N/LangTags/List.pm) +$(call perlmod/InstallBaseTests,$(1),dist/I18N-Collate/t dist/I18N-LangTags/t ext/I18N-Langinfo/t) +$(call perlmod/Install/NoStrip,$(1),I18N/LangTags/List.pm) +endef + +$(eval $(call BuildPackage,perlbase-i18n)) + + +define Package/perlbase-if +$(call Package/perlbase-template) +TITLE:=if perl module +endef + +define Package/perlbase-if/install +$(call perlmod/Install,$(1),if.pm,) +$(call perlmod/InstallBaseTests,$(1),dist/if/t) +endef + +$(eval $(call BuildPackage,perlbase-if)) + + +define Package/perlbase-integer +$(call Package/perlbase-template) +TITLE:=integer perl module +endef + +define Package/perlbase-integer/install +$(call perlmod/Install,$(1),integer.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/integer.t) +endef + +$(eval $(call BuildPackage,perlbase-integer)) + + +define Package/perlbase-io +$(call Package/perlbase-template) +TITLE:=IO perl module +DEPENDS+=+perlbase-base +perlbase-bytes +perlbase-config +perlbase-errno +perlbase-essential +perlbase-fcntl +perlbase-list +perlbase-posix +perlbase-scalar +perlbase-selectsaver +perlbase-socket +perlbase-symbol +perlbase-tie +perlbase-xsloader +endef + +define Package/perlbase-io/install +$(call perlmod/Install,$(1),IO IO.pm auto/IO,) +$(call perlmod/InstallBaseTests,$(1),cpan/IO-Compress/t cpan/IO-Socket-IP/t cpan/IO-Zlib/t dist/IO/Makefile.PL dist/IO/t) +endef + +$(eval $(call BuildPackage,perlbase-io)) + + +define Package/perlbase-ipc +$(call Package/perlbase-template) +TITLE:=IPC perl module +DEPENDS+=+perlbase-config +perlbase-essential +perlbase-file +perlbase-locale +perlbase-params +perlbase-symbol +perlbase-text +endef + +define Package/perlbase-ipc/install +$(call perlmod/Install,$(1),IPC auto/IPC,) +$(call perlmod/InstallBaseTests,$(1),cpan/IPC-Cmd/t cpan/IPC-SysV/t ext/IPC-Open3/t) +endef + +$(eval $(call BuildPackage,perlbase-ipc)) + + +define Package/perlbase-json-pp +$(call Package/perlbase-template) +TITLE:=json-pp perl module +DEPENDS+=+perlbase-b +perlbase-base +perlbase-essential +endef + +define Package/perlbase-json-pp/install +$(call perlmod/Install,$(1),JSON/PP JSON/PP.pm,) +$(call perlmod/InstallBaseTests,$(1),cpan/JSON-PP/t) +endef + +$(eval $(call BuildPackage,perlbase-json-pp)) + + +define Package/perlbase-less +$(call Package/perlbase-template) +TITLE:=less perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-less/install +$(call perlmod/Install,$(1),less.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/less.t) +endef + +$(eval $(call BuildPackage,perlbase-less)) + + +define Package/perlbase-list +$(call Package/perlbase-template) +TITLE:=List perl module +DEPENDS+=+perlbase-essential +perlbase-xsloader +endef + +define Package/perlbase-list/install +$(call perlmod/Install,$(1),List auto/List,) +endef + +$(eval $(call BuildPackage,perlbase-list)) + + +define Package/perlbase-locale +$(call Package/perlbase-template) +TITLE:=Locale perl module +DEPENDS+=+perlbase-essential +perlbase-i18n +perlbase-integer +perlbase-utf8 +endef + +define Package/perlbase-locale/install +$(call perlmod/Install,$(1),Locale,Locale/Constants.pod Locale/Country.pod Locale/Currency.pod Locale/Language.pod Locale/Maketext.pod Locale/Maketext/TPJ13.pod Locale/Script.pod) +$(call perlmod/InstallBaseTests,$(1),cpan/Locale-Codes/t cpan/Locale-Maketext-Simple/t dist/Locale-Maketext/t) +endef + +$(eval $(call BuildPackage,perlbase-locale)) + + +define Package/perlbase-math +$(call Package/perlbase-template) +TITLE:=Math perl module +DEPENDS+=+perlbase-config +perlbase-essential +perlbase-scalar +perlbase-xsloader +endef + +define Package/perlbase-math/install +$(call perlmod/Install,$(1),Math auto/Math,) +$(call perlmod/InstallBaseTests,$(1),cpan/Math-Complex/t dist/Math-BigInt-FastCalc/t dist/Math-BigInt/t dist/Math-BigRat/t) +endef + +$(eval $(call BuildPackage,perlbase-math)) + + +define Package/perlbase-memoize +$(call Package/perlbase-template) +TITLE:=Memoize perl module +DEPENDS+=+perlbase-config +perlbase-essential +perlbase-storable +endef + +define Package/perlbase-memoize/install +$(call perlmod/Install,$(1),Memoize Memoize.pm,) +$(call perlmod/InstallBaseTests,$(1),cpan/Memoize/t) +endef + +$(eval $(call BuildPackage,perlbase-memoize)) + + +define Package/perlbase-meta-notation +$(call Package/perlbase-template) +TITLE:=meta_notation module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-meta-notation/install +$(call perlmod/Install,$(1),meta_notation.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/meta_notation.t) +endef + +$(eval $(call BuildPackage,perlbase-meta-notation)) + + +define Package/perlbase-mime +$(call Package/perlbase-template) +TITLE:=MIME perl module +DEPENDS+=+perlbase-essential +perlbase-xsloader +endef + +define Package/perlbase-mime/install +$(call perlmod/Install,$(1),MIME auto/MIME,) +$(call perlmod/InstallBaseTests,$(1),cpan/MIME-Base64/t) +endef + +$(eval $(call BuildPackage,perlbase-mime)) + + +define Package/perlbase-module +$(call Package/perlbase-template) +TITLE:=Module perl module +DEPENDS+=+perlbase-essential +perlbase-file +perlbase-filehandle +perlbase-locale +perlbase-params +perlbase-version +endef + +define Package/perlbase-module/install +$(call perlmod/Install,$(1),Module,) +$(call perlmod/InstallBaseTests,$(1),cpan/Module-Load-Conditional/t cpan/Module-Load/t cpan/Module-Loaded/t cpan/Module-Metadata/corpus cpan/Module-Metadata/lib cpan/Module-Metadata/t dist/Module-CoreList/t) +endef + +$(eval $(call BuildPackage,perlbase-module)) + + +define Package/perlbase-mro +$(call Package/perlbase-template) +TITLE:=mro perl module +DEPENDS+=+perlbase-essential +perlbase-xsloader +endef + +define Package/perlbase-mro/install +$(call perlmod/Install,$(1),auto/mro mro.pm,) +endef + +$(eval $(call BuildPackage,perlbase-mro)) + + +define Package/perlbase-net +$(call Package/perlbase-template) +TITLE:=Net perl module +DEPENDS+=+perlbase-class +perlbase-errno +perlbase-essential +perlbase-fcntl +perlbase-filehandle +perlbase-io +perlbase-posix +perlbase-socket +perlbase-symbol +perlbase-time +endef + +define Package/perlbase-net/install +$(call perlmod/Install,$(1),Net,Net/libnetFAQ.pod) +$(call perlmod/InstallBaseTests,$(1),cpan/libnet/t dist/Net-Ping/t lib/Net/hostent.t lib/Net/netent.t lib/Net/protoent.t lib/Net/servent.t) +endef + +$(eval $(call BuildPackage,perlbase-net)) + + +define Package/perlbase-next +$(call Package/perlbase-template) +TITLE:=NEXT perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-next/install +$(call perlmod/Install,$(1),NEXT.pm,) +$(call perlmod/InstallBaseTests,$(1),cpan/NEXT/t) +endef + +$(eval $(call BuildPackage,perlbase-next)) + + +define Package/perlbase-o +$(call Package/perlbase-template) +TITLE:=O perl module +DEPENDS+=+perlbase-b +perlbase-essential +endef + +define Package/perlbase-o/install +$(call perlmod/Install,$(1),O.pm,) +endef + +$(eval $(call BuildPackage,perlbase-o)) + + +define Package/perlbase-opcode +$(call Package/perlbase-template) +TITLE:=Opcode perl module +DEPENDS+=+perlbase-essential +perlbase-xsloader +endef + +define Package/perlbase-opcode/install +$(call perlmod/Install,$(1),auto/Opcode,) +$(call perlmod/Install/NoStrip,$(1),Opcode.pm,) +$(call perlmod/InstallBaseTests,$(1),ext/Opcode/t) +endef + +$(eval $(call BuildPackage,perlbase-opcode)) + + +define Package/perlbase-open +$(call Package/perlbase-template) +TITLE:=open perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-open/install +$(call perlmod/Install,$(1),open.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/open.t) +endef + +$(eval $(call BuildPackage,perlbase-open)) + + +define Package/perlbase-ops +$(call Package/perlbase-template) +TITLE:=ops perl module +DEPENDS+=+perlbase-opcode +endef + +define Package/perlbase-ops/install +$(call perlmod/Install,$(1),ops.pm,) +endef + +$(eval $(call BuildPackage,perlbase-ops)) + + +define Package/perlbase-ostype +$(call Package/perlbase-template) +TITLE:=OSType perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-ostype/install +$(call perlmod/Install,$(1),Perl/OSType.pm,) +$(call perlmod/InstallBaseTests,$(1),cpan/Perl-OSType/t) +endef + +$(eval $(call BuildPackage,perlbase-ostype)) + + +define Package/perlbase-params +$(call Package/perlbase-template) +TITLE:=Params perl module +DEPENDS+=+perlbase-essential +perlbase-locale +endef + +define Package/perlbase-params/install +$(call perlmod/Install,$(1),Params,) +$(call perlmod/InstallBaseTests,$(1),cpan/Params-Check/t) +endef + +$(eval $(call BuildPackage,perlbase-params)) + + +define Package/perlbase-perl5db +$(call Package/perlbase-template) +TITLE:=perl5db perl module +DEPENDS+=+perlbase-cwd +perlbase-essential +endef + +define Package/perlbase-perl5db/install +$(call perlmod/Install,$(1),perl5db.pl,) +$(call perlmod/InstallBaseTests,$(1),lib/perl5db.t lib/perl5db/t) +endef + +$(eval $(call BuildPackage,perlbase-perl5db)) + + +define Package/perlbase-perlio +$(call Package/perlbase-template) +TITLE:=PerlIO perl module +DEPENDS+=+perlbase-essential +perlbase-mime +perlbase-xsloader +endef + +define Package/perlbase-perlio/install +$(call perlmod/Install,$(1),PerlIO PerlIO.pm auto/PerlIO,) +$(call perlmod/InstallBaseTests,$(1),cpan/PerlIO-via-QuotedPrint/t ext/PerlIO-encoding/t ext/PerlIO-scalar/t ext/PerlIO-via/t) +endef + +$(eval $(call BuildPackage,perlbase-perlio)) + + +define Package/perlbase-pod +$(call Package/perlbase-template) +TITLE:=Pod perl module +DEPENDS+=+perlbase-config +perlbase-cwd +perlbase-encode +perlbase-essential +perlbase-fcntl +perlbase-file +perlbase-getopt +perlbase-integer +perlbase-posix +perlbase-symbol +perlbase-term +perlbase-text +endef + +define Package/perlbase-pod/install +$(call perlmod/Install,$(1),Pod,Pod/Usage.pm) +$(call perlmod/Install/NoStrip,$(1),Pod/Usage.pm,) +$(call perlmod/InstallBaseTests,$(1),cpan/Pod-Checker/t cpan/Pod-Escapes/t cpan/Pod-Parser/lib cpan/Pod-Parser/scripts cpan/Pod-Parser/t cpan/Pod-Perldoc/t cpan/Pod-Simple/t cpan/Pod-Usage/scripts cpan/Pod-Usage/t cpan/podlators/t ext/Pod-Functions/Functions.pm ext/Pod-Functions/t ext/Pod-Html/t lib/Pod/t) + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/pod2man $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/pod2text $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,perlbase-pod)) + + +define Package/perlbase-posix +$(call Package/perlbase-template) +TITLE:=POSIX perl module +DEPENDS+=+perlbase-essential +perlbase-fcntl +perlbase-tie +perlbase-xsloader +endef + +define Package/perlbase-posix/install +$(call perlmod/Install,$(1),POSIX.pm auto/POSIX,) +$(call perlmod/InstallBaseTests,$(1),ext/POSIX/Makefile.PL ext/POSIX/POSIX.xs ext/POSIX/t) +endef + +$(eval $(call BuildPackage,perlbase-posix)) + + +define Package/perlbase-re +$(call Package/perlbase-template) +TITLE:=re perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-re/install +$(call perlmod/Install,$(1),auto/re re.pm,) +$(call perlmod/InstallBaseTests,$(1),ext/re/t) +endef + +$(eval $(call BuildPackage,perlbase-re)) + + +define Package/perlbase-safe +$(call Package/perlbase-template) +TITLE:=Safe perl module +DEPENDS+=+perlbase-b +perlbase-essential +perlbase-opcode +perlbase-scalar +perlbase-utf8 +endef + +define Package/perlbase-safe/install +$(call perlmod/Install,$(1),Safe.pm,) +$(call perlmod/InstallBaseTests,$(1),dist/Safe/t) +endef + +$(eval $(call BuildPackage,perlbase-safe)) + + +define Package/perlbase-scalar +$(call Package/perlbase-template) +TITLE:=Scalar perl module +DEPENDS+=+perlbase-essential +perlbase-list +endef + +define Package/perlbase-scalar/install +$(call perlmod/Install,$(1),Scalar Sub,) +$(call perlmod/InstallBaseTests,$(1),cpan/Scalar-List-Utils/t) + $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/cpan/Scalar-List-Utils/blib +endef + +$(eval $(call BuildPackage,perlbase-scalar)) + + +define Package/perlbase-sdbm-file +$(call Package/perlbase-template) +TITLE:=SDBM_File perl module +DEPENDS+=+perlbase-essential +perlbase-tie +perlbase-xsloader +endef + +define Package/perlbase-sdbm-file/install +$(call perlmod/Install,$(1),SDBM_File.pm auto/SDBM_File,) +$(call perlmod/InstallBaseTests,$(1),ext/SDBM_File/t) +endef + +$(eval $(call BuildPackage,perlbase-sdbm-file)) + + +define Package/perlbase-search +$(call Package/perlbase-template) +TITLE:=Search perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-search/install +$(call perlmod/Install,$(1),Search,) +$(call perlmod/InstallBaseTests,$(1),dist/Search-Dict/t) +endef + +$(eval $(call BuildPackage,perlbase-search)) + + +define Package/perlbase-selectsaver +$(call Package/perlbase-template) +TITLE:=SelectSaver perl module +DEPENDS+=+perlbase-essential +perlbase-symbol +endef + +define Package/perlbase-selectsaver/install +$(call perlmod/Install,$(1),SelectSaver.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/SelectSaver.t) +endef + +$(eval $(call BuildPackage,perlbase-selectsaver)) + + +define Package/perlbase-selfloader +$(call Package/perlbase-template) +TITLE:=SelfLoader perl module +DEPENDS+=+perlbase-essential +perlbase-io +endef + +define Package/perlbase-selfloader/install +$(call perlmod/Install,$(1),SelfLoader.pm,) +$(call perlmod/InstallBaseTests,$(1),dist/SelfLoader/t) +endef + +$(eval $(call BuildPackage,perlbase-selfloader)) + + +define Package/perlbase-sigtrap +$(call Package/perlbase-template) +TITLE:=sigtrap perl module +DEPENDS+=+perlbase-essential +perlbase-meta-notation +endef + +define Package/perlbase-sigtrap/install +$(call perlmod/Install,$(1),sigtrap.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/sigtrap.t) +endef + +$(eval $(call BuildPackage,perlbase-sigtrap)) + + +define Package/perlbase-socket +$(call Package/perlbase-template) +TITLE:=Socket perl module +DEPENDS+=+perlbase-essential +perlbase-xsloader +endef + +define Package/perlbase-socket/install +$(call perlmod/Install,$(1),Socket.pm auto/Socket,) +$(call perlmod/InstallBaseTests,$(1),cpan/Socket/t) +endef + +$(eval $(call BuildPackage,perlbase-socket)) + + +define Package/perlbase-sort +$(call Package/perlbase-template) +TITLE:=sort perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-sort/install +$(call perlmod/Install,$(1),sort.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/sort.t) +endef + +$(eval $(call BuildPackage,perlbase-sort)) + + +define Package/perlbase-storable +$(call Package/perlbase-template) +TITLE:=Storable perl module +DEPENDS+=+perlbase-essential +perlbase-xsloader +endef + +define Package/perlbase-storable/install +$(call perlmod/Install,$(1),Storable.pm auto/Storable,) +$(call perlmod/InstallBaseTests,$(1),dist/Storable/t) +endef + +$(eval $(call BuildPackage,perlbase-storable)) + + +define Package/perlbase-symbol +$(call Package/perlbase-template) +TITLE:=Symbol perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-symbol/install +$(call perlmod/Install,$(1),Symbol.pm,) +$(call perlmod/InstallBaseTests,$(1),lib/Symbol.t) +endef + +$(eval $(call BuildPackage,perlbase-symbol)) + + +define Package/perlbase-sys +$(call Package/perlbase-template) +TITLE:=Sys perl module +DEPENDS+=+perlbase-essential +perlbase-file +perlbase-posix +perlbase-socket +endef + +define Package/perlbase-sys/install +$(call perlmod/Install,$(1),Sys auto/Sys,) +$(call perlmod/InstallBaseTests,$(1),cpan/Sys-Syslog/t ext/Sys-Hostname/t) +endef + +$(eval $(call BuildPackage,perlbase-sys)) + + +define Package/perlbase-tap +$(call Package/perlbase-template) +TITLE:=TAP perl module +DEPENDS+=+perlbase-base +perlbase-benchmark +perlbase-config +perlbase-essential +perlbase-file +perlbase-io +perlbase-posix +perlbase-text +endef + +define Package/perlbase-tap/install +$(call perlmod/Install,$(1),TAP,) +endef + +$(eval $(call BuildPackage,perlbase-tap)) + + +define Package/perlbase-term +$(call Package/perlbase-template) +TITLE:=Term perl module +DEPENDS+=+perlbase-essential +endef + +define Package/perlbase-term/install +$(call perlmod/Install,$(1),Term,) +$(call perlmod/InstallBaseTests,$(1),cpan/Term-ANSIColor/t cpan/Term-Cap/test.pl dist/Term-Complete/t dist/Term-ReadLine/t) +endef + +$(eval $(call BuildPackage,perlbase-term)) + + +define Package/perlbase-test +$(call Package/perlbase-template) +TITLE:=Test perl module +DEPENDS+=+perlbase-base +perlbase-config +perlbase-essential +perlbase-io +perlbase-symbol +perlbase-tap +perlbase-text +endef + +define Package/perlbase-test/install +$(call perlmod/Install,$(1),Test Test.pm ok.pm,Test/Builder.pm Test/Harness/TAP.pod Test/More.pm Test/Tutorial.pod) +$(call perlmod/Install/NoStrip,$(1),Test/Builder.pm Test/More.pm,) +$(call perlmod/InstallBaseTests,$(1),cpan/Test-Harness/t cpan/Test-Simple/t cpan/Test/t) + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/prove $(1)/usr/bin +endef + +$(eval $(call BuildPackage,perlbase-test)) + + +define Package/perlbase-text +$(call Package/perlbase-template) +TITLE:=Text perl module +DEPENDS+=+perlbase-essential +perlbase-selfloader +endef + +define Package/perlbase-text/install +$(call perlmod/Install,$(1),Text,) +$(call perlmod/InstallBaseTests,$(1),cpan/Text-Balanced/t cpan/Text-ParseWords/t cpan/Text-Tabs/t dist/Text-Abbrev/t) +endef + +$(eval $(call BuildPackage,perlbase-text)) + + +define Package/perlbase-thread +$(call Package/perlbase-template) +TITLE:=Thread perl module +DEPENDS+=+perlbase-essential +perlbase-scalar +perlbase-threads +endef + +define Package/perlbase-thread/install +$(call perlmod/Install,$(1),Thread Thread.pm,) +$(call perlmod/InstallBaseTests,$(1),dist/Thread-Queue/t dist/Thread-Semaphore/t lib/Thread.t) +endef + +$(eval $(call BuildPackage,perlbase-thread)) + + +define Package/perlbase-threads +$(call Package/perlbase-template) +TITLE:=threads perl module +DEPENDS+=+perlbase-config +perlbase-essential +perlbase-scalar +perlbase-xsloader +endef + +define Package/perlbase-threads/install +$(call perlmod/Install,$(1),auto/threads threads threads.pm,) +$(call perlmod/InstallBaseTests,$(1),dist/threads-shared/t dist/threads/t) +endef + +$(eval $(call BuildPackage,perlbase-threads)) + + +define Package/perlbase-tie +$(call Package/perlbase-template) +TITLE:=Tie perl module +DEPENDS+=+perlbase-essential +perlbase-fcntl +perlbase-xsloader +endef + +define Package/perlbase-tie/install +$(call perlmod/Install,$(1),Tie auto/Tie,) +$(call perlmod/InstallBaseTests,$(1),cpan/Tie-RefHash/t dist/Tie-File/t ext/Tie-Hash-NamedCapture/t ext/Tie-Memoize/lib/Tie/Memoize.pm ext/Tie-Memoize/t lib/Tie/Array/push.t lib/Tie/Array/splice.t lib/Tie/Array/std.t lib/Tie/Array/stdpush.t lib/Tie/ExtraHash.t lib/Tie/Handle/stdhandle.t lib/Tie/Handle/stdhandle_from_handle.t lib/Tie/Hash.t lib/Tie/Scalar.t lib/Tie/SubstrHash.t) +endef + +$(eval $(call BuildPackage,perlbase-tie)) + + +define Package/perlbase-time +$(call Package/perlbase-template) +TITLE:=Time perl module +DEPENDS+=+perlbase-class +perlbase-config +perlbase-dynaloader +perlbase-essential +endef + +define Package/perlbase-time/install +$(call perlmod/Install,$(1),Time auto/Time,) +$(call perlmod/InstallBaseTests,$(1),cpan/Time-HiRes/t cpan/Time-Local/t cpan/Time-Piece/t lib/Time/gmtime.t lib/Time/localtime.t) +endef + +$(eval $(call BuildPackage,perlbase-time)) + + +define Package/perlbase-unicode +$(call Package/perlbase-template) +TITLE:=Unicode perl module +DEPENDS+=+perlbase-base +perlbase-charnames +perlbase-dynaloader +perlbase-essential +perlbase-file +endef + +define Package/perlbase-unicode/install +$(call perlmod/Install,$(1),Unicode auto/Unicode,) +$(call perlmod/InstallBaseTests,$(1),cpan/Unicode-Collate/t cpan/Unicode-Normalize/t lib/Unicode/UCD.t) +endef + +$(eval $(call BuildPackage,perlbase-unicode)) + + +define Package/perlbase-unicore +$(call Package/perlbase-template) +TITLE:=unicore perl module +endef + +define Package/perlbase-unicore/install +$(call perlmod/Install,$(1),unicore,) +$(call perlmod/InstallBaseTests,$(1),lib/unicore/NameAliases.txt lib/unicore/PropValueAliases.txt lib/unicore/PropertyAliases.txt lib/unicore/UnicodeData.txt) +endef + +$(eval $(call BuildPackage,perlbase-unicore)) + + +define Package/perlbase-universal +$(call Package/perlbase-template) +TITLE:=UNIVERSAL perl module +endef + +define Package/perlbase-universal/install +$(call perlmod/Install,$(1),UNIVERSAL.pm,) +endef + +$(eval $(call BuildPackage,perlbase-universal)) + + +define Package/perlbase-user +$(call Package/perlbase-template) +TITLE:=User perl module +DEPENDS+=+perlbase-class +perlbase-config +perlbase-essential +endef + +define Package/perlbase-user/install +$(call perlmod/Install,$(1),User,) +$(call perlmod/InstallBaseTests,$(1),lib/User/grent.t lib/User/pwent.t) +endef + +$(eval $(call BuildPackage,perlbase-user)) + + +define Package/perlbase-utf8 +$(call Package/perlbase-template) +TITLE:=utf8 perl module +DEPENDS+=+perlbase-essential +perlbase-re +perlbase-unicore +endef + +define Package/perlbase-utf8/install +$(call perlmod/Install,$(1),utf8.pm utf8_heavy.pl,) +$(call perlmod/InstallBaseTests,$(1),lib/utf8.t) +endef + +$(eval $(call BuildPackage,perlbase-utf8)) + + +define Package/perlbase-version +$(call Package/perlbase-template) +TITLE:=version perl module +DEPENDS+=+perlbase-config +perlbase-essential +endef + +define Package/perlbase-version/install +$(call perlmod/Install,$(1),version version.pm,) +$(call perlmod/InstallBaseTests,$(1),cpan/version/t) +endef + +$(eval $(call BuildPackage,perlbase-version)) + + +define Package/perlbase-xsloader +$(call Package/perlbase-template) +TITLE:=XSLoader perl module +endef + +define Package/perlbase-xsloader/install +$(call perlmod/Install,$(1),XSLoader.pm,) +$(call perlmod/InstallBaseTests,$(1),dist/XSLoader/t ext/XS-APItest/t ext/XS-Typemap/t) +endef + +$(eval $(call BuildPackage,perlbase-xsloader)) + + +# Generated Fri Sep 25 07:47:59 2015 diff --git a/lang/perl/perlmod.mk b/lang/perl/perlmod.mk new file mode 100644 index 00000000..d00a8c42 --- /dev/null +++ b/lang/perl/perlmod.mk @@ -0,0 +1,173 @@ +# This makefile simplifies perl module builds. +# + +include ../perl/perlver.mk + +ifneq ($(PKG_NAME),perl) + PKG_VERSION:=$(PKG_VERSION)+perl$(PERL_VERSION2) +endif + +PERL_VERSION:=$(PERL_VERSION2) + +# Build environment +HOST_PERL_PREFIX:=$(STAGING_DIR_HOSTPKG)/usr +ifneq ($(CONFIG_USE_GLIBC),) + EXTRA_LIBS:=bsd + EXTRA_LIBDIRS:=$(STAGING_DIR)/lib +endif +PERL_CMD:=$(STAGING_DIR_HOSTPKG)/usr/bin/perl$(PERL_VERSION3) + +MOD_CFLAGS_PERL:=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) +ifdef CONFIG_PERL_THREADS + MOD_CFLAGS_PERL+= -D_REENTRANT -D_GNU_SOURCE +endif + +# Module install prefix +PERL_SITELIB:=/usr/lib/perl5/$(PERL_VERSION) +PERL_TESTSDIR:=/usr/share/perl/perl-tests +PERLBASE_TESTSDIR:=/usr/share/perl/perlbase-tests +PERLMOD_TESTSDIR:=/usr/share/perl/perlmod-tests + +define perlmod/host/relink + rm -f $(1)/Makefile.aperl + $(MAKE) -C $(1) perl + $(CP) $(1)/perl $(PERL_CMD) + $(CP) $(1)/perl $(STAGING_DIR_HOSTPKG)/usr/bin/perl +endef + +define perlmod/host/Configure + (cd $(HOST_BUILD_DIR); \ + PERL_MM_USE_DEFAULT=1 \ + $(2) \ + $(PERL_CMD) Makefile.PL \ + $(1) \ + ); +endef + +define perlmod/host/Compile + $(2) \ + $(MAKE) -C $(HOST_BUILD_DIR) \ + $(1) \ + install +endef + +define perlmod/host/Install + $(2) \ + $(MAKE) -C $(HOST_BUILD_DIR) \ + $(1) \ + install + $(call perlmod/host/relink,$(HOST_BUILD_DIR)) +endef + +define perlmod/Configure + (cd $(if $(3),$(3),$(PKG_BUILD_DIR)); \ + (echo -e 'use Config;\n\n$$$${tied %Config::Config}{cpprun}="$(GNU_TARGET_NAME)-cpp -E";\n' ; cat Makefile.PL) | \ + PERL_MM_USE_DEFAULT=1 \ + $(2) \ + $(PERL_CMD) -I. -- - \ + $(1) \ + AR=ar \ + CC=$(GNU_TARGET_NAME)-gcc \ + CCFLAGS="$(MOD_CFLAGS_PERL)" \ + CCCDLFLAGS=-fPIC \ + CCDLFLAGS=-Wl,-E \ + DLEXT=so \ + DLSRC=dl_dlopen.xs \ + EXE_EXT=" " \ + FULL_AR=$(GNU_TARGET_NAME)-ar \ + LD=$(GNU_TARGET_NAME)-gcc \ + LDDLFLAGS="-shared -rdynamic $(TARGET_LDFLAGS)" \ + LDFLAGS="$(EXTRA_LIBDIRS:%=-L%) $(EXTRA_LIBS:%=-l%) " \ + LIBC=" " \ + LIB_EXT=.a \ + OBJ_EXT=.o \ + OSNAME=linux \ + OSVERS=2.4.30 \ + RANLIB=: \ + SITELIBEXP=" " \ + SITEARCHEXP=" " \ + SO=so \ + VENDORARCHEXP=" " \ + VENDORLIBEXP=" " \ + SITEPREFIX=/usr \ + INSTALLPRIVLIB=$(PERL_SITELIB) \ + INSTALLSITELIB=$(PERL_SITELIB) \ + INSTALLVENDORLIB=" " \ + INSTALLARCHLIB=$(PERL_SITELIB) \ + INSTALLSITEARCH=$(PERL_SITELIB) \ + INSTALLVENDORARCH=" " \ + INSTALLBIN=/usr/bin \ + INSTALLSITEBIN=/usr/bin \ + INSTALLVENDORBIN=" " \ + INSTALLSCRIPT=/usr/bin \ + INSTALLSITESCRIPT=/usr/bin \ + INSTALLVENDORSCRIPT=" " \ + INSTALLMAN1DIR=/usr/man/man1 \ + INSTALLSITEMAN1DIR=/usr/man/man1 \ + INSTALLVENDORMAN1DIR=" " \ + INSTALLMAN3DIR=/usr/man/man3 \ + INSTALLSITEMAN3DIR=/usr/man/man3 \ + INSTALLVENDORMAN3DIR=" " \ + LINKTYPE=dynamic \ + DESTDIR=$(PKG_INSTALL_DIR) \ + ) + sed -i -e 's!^PERL_INC = .*!PERL_INC = $(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)/CORE/!' $(if $(3),$(3),$(PKG_BUILD_DIR))/Makefile +endef + +define perlmod/Compile + PERL5LIB=$(PERL_LIB) \ + $(2) \ + $(MAKE) -C $(if $(3),$(3),$(PKG_BUILD_DIR)) \ + $(1) \ + install +endef + +define perlmod/Install/NoStrip + $(INSTALL_DIR) $(strip $(1))$(PERL_SITELIB) + (cd $(PKG_INSTALL_DIR)$(PERL_SITELIB) && \ + rsync --relative -rlHp --itemize-changes \ + --exclude=\*.pod \ + --exclude=.packlist \ + $(addprefix --exclude=/,$(strip $(3))) \ + --prune-empty-dirs \ + $(strip $(2)) $(strip $(1))$(PERL_SITELIB)) + + chmod -R u+w $(strip $(1))$(PERL_SITELIB) +endef + + +define perlmod/_DoStrip + @echo "---> Stripping modules in: $(strip $(1))$(PERL_SITELIB)" + find $(strip $(1))$(PERL_SITELIB) -name \*.pm -or -name \*.pl | \ + xargs -r sed -i \ + -e '/^=\(head\|pod\|item\|over\|back\|encoding\|begin\|end\|for\)/,/^=cut/d' \ + -e '/^=\(head\|pod\|item\|over\|back\|encoding\|begin\|end\|for\)/,$$$$d' \ + -e '/^#$$$$/d' \ + -e '/^#[^!"'"'"']/d' +endef + +define perlmod/Install + $(call perlmod/Install/NoStrip,$(1),$(2),$(3)) + + $(if $(CONFIG_PERL_NOCOMMENT),$(if $(PKG_LEAVE_COMMENTS),,$(call perlmod/_DoStrip,$(1),$(2),$(3)))) +endef + +# You probably don't want to use this directly. Look at perlmod/InstallTests +define perlmod/_InstallTests + $(INSTALL_DIR) $(strip $(1)) + (cd $(PKG_BUILD_DIR)/$(2) && \ + rsync --relative -rlHp --itemize-changes \ + --exclude=.packlist \ + --prune-empty-dirs \ + $(strip $(3)) $(strip $(1))) + + chmod -R u+w $(strip $(1)) +endef + +define perlmod/InstallBaseTests + $(if $(CONFIG_PERL_TESTS),$(call perlmod/_InstallTests,$(1)$(PERL_TESTSDIR),,$(2))) +endef + +define perlmod/InstallTests + $(if $(CONFIG_PERL_TESTS),$(call perlmod/_InstallTests,$(1)$(PERL_TESTSDIR),$(2),$(3))) +endef diff --git a/lang/perl/perlver.mk b/lang/perl/perlver.mk new file mode 100644 index 00000000..b23e68a2 --- /dev/null +++ b/lang/perl/perlver.mk @@ -0,0 +1,10 @@ +PERL_VERSION:=5.28.0 + +PERL_EXPLODE:=$(subst ., ,$(PERL_VERSION)) + +PERL_MAJOR:=$(word 1,$(PERL_EXPLODE)) +PERL_MINOR:=$(word 2,$(PERL_EXPLODE)) +PERL_REL:=$(word 3,$(PERL_EXPLODE)) + +PERL_VERSION3:=$(PERL_VERSION) +PERL_VERSION2:=$(PERL_MAJOR).$(PERL_MINOR) diff --git a/lang/php7-pecl-dio/Makefile b/lang/php7-pecl-dio/Makefile new file mode 100644 index 00000000..ae29b284 --- /dev/null +++ b/lang/php7-pecl-dio/Makefile @@ -0,0 +1,34 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PECL_NAME:=dio +PECL_LONGNAME:=Direct I/O functions + +PKG_VERSION:=0.1.0 +PKG_RELEASE:=1 +PKG_HASH:=aab985e374604379d99c9c93207f2c2959ff141740d1a648c0fbd07e0e08a73e + +PKG_NAME:=php7-pecl-$(PECL_NAME) +PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://pecl.php.net/get/ + +PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 + +PKG_MAINTAINER:=Michael Heimpold + +PKG_LICENSE:=PHPv3.01 +PKG_LICENSE_FILES:= + +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +include ../php7/pecl.mk + +$(eval $(call PECLPackage,$(PECL_NAME),$(PECL_LONGNAME))) +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/php7-pecl-http/Makefile b/lang/php7-pecl-http/Makefile new file mode 100644 index 00000000..17eb4a94 --- /dev/null +++ b/lang/php7-pecl-http/Makefile @@ -0,0 +1,57 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PECL_NAME:=pecl_http +PECL_LONGNAME:=Extended HTTP Support + +PKG_VERSION:=3.1.0 +PKG_RELEASE:=5 +PKG_HASH:=e3de67b156e7d5f6c2e5eb1e2b5f0acceb7004f1260d68c9f8b2c0f9629aabf0 + +PKG_NAME:=php7-pecl-http +PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://pecl.php.net/get/ + +PKG_MAINTAINER:=Michael Heimpold + +PKG_LICENSE:=BSD-2-Clause +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_DEPENDS:=php7 php7-pecl-propro php7-pecl-raphf +PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 + +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +include ../php7/pecl.mk + +CONFIGURE_VARS+= \ + PECL_cv_HAVE_EXT_propro=yes \ + PECL_cv_HAVE_EXT_raphf=yes \ + PECL_cv_HAVE_LIBCURL_ARES=no \ + PECL_cv_HAVE_LIBCURL_OpenSSL=$(if $(CONFIG_LIBCURL_OPENSSL),yes,no) \ + PECL_cv_HAVE_LIBCURL_GnuTLS=$(if $(CONFIG_LIBCURL_GNUTLS),yes,no) \ + PECL_cv_HAVE_LIBCURL_NSS=no \ + PECL_cv_HAVE_LIBCURL_SecureTransport=no \ + PECL_cv_HAVE_LIBCURL_GSKit=no \ + PECL_cv_HAVE_LIBCURL_PolarSSL=no \ + PECL_cv_HAVE_LIBCURL_WolfSSL=$(if $(CONFIG_LIBCURL_CYASSL),yes,no) \ + PECL_cv_HAVE_LIBCURL_mbedTLS=$(if $(CONFIG_LIBCURL_MBEDTLS),yes,no) \ + PECL_cv_HAVE_LIBCURL_axTLS=no \ + PECL_cv_LIBCURL_TLSAUTH_SRP=$(if $(CONFIG_LIBCURL_TLS_SRP),yes,no) \ + +CONFIGURE_ARGS+= \ + --with-http \ + --without-http-shared-deps \ + --with-http-libcurl-dir="$(STAGING_DIR)/usr" \ + --with-http-libevent-dir="$(STAGING_DIR)/usr" \ + --with-http-libidn-dir="$(STAGING_DIR)/usr" + +$(eval $(call PECLPackage,http,$(PECL_LONGNAME),+icu +libcurl +librt +libevent2 +PACKAGE_libidn:libidn +libidn2 +php7-mod-hash +php7-mod-iconv +php7-mod-session +php7-pecl-raphf +php7-pecl-propro,30)) +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch b/lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch new file mode 100644 index 00000000..ee925c45 --- /dev/null +++ b/lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch @@ -0,0 +1,11 @@ +--- a/src/php_http_etag.c 2016-12-12 10:04:21.000000000 +0100 ++++ b/src/php_http_etag.c 2016-12-23 21:10:59.523222367 +0100 +@@ -60,7 +60,7 @@ + unsigned char buf[4]; + + *((uint *) e->ctx) = ~*((uint *) e->ctx); +-#if WORDS_BIGENDIAN ++#ifdef WORDS_BIGENDIAN + etag = php_http_etag_digest((unsigned char *) e->ctx, 4); + #else + buf[0] = ((unsigned char *) e->ctx)[3]; diff --git a/lang/php7-pecl-http/patches/200-string_or_null_register.patch b/lang/php7-pecl-http/patches/200-string_or_null_register.patch new file mode 100644 index 00000000..f2d37eeb --- /dev/null +++ b/lang/php7-pecl-http/patches/200-string_or_null_register.patch @@ -0,0 +1,57 @@ +From ab5b4e3acd2b0379e5d8bc95a8d4f83ce5c91fb7 Mon Sep 17 00:00:00 2001 +From: Michael Heimpold +Date: Sun, 4 Jun 2017 15:00:33 +0200 +Subject: [PATCH] Handle NULL strings gracefully during constant registration + +When libcurl is compiled not using e.g. libz or SSL, then a call to +curl_version_info could return NULL in the corresponding fields of +curl_version_info_data. + +Passing such NULL pointers down to REGISTER_NS_STRING_CONSTANT results +in a segfault during php startup, so let's check for this special case +and register a NULL constant in this case. + +Signed-off-by: Michael Heimpold +--- + src/php_http_client_curl.c | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c +index f286324..f07bb8f 100644 +--- a/src/php_http_client_curl.c ++++ b/src/php_http_client_curl.c +@@ -2429,6 +2429,14 @@ php_http_client_ops_t *php_http_client_curl_get_ops(void) + return &php_http_client_curl_ops; + } + ++#define REGISTER_NS_STRING_OR_NULL_CONSTANT(ns, name, str, flags) \ ++ do { \ ++ if ((str) != NULL) { \ ++ REGISTER_NS_STRING_CONSTANT(ns, name, str, flags); \ ++ } else { \ ++ REGISTER_NS_NULL_CONSTANT(ns, name, flags); \ ++ } \ ++ } while (0) + + PHP_MINIT_FUNCTION(http_client_curl) + { +@@ -2509,12 +2517,12 @@ PHP_MINIT_FUNCTION(http_client_curl) + REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl", "VERSIONS", curl_version(), CONST_CS|CONST_PERSISTENT); + #if CURLVERSION_NOW >= 0 + REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "CURL", (char *) info->version, CONST_CS|CONST_PERSISTENT); +- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "SSL", (char *) info->ssl_version, CONST_CS|CONST_PERSISTENT); +- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "LIBZ", (char *) info->libz_version, CONST_CS|CONST_PERSISTENT); ++ REGISTER_NS_STRING_OR_NULL_CONSTANT("http\\Client\\Curl\\Versions", "SSL", (char *) info->ssl_version, CONST_CS|CONST_PERSISTENT); ++ REGISTER_NS_STRING_OR_NULL_CONSTANT("http\\Client\\Curl\\Versions", "LIBZ", (char *) info->libz_version, CONST_CS|CONST_PERSISTENT); + # if CURLVERSION_NOW >= 1 +- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "ARES", (char *) info->ares, CONST_CS|CONST_PERSISTENT); ++ REGISTER_NS_STRING_OR_NULL_CONSTANT("http\\Client\\Curl\\Versions", "ARES", (char *) info->ares, CONST_CS|CONST_PERSISTENT); + # if CURLVERSION_NOW >= 2 +- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "IDN", (char *) info->libidn, CONST_CS|CONST_PERSISTENT); ++ REGISTER_NS_STRING_OR_NULL_CONSTANT("http\\Client\\Curl\\Versions", "IDN", (char *) info->libidn, CONST_CS|CONST_PERSISTENT); + # endif + # endif + #endif +-- +2.7.4 + diff --git a/lang/php7-pecl-http/patches/300-fix-73.patch b/lang/php7-pecl-http/patches/300-fix-73.patch new file mode 100644 index 00000000..1779223d --- /dev/null +++ b/lang/php7-pecl-http/patches/300-fix-73.patch @@ -0,0 +1,55 @@ +From 8158548a80733b3af9539356b47527d960a13287 Mon Sep 17 00:00:00 2001 +From: Michael Wallner +Date: Thu, 1 Feb 2018 14:36:09 +0100 +Subject: [PATCH] fix #73 + +include idna.h prior idn2.h to ensure INDA_H is defined and libidn2 does +not try to define the idna compat layer +--- + src/php_http.c | 6 +++--- + src/php_http_url.c | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/php_http.c b/src/php_http.c +index 207c248..bc9166a 100644 +--- a/src/php_http.c ++++ b/src/php_http.c +@@ -31,12 +31,12 @@ + #if PHP_HTTP_HAVE_LIBICU + # include + #endif +-#if PHP_HTTP_HAVE_LIBIDN2 +-# include +-#endif + #if PHP_HTTP_HAVE_LIBIDN + # include + #endif ++#if PHP_HTTP_HAVE_LIBIDN2 ++# include ++#endif + #if PHP_HTTP_HAVE_LIBIDNKIT2 || PHP_HTTP_HAVE_LIBIDNKIT + #include "idn/version.h" + #endif +diff --git a/src/php_http_url.c b/src/php_http_url.c +index 029e6a8..361e61c 100644 +--- a/src/php_http_url.c ++++ b/src/php_http_url.c +@@ -12,12 +12,12 @@ + + #include "php_http_api.h" + +-#if PHP_HTTP_HAVE_LIBIDN2 +-# include +-#endif + #if PHP_HTTP_HAVE_LIBIDN + # include + #endif ++#if PHP_HTTP_HAVE_LIBIDN2 ++# include ++#endif + #if PHP_HTTP_HAVE_LIBICU + # include + #endif +-- +2.7.4 + diff --git a/lang/php7-pecl-libevent/Makefile b/lang/php7-pecl-libevent/Makefile new file mode 100644 index 00000000..c57bddad --- /dev/null +++ b/lang/php7-pecl-libevent/Makefile @@ -0,0 +1,39 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PECL_NAME:=libevent +PECL_LONGNAME:=Libevent - event notification + +PKG_NAME:=php7-pecl-$(PECL_NAME) +PKG_VERSION=2017-03-24-$(PKG_SOURCE_VERSION) +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/expressif/pecl-event-libevent.git +PKG_SOURCE_VERSION:=5a726cee95ef9760fe81a60e595e87655f324594 +PKG_SOURCE_SUBDIR:=$(PECL_NAME)-$(PKG_SOURCE_VERSION) +PKG_SOURCE:=$(PECL_NAME)-$(PKG_SOURCE_VERSION).tar.gz +PKG_MIRROR_HASH:=8d6ef4e5f496cfe6aa927d4a8c886041c1aec04220f1a3670c084faa2cc01fe1 + +PKG_MAINTAINER:=Michael Heimpold + +PKG_LICENSE:=PHPv3.01 +PKG_LICENSE_FILES:= + +PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_SOURCE_VERSION) +PKG_BUILD_PARALLEL:=1 + +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +include ../php7/pecl.mk + +CONFIGURE_ARGS+= --with-libevent=shared,"$(STAGING_DIR)/usr" + +$(eval $(call PECLPackage,$(PECL_NAME),$(PECL_LONGNAME),+libevent2 +php7-mod-sockets,25)) +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/php7-pecl-libevent/patches/010-libevent2.patch b/lang/php7-pecl-libevent/patches/010-libevent2.patch new file mode 100644 index 00000000..961fb360 --- /dev/null +++ b/lang/php7-pecl-libevent/patches/010-libevent2.patch @@ -0,0 +1,16 @@ +--- a/libevent.c ++++ b/libevent.c +@@ -42,10 +42,12 @@ + (rsrc = (rsrc_type) zend_fetch_resource(passed_id TSRMLS_CC, default_id, resource_type_name, NULL, 1, resource_type)) + #endif + +-#ifdef PHP_WIN32 ++//#ifdef PHP_WIN32 + /* XXX compiling with 2.x on Windows. Luckily the ext code works thanks to the + compat exports from the libevent. However it might need to be adapted to the + never version, so this ifdefs would go away. */ ++#if 1 ++/* force use of libevent2 on OpenWrt and by-pass compat event.h */ + # include + # include + # include diff --git a/lang/php7-pecl-propro/Makefile b/lang/php7-pecl-propro/Makefile new file mode 100644 index 00000000..dbd662e3 --- /dev/null +++ b/lang/php7-pecl-propro/Makefile @@ -0,0 +1,43 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PECL_NAME:=propro +PECL_LONGNAME:=Property proxy + +PKG_VERSION:=2.1.0 +PKG_RELEASE:=1 +PKG_HASH:=7bba0653d90cd8f61816e13ac6c0f7102b4a16dc4c4e966095a121eeb4ae8271 + +PKG_NAME:=php7-pecl-propro +PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://pecl.php.net/get/ + +PKG_MAINTAINER:=Michael Heimpold + +PKG_LICENSE:=BSD-2-Clause +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 + +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +include ../php7/pecl.mk + +CONFIGURE_ARGS+= \ + --enable-propro + +define Build/InstallDev + mkdir -p $(STAGING_DIR)/usr/include/php7/ext/$(PECL_NAME) + $(CP) $(PKG_BUILD_DIR)/php_propro.h $(STAGING_DIR)/usr/include/php7/ext/$(PECL_NAME)/ + $(CP) $(PKG_BUILD_DIR)/php_propro_api.h $(STAGING_DIR)/usr/include/php7/ext/$(PECL_NAME)/ +endef + +$(eval $(call PECLPackage,$(PECL_NAME),$(PECL_LONGNAME))) +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/php7-pecl-raphf/Makefile b/lang/php7-pecl-raphf/Makefile new file mode 100644 index 00000000..88593231 --- /dev/null +++ b/lang/php7-pecl-raphf/Makefile @@ -0,0 +1,43 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PECL_NAME:=raphf +PECL_LONGNAME:=Resource and persistent handles factory + +PKG_VERSION:=2.0.0 +PKG_RELEASE:=2 +PKG_HASH:=95a59ea0dc3fc172805a6acd8327b122dd159b0a85b253826166457a05efa411 + +PKG_NAME:=php7-pecl-raphf +PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://pecl.php.net/get/ + +PKG_MAINTAINER:=Michael Heimpold + +PKG_LICENSE:=BSD-2-Clause +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 + +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +include ../php7/pecl.mk + +CONFIGURE_ARGS+= \ + --enable-raphf + +define Build/InstallDev + mkdir -p $(STAGING_DIR)/usr/include/php7/ext/$(PECL_NAME) + cp $(PKG_BUILD_DIR)/php_raphf.h $(STAGING_DIR)/usr/include/php7/ext/$(PECL_NAME)/ + cp $(PKG_BUILD_DIR)/php_raphf_api.h $(STAGING_DIR)/usr/include/php7/ext/$(PECL_NAME)/ +endef + +$(eval $(call PECLPackage,$(PECL_NAME),$(PECL_LONGNAME))) +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/php7/Makefile b/lang/php7/Makefile new file mode 100644 index 00000000..19b3bdaf --- /dev/null +++ b/lang/php7/Makefile @@ -0,0 +1,635 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=php +PKG_VERSION:=7.2.9 +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Michael Heimpold + +PKG_LICENSE:=PHPv3.01 +PKG_LICENSE_FILES:=LICENSE + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=http://www.php.net/distributions/ +PKG_HASH:=3585c1222e00494efee4f5a65a8e03a1e6eca3dfb834814236ee7f02c5248ae0 + +PKG_FIXUP:=libtool autoreconf +PKG_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 + +PHP7_MODULES = \ + calendar ctype curl \ + fileinfo \ + dom \ + exif \ + ftp \ + gettext gd gmp \ + hash \ + iconv imap intl \ + json \ + ldap \ + mbstring mysqli mysqlnd \ + opcache openssl \ + pcntl pdo pdo-mysql pdo-pgsql pdo-sqlite pgsql phar \ + session shmop simplexml snmp soap sockets sqlite3 sysvmsg sysvsem sysvshm \ + tokenizer \ + xml xmlreader xmlwriter zip \ + +PKG_CONFIG_DEPENDS:= \ + $(patsubst %,CONFIG_PACKAGE_php7-mod-%,$(PHP7_MODULES)) \ + CONFIG_PHP7_FILTER CONFIG_PHP7_LIBXML CONFIG_PHP7_SYSTEMTZDATA CONFIG_PHP7_LIBFREETYPE + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/php7/Default + SUBMENU:=PHP + SECTION:=lang + CATEGORY:=Languages + TITLE:=PHP7 Hypertext preprocessor + URL:=http://www.php.net/ + DEPENDS:=php7 +endef + +define Package/php7/Default/description + PHP is a widely-used general-purpose scripting language that is especially + suited for Web development and can be embedded into HTML. +endef + +define Package/php7/config + config PHP7_FILTER + bool "PHP7 Filter support" + depends on PACKAGE_php7-cli || PACKAGE_php7-cgi + default y + + config PHP7_LIBXML + bool "PHP7 LIBXML support" + depends on PACKAGE_php7-cli || PACKAGE_php7-cgi + + config PHP7_SYSTEMTZDATA + bool "Use system timezone data instead of php's built-in database" + depends on PACKAGE_php7-cli || PACKAGE_php7-cgi + default y + help + Enabling this feature automatically selects the zoneinfo-core package + which contains data for UTC timezone. To use other timezones you have + to install the corresponding zoneinfo-... package(s). +endef + +define Package/php7 + $(call Package/php7/Default) + + DEPENDS:=+libpcre +zlib \ + +PHP7_LIBXML:libxml2 \ + +PHP7_SYSTEMTZDATA:zoneinfo-core +endef + +define Package/php7/description + $(call Package/php7/Default/description) + This package contains only the PHP config file. You must actually choose + your PHP flavour (cli, cgi or fastcgi). + + Please note, that installing php5 and php7 in parallel on the same target + is not supported in OpenWrt/LEDE. +endef + +define Package/php7-cli + $(call Package/php7/Default) + DEPENDS+= +PACKAGE_php7-mod-intl:libstdcpp + TITLE+= (CLI) +endef + +define Package/php7-cli/description + $(call Package/php7/Default/description) + This package contains the CLI version of the PHP7 interpreter. +endef + +define Package/php7-cgi + $(call Package/php7/Default) + DEPENDS+= +PACKAGE_php7-mod-intl:libstdcpp + TITLE+= (CGI & FastCGI) +endef + +define Package/php7-cgi/description + $(call Package/php7/Default/description) + This package contains the CGI version of the PHP7 interpreter. +endef + +define Package/php7-fastcgi + $(call Package/php7/Default) + DEPENDS+= +php7-cgi + TITLE:=FastCGI startup script +endef + +define Package/php7-fastcgi/description + As FastCGI support is now a core feature the php7-fastcgi package now depends + on the php7-cgi package, containing just the startup script. +endef + +define Package/php7-fpm + $(call Package/php7/Default) + DEPENDS+= +PACKAGE_php7-mod-intl:libstdcpp + TITLE+= (FPM) +endef + +define Package/php7-fpm/description + $(call Package/php7/Default/description) + This package contains the FastCGI Process Manager of the PHP7 interpreter. +endef + +define Package/php7-mod-gd/config + config PHP7_LIBFREETYPE + bool "Enable Freetype 2 support in php7-mod-gd" + depends on PACKAGE_php7-mod-gd + default y +endef + +# not everything groks --disable-nls +DISABLE_NLS:= + +CONFIGURE_ARGS+= \ + --enable-cli \ + --enable-cgi \ + --enable-fpm \ + --enable-shared \ + --disable-static \ + --disable-rpath \ + --disable-debug \ + --disable-phpdbg \ + --without-pear \ + \ + --with-config-file-path=/etc \ + --with-config-file-scan-dir=/etc/php7 \ + --disable-short-tags \ + \ + --without-valgrind \ + --with-pcre-regex="$(STAGING_DIR)/usr" \ + --with-zlib="$(STAGING_DIR)/usr" \ + --with-zlib-dir="$(STAGING_DIR)/usr" + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-calendar),) + CONFIGURE_ARGS+= --enable-calendar=shared +else + CONFIGURE_ARGS+= --disable-calendar +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-ctype),) + CONFIGURE_ARGS+= --enable-ctype=shared +else + CONFIGURE_ARGS+= --disable-ctype +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-curl),) + CONFIGURE_ARGS+= --with-curl=shared,"$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --without-curl +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-fileinfo),) + CONFIGURE_ARGS+= --enable-fileinfo=shared +else + CONFIGURE_ARGS+= --disable-fileinfo +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gettext),) + CONFIGURE_ARGS+= --with-gettext=shared,"$(STAGING_DIR)/usr/lib/libintl-full" +else + CONFIGURE_ARGS+= --without-gettext +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-dom),) + CONFIGURE_ARGS+= --enable-dom=shared +else + CONFIGURE_ARGS+= --disable-dom +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-exif),) + CONFIGURE_ARGS+= --enable-exif=shared +else + CONFIGURE_ARGS+= --disable-exif +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-ftp),) + CONFIGURE_ARGS+= --enable-ftp=shared +else + CONFIGURE_ARGS+= --disable-ftp +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gd),) + CONFIGURE_ARGS+= \ + --with-gd=shared \ + --with-jpeg-dir="$(STAGING_DIR)/usr" \ + --with-png-dir="$(STAGING_DIR)/usr" \ + --without-xpm-dir \ + --enable-gd-native-ttf \ + --disable-gd-jis-conv +else + CONFIGURE_ARGS+= --without-gd +endif +ifneq ($(CONFIG_PHP7_LIBFREETYPE),) + CONFIGURE_ARGS+= --with-freetype-dir="$(STAGING_DIR)" +else + CONFIGURE_ARGS+= --without-freetype-dir +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gmp),) + CONFIGURE_ARGS+= --with-gmp=shared,"$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --without-gmp +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-hash),) + CONFIGURE_ARGS+= --enable-hash=shared +else + CONFIGURE_ARGS+= --disable-hash +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-iconv),) + CONFIGURE_ARGS+= --with-iconv=shared,"$(ICONV_PREFIX)" +else + CONFIGURE_ARGS+= --without-iconv +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-imap),) + CONFIGURE_ARGS+= \ + --with-imap=shared,"$(STAGING_DIR)/usr" \ + --with-imap-kerberos=no \ + --with-imap-ssl="$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --without-imap +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-intl),) + CONFIGURE_ARGS+= --enable-intl=shared + TARGET_CXXFLAGS+= -std=c++0x +else + CONFIGURE_ARGS+= --disable-intl +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-json),) + CONFIGURE_ARGS+= --enable-json=shared +else + CONFIGURE_ARGS+= --disable-json +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-ldap),) + CONFIGURE_ARGS+= \ + --with-ldap=shared,"$(STAGING_DIR)/usr" \ + --with-ldap-sasl="$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --without-ldap +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-mbstring),) + CONFIGURE_ARGS+= --enable-mbstring=shared --enable-mbregex +else + CONFIGURE_ARGS+= --disable-mbstring +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-mysqli),) + CONFIGURE_ARGS+= --with-mysqli=shared +else + CONFIGURE_ARGS+= --without-mysqli +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-mysqlnd),) + CONFIGURE_ARGS+= --enable-mysqlnd=shared +else + CONFIGURE_ARGS+= --disable-mysqlnd +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-opcache),) + CONFIGURE_ARGS+= --enable-opcache=shared +else + CONFIGURE_ARGS+= --disable-opcache +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-openssl)$(CONFIG_PACKAGE_php7-mod-ftp)$(CONFIG_PACKAGE_php7-mod-imap)$(CONFIG_PACKAGE_php7-mod-snmp),) + CONFIGURE_ARGS+= \ + --with-openssl=shared,"$(STAGING_DIR)/usr" \ + --with-kerberos=no \ + --with-openssl-dir="$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --without-openssl +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pcntl),) + CONFIGURE_ARGS+= --enable-pcntl=shared +else + CONFIGURE_ARGS+= --disable-pcntl +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo),) + CONFIGURE_ARGS+= --enable-pdo=shared + ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo-mysql),) + CONFIGURE_ARGS+= --with-pdo-mysql=shared + else + CONFIGURE_ARGS+= --without-pdo-mysql + endif + ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo-pgsql),) + CONFIGURE_ARGS+= --with-pdo-pgsql=shared,"$(STAGING_DIR)/usr" + else + CONFIGURE_ARGS+= --without-pdo-pgsql + endif + ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo-sqlite),) + CONFIGURE_ARGS+= --with-pdo-sqlite=shared,"$(STAGING_DIR)/usr" + else + CONFIGURE_ARGS+= --without-pdo-sqlite + endif +else + CONFIGURE_ARGS+= --disable-pdo +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pgsql),) + CONFIGURE_ARGS+= --with-pgsql=shared,"$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --without-pgsql +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-phar),) + CONFIGURE_ARGS+= --enable-phar=shared +else + CONFIGURE_ARGS+= --disable-phar +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-session),) + CONFIGURE_ARGS+= --enable-session=shared +else + CONFIGURE_ARGS+= --disable-session +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-shmop),) + CONFIGURE_ARGS+= --enable-shmop=shared +else + CONFIGURE_ARGS+= --disable-shmop +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-simplexml),) + CONFIGURE_ARGS+= --enable-simplexml=shared +else + CONFIGURE_ARGS+= --disable-simplexml +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-snmp),) + CONFIGURE_ARGS+= --with-snmp=shared,"$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --without-snmp +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-soap),) + CONFIGURE_ARGS+= --enable-soap=shared +else + CONFIGURE_ARGS+= --disable-soap +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sockets),) + CONFIGURE_ARGS+= --enable-sockets=shared +else + CONFIGURE_ARGS+= --disable-sockets +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sqlite3),) + CONFIGURE_ARGS+= --with-sqlite3=shared,"$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --without-sqlite3 +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sysvmsg),) + CONFIGURE_ARGS+= --enable-sysvmsg=shared +else + CONFIGURE_ARGS+= --disable-sysvmsg +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sysvsem),) + CONFIGURE_ARGS+= --enable-sysvsem=shared +else + CONFIGURE_ARGS+= --disable-sysvsem +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sysvshm),) + CONFIGURE_ARGS+= --enable-sysvshm=shared +else + CONFIGURE_ARGS+= --disable-sysvshm +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-tokenizer),) + CONFIGURE_ARGS+= --enable-tokenizer=shared +else + CONFIGURE_ARGS+= --disable-tokenizer +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-xml),) + CONFIGURE_ARGS+= --enable-xml=shared,"$(STAGING_DIR)/usr" + ifneq ($(CONFIG_PHP7_LIBXML),) + CONFIGURE_ARGS+= --with-libxml-dir="$(STAGING_DIR)/usr/include/libxml2" + else + CONFIGURE_ARGS+= --with-libexpat-dir="$(STAGING_DIR)/usr" + endif +else + CONFIGURE_ARGS+= --disable-xml +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-xmlreader),) + CONFIGURE_ARGS+= --enable-xmlreader=shared,"$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --disable-xmlreader +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-xmlwriter),) + CONFIGURE_ARGS+= --enable-xmlwriter=shared,"$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --disable-xmlwriter +endif + +ifneq ($(CONFIG_PACKAGE_php7-mod-zip),) + CONFIGURE_ARGS+= --enable-zip=shared +else + CONFIGURE_ARGS+= --disable-zip +endif + +ifneq ($(SDK)$(CONFIG_PHP7_FILTER),) + CONFIGURE_ARGS+= --enable-filter +else + CONFIGURE_ARGS+= --disable-filter +endif + +ifneq ($(SDK)$(CONFIG_PHP7_LIBXML),) + CONFIGURE_ARGS+= --enable-libxml + CONFIGURE_ARGS+= --with-libxml-dir="$(STAGING_DIR)/usr/include/libxml2" +else + CONFIGURE_ARGS+= --disable-libxml +endif + +ifneq ($(CONFIG_PHP7_SYSTEMTZDATA),) + CONFIGURE_ARGS+= --with-system-tzdata +else + CONFIGURE_ARGS+= --without-system-tzdata +endif + +CONFIGURE_VARS+= \ + ac_cv_c_bigendian_php=$(if $(CONFIG_BIG_ENDIAN),yes,no) \ + php_cv_cc_rpath="no" \ + iconv_impl_name="gnu_libiconv" \ + ac_cv_php_xml2_config_path="$(STAGING_DIR)/host/bin/xml2-config" \ + ac_cv_u8t_decompose=yes + +define Package/php7/conffiles +/etc/php.ini +/etc/php7/ +endef + +define Package/php7/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/php.ini $(1)/etc/ +endef + +define Package/php7-cli/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/sapi/cli/php $(1)/usr/bin/php-cli +endef + +define Package/php7-cgi/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/sapi/cgi/php-cgi $(1)/usr/bin/php-cgi + ln -sf php-cgi $(1)/usr/bin/php-fcgi +endef + +define Package/php7-fastcgi/install + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/php7-fastcgi.config $(1)/etc/config/php7-fastcgi + + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/php7-fastcgi.init $(1)/etc/init.d/php7-fastcgi +endef + +define Package/php7-fpm/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/sapi/fpm/php-fpm $(1)/usr/bin/php-fpm + + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/php7-fpm.conf $(1)/etc/php7-fpm.conf + + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/php7-fpm.config $(1)/etc/config/php7-fpm + + $(INSTALL_DIR) $(1)/etc/php7-fpm.d + $(INSTALL_DATA) ./files/php7-fpm-www.conf $(1)/etc/php7-fpm.d/www.conf + + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/php7-fpm.init $(1)/etc/init.d/php7-fpm +endef + +define Package/php7-fpm/conffiles +/etc/php7-fpm.conf +/etc/php7-fpm.d/ +/etc/config/php7-fpm +endef + +define Build/Prepare + $(call Build/Prepare/Default) + ( cd $(PKG_BUILD_DIR); touch configure.in; ./buildconf --force ) +endef + +define Build/InstallDev + rm -rf $(PKG_BUILD_DIR)/staging + make -C $(PKG_BUILD_DIR) install INSTALL_ROOT=$(PKG_BUILD_DIR)/staging + rm -rf $(PKG_BUILD_DIR)/staging/usr/{share,man,sbin} + rm -f $(PKG_BUILD_DIR)/staging/usr/bin/{php,php-cgi,php-cli} + mv $(PKG_BUILD_DIR)/staging/usr/bin/phpize $(PKG_BUILD_DIR)/staging/usr/bin/phpize7 + mv $(PKG_BUILD_DIR)/staging/usr/bin/php-config $(PKG_BUILD_DIR)/staging/usr/bin/php7-config + mv $(PKG_BUILD_DIR)/staging/usr/include/php $(PKG_BUILD_DIR)/staging/usr/include/php7 + mv $(PKG_BUILD_DIR)/staging/usr/lib/php $(PKG_BUILD_DIR)/staging/usr/lib/php7 + + $(CP) $(PKG_BUILD_DIR)/staging/usr $(STAGING_DIR)/ + + sed -i -e "s#prefix='/usr'#prefix='$(STAGING_DIR)/usr'#" $(STAGING_DIR)/usr/bin/phpize7 + sed -i -e "s#exec_prefix=\"\`eval echo /usr\`\"#exec_prefix='$(STAGING_DIR)/usr'#" $(STAGING_DIR)/usr/bin/phpize7 + sed -i -e "s#/include\`/php\"#/include\`/php7\"#" $(STAGING_DIR)/usr/bin/phpize7 + sed -i -e "s#/lib/php\`/build\"#/lib/php7\`/build\"#" $(STAGING_DIR)/usr/bin/phpize7 + + sed -i -e "s#prefix=\"/usr\"#prefix=\"$(STAGING_DIR)/usr\"#" $(STAGING_DIR)/usr/bin/php7-config + sed -i -e "s#/include/php\"#/include/php7\"#" $(STAGING_DIR)/usr/bin/php7-config +endef + +define BuildModule + + define Package/php7-mod-$(1) + $(call Package/php7/Default) + + ifneq ($(3),) + DEPENDS+=$(3) + endif + + TITLE:=$(2) shared module + endef + + define Package/php7-mod-$(1)/install + $(INSTALL_DIR) $$(1)/usr/lib/php + $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$(subst -,_,$(1)).so $$(1)/usr/lib/php/ + $(INSTALL_DIR) $$(1)/etc/php7 + ifeq ($(5),zend) + echo "zend_extension=/usr/lib/php/$(subst -,_,$(1)).so" > $$(1)/etc/php7/$(if $(4),$(4),20)_$(subst -,_,$(1)).ini + else + echo "extension=$(subst -,_,$(1)).so" > $$(1)/etc/php7/$(if $(4),$(4),20)_$(subst -,_,$(1)).ini + endif + endef + + $$(eval $$(call BuildPackage,php7-mod-$(1))) + +endef + +$(eval $(call BuildPackage,php7)) +$(eval $(call BuildPackage,php7-cgi)) +$(eval $(call BuildPackage,php7-cli)) +$(eval $(call BuildPackage,php7-fastcgi)) +$(eval $(call BuildPackage,php7-fpm)) + +#$(eval $(call BuildModule,NAME,TITLE[,PKG DEPENDS])) +$(eval $(call BuildModule,calendar,Calendar)) +$(eval $(call BuildModule,ctype,Ctype)) +$(eval $(call BuildModule,curl,cURL,+PACKAGE_php7-mod-curl:libcurl)) +$(eval $(call BuildModule,dom,DOM,+@PHP7_LIBXML +PACKAGE_php7-mod-dom:libxml2)) +$(eval $(call BuildModule,exif,EXIF)) +$(eval $(call BuildModule,fileinfo,Fileinfo)) +$(eval $(call BuildModule,ftp,FTP,+PACKAGE_php7-mod-ftp:libopenssl)) +$(eval $(call BuildModule,gd,GD graphics,+PACKAGE_php7-mod-gd:libjpeg +PACKAGE_php7-mod-gd:libpng +PHP7_LIBFREETYPE:libfreetype)) +$(eval $(call BuildModule,gettext,Gettext,+PACKAGE_php7-mod-gettext:libintl-full)) +$(eval $(call BuildModule,gmp,GMP,+PACKAGE_php7-mod-gmp:libgmp)) +$(eval $(call BuildModule,hash,Hash)) +$(eval $(call BuildModule,iconv,iConv,$(ICONV_DEPENDS))) +$(eval $(call BuildModule,imap,IMAP,+PACKAGE_php7-mod-imap:libopenssl +PACKAGE_libpam:libpam +PACKAGE_php7-mod-imap:uw-imap)) +$(eval $(call BuildModule,intl,Internationalization Functions,+PACKAGE_php7-mod-intl:icu)) +$(eval $(call BuildModule,json,JSON)) +$(eval $(call BuildModule,ldap,LDAP,+PACKAGE_php7-mod-ldap:libopenldap +PACKAGE_php7-mod-ldap:libsasl2)) +$(eval $(call BuildModule,mbstring,MBString)) +$(eval $(call BuildModule,mysqli,MySQL Improved Extension,+PACKAGE_php7-mod-mysqli:php7-mod-mysqlnd,30)) +$(eval $(call BuildModule,mysqlnd,MySQL Native Driver,+php7-mod-hash)) +$(eval $(call BuildModule,opcache,OPcache,,,zend)) +$(eval $(call BuildModule,openssl,OpenSSL,+PACKAGE_php7-mod-openssl:libopenssl)) +$(eval $(call BuildModule,pcntl,PCNTL)) +$(eval $(call BuildModule,pdo,PHP Data Objects)) +$(eval $(call BuildModule,pdo-mysql,PDO driver for MySQL,+php7-mod-pdo +PACKAGE_php7-mod-pdo-mysql:php7-mod-mysqlnd)) +$(eval $(call BuildModule,pdo-pgsql,PDO driver for PostgreSQL,+php7-mod-pdo +PACKAGE_php7-mod-pdo-pgsql:libpq)) +$(eval $(call BuildModule,pdo-sqlite,PDO driver for SQLite 3.x,+php7-mod-pdo +PACKAGE_php7-mod-pdo-sqlite:libsqlite3 +PACKAGE_php7-mod-pdo-sqlite:librt)) +$(eval $(call BuildModule,pgsql,PostgreSQL,+PACKAGE_php7-mod-pgsql:libpq)) +$(eval $(call BuildModule,phar,Phar Archives,+php7-mod-hash)) +$(eval $(call BuildModule,session,Session)) +$(eval $(call BuildModule,shmop,Shared Memory)) +$(eval $(call BuildModule,simplexml,SimpleXML,+@PHP7_LIBXML +PACKAGE_php7-mod-simplexml:libxml2)) +$(eval $(call BuildModule,snmp,SNMP,+PACKAGE_php7-mod-snmp:libnetsnmp +PACKAGE_php7-mod-snmp:libopenssl)) +$(eval $(call BuildModule,soap,SOAP,+@PHP7_LIBXML +PACKAGE_php7-mod-soap:libxml2)) +$(eval $(call BuildModule,sockets,Sockets)) +$(eval $(call BuildModule,sqlite3,SQLite3,+PACKAGE_php7-mod-sqlite3:libsqlite3)) +$(eval $(call BuildModule,sysvmsg,System V messages)) +$(eval $(call BuildModule,sysvsem,System V shared memory)) +$(eval $(call BuildModule,sysvshm,System V semaphore)) +$(eval $(call BuildModule,tokenizer,Tokenizer)) +$(eval $(call BuildModule,xml,XML,+PHP7_LIBXML:libxml2 +!PHP7_LIBXML:libexpat)) +$(eval $(call BuildModule,xmlreader,XMLReader,+@PHP7_LIBXML +PACKAGE_php7-mod-xmlreader:libxml2)) +$(eval $(call BuildModule,xmlwriter,XMLWriter,+@PHP7_LIBXML +PACKAGE_php7-mod-xmlwriter:libxml2)) +$(eval $(call BuildModule,zip,ZIP,+PACKAGE_php7-mod-zip:zlib)) diff --git a/lang/php7/files/php.ini b/lang/php7/files/php.ini new file mode 100644 index 00000000..c88ab0a4 --- /dev/null +++ b/lang/php7/files/php.ini @@ -0,0 +1,152 @@ +[PHP] +zend.ze1_compatibility_mode = Off + +; Language Options + +engine = On +;short_open_tag = Off +precision = 12 +y2k_compliance = On +output_buffering = Off +;output_handler = +zlib.output_compression = Off +;zlib.output_compression_level = -1 +;zlib.output_handler = +implicit_flush = Off +unserialize_callback_func = +serialize_precision = 100 + +;open_basedir = +disable_functions = +disable_classes = + +; Colors for Syntax Highlighting mode. Anything that's acceptable in +; would work. +;highlight.string = #DD0000 +;highlight.comment = #FF9900 +;highlight.keyword = #007700 +;highlight.bg = #FFFFFF +;highlight.default = #0000BB +;highlight.html = #000000 + +;ignore_user_abort = On +;realpath_cache_size = 16k +;realpath_cache_ttl = 120 + +; Miscellaneous + +expose_php = On + +; Resource Limits + +max_execution_time = 30 ; Maximum execution time of each script, in seconds. +max_input_time = 60 ; Maximum amount of time each script may spend parsing request data. +;max_input_nesting_level = 64 +memory_limit = 8M ; Maximum amount of memory a script may consume. + +; Error handling and logging + +; Error Level Constants: +; E_ALL - All errors and warnings (includes E_STRICT as of PHP 6.0.0) +; E_ERROR - fatal run-time errors +; E_RECOVERABLE_ERROR - almost fatal run-time errors +; E_WARNING - run-time warnings (non-fatal errors) +; E_PARSE - compile-time parse errors +; E_NOTICE - run-time notices (these are warnings which often result +; from a bug in your code, but it's possible that it was +; intentional (e.g., using an uninitialized variable and +; relying on the fact it's automatically initialized to an +; empty string) +; E_STRICT - run-time notices, enable to have PHP suggest changes +; to your code which will ensure the best interoperability +; and forward compatibility of your code +; E_CORE_ERROR - fatal errors that occur during PHP's initial startup +; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's +; initial startup +; E_COMPILE_ERROR - fatal compile-time errors +; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) +; E_USER_ERROR - user-generated error message +; E_USER_WARNING - user-generated warning message +; E_USER_NOTICE - user-generated notice message +; E_DEPRECATED - warn about code that will not work in future versions +; of PHP +; E_USER_DEPRECATED - user-generated deprecation warnings +; +; Common Values: +; E_ALL & ~E_NOTICE (Show all errors, except for notices and coding standards warnings.) +; E_ALL & ~E_NOTICE | E_STRICT (Show all errors, except for notices) +; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) +; E_ALL | E_STRICT (Show all errors, warnings and notices including coding standards.) +; Default Value: E_ALL & ~E_NOTICE +error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT + +display_errors = On +display_startup_errors = Off +log_errors = Off +log_errors_max_len = 1024 +ignore_repeated_errors = Off +ignore_repeated_source = Off +report_memleaks = On +;report_zend_debug = 0 +track_errors = Off +;html_errors = Off +;docref_root = "/phpmanual/" +;docref_ext = .html +;error_prepend_string = "" +;error_append_string = "" +; Log errors to specified file. +;error_log = /var/log/php_errors.log +; Log errors to syslog. +;error_log = syslog + +; Data Handling + +;arg_separator.output = "&" +;arg_separator.input = ";&" +variables_order = "EGPCS" +request_order = "GP" +register_globals = Off +register_long_arrays = Off +register_argc_argv = On +auto_globals_jit = On +post_max_size = 8M +;magic_quotes_gpc = Off +magic_quotes_runtime = Off +magic_quotes_sybase = Off +auto_prepend_file = +auto_append_file = +default_mimetype = "text/html" +;default_charset = "iso-8859-1" +;always_populate_raw_post_data = On + +; Paths and Directories + +; UNIX: "/path1:/path2" +;include_path = ".:/php/includes" +doc_root = "/www" +user_dir = +extension_dir = "/usr/lib/php" +enable_dl = On +;cgi.force_redirect = 1 +;cgi.nph = 1 +;cgi.redirect_status_env = ; +cgi.fix_pathinfo=1 +;fastcgi.impersonate = 1; +;fastcgi.logging = 0 +;cgi.rfc2616_headers = 0 + +; File Uploads + +file_uploads = On +upload_tmp_dir = "/tmp" +upload_max_filesize = 2M +max_file_uploads = 20 + +; Fopen wrappers + +allow_url_fopen = On +allow_url_include = Off +;from="john@doe.com" +;user_agent="PHP" +default_socket_timeout = 60 +;auto_detect_line_endings = Off diff --git a/lang/php7/files/php7-fastcgi.config b/lang/php7/files/php7-fastcgi.config new file mode 100644 index 00000000..22e9998c --- /dev/null +++ b/lang/php7/files/php7-fastcgi.config @@ -0,0 +1,3 @@ +config php7-fastcgi + option enabled 1 + option port '1026' diff --git a/lang/php7/files/php7-fastcgi.init b/lang/php7/files/php7-fastcgi.init new file mode 100644 index 00000000..21f5b09e --- /dev/null +++ b/lang/php7/files/php7-fastcgi.init @@ -0,0 +1,29 @@ +#!/bin/sh /etc/rc.common + +START=50 + +SERVICE_DAEMONIZE=1 +SERVICE_WRITE_PID=1 + +start_instance() { + local section="$1" + local enabled + local port + + config_get_bool enabled "$section" 'enabled' 0 + config_get port "$section" 'port' 1026 + + [ $enabled -gt 0 ] || return 1 + + PHP_FCGI_CHILDREN='' \ + service_start /usr/bin/php-fcgi -b $port +} + +start() { + config_load 'php7-fastcgi' + config_foreach start_instance 'php7-fastcgi' +} + +stop() { + service_stop /usr/bin/php-fcgi +} diff --git a/lang/php7/files/php7-fpm-www.conf b/lang/php7/files/php7-fpm-www.conf new file mode 100644 index 00000000..d3a32224 --- /dev/null +++ b/lang/php7/files/php7-fpm-www.conf @@ -0,0 +1,392 @@ +; Start a new pool named 'www'. +; the variable $pool can we used in any directive and will be replaced by the +; pool name ('www' here) +[www] + +; Per pool prefix +; It only applies on the following directives: +; - 'slowlog' +; - 'listen' (unixsocket) +; - 'chroot' +; - 'chdir' +; - 'php_values' +; - 'php_admin_values' +; When not set, the global prefix (or /usr) applies instead. +; Note: This directive can also be relative to the global prefix. +; Default Value: none +;prefix = /path/to/pools/$pool + +; Unix user/group of processes +; Note: The user is mandatory. If the group is not set, the default user's group +; will be used. +user = nobody +;group = + +; The address on which to accept FastCGI requests. +; Valid syntaxes are: +; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on +; a specific port; +; 'port' - to listen on a TCP socket to all addresses on a +; specific port; +; '/path/to/unix/socket' - to listen on a unix socket. +; Note: This value is mandatory. +listen = /var/run/php7-fpm.sock + +; Set listen(2) backlog. +; Default Value: 128 (-1 on FreeBSD and OpenBSD) +;listen.backlog = 128 + +; Set permissions for unix socket, if one is used. In Linux, read/write +; permissions must be set in order to allow connections from a web server. Many +; BSD-derived systems allow connections regardless of permissions. +; Default Values: user and group are set as the running user +; mode is set to 0666 +;listen.owner = www-data +;listen.group = www-data +;listen.mode = 0666 + +; List of ipv4 addresses of FastCGI clients which are allowed to connect. +; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original +; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address +; must be separated by a comma. If this value is left blank, connections will be +; accepted from any ip address. +; Default Value: any +;listen.allowed_clients = 127.0.0.1 + +; Specify the nice(2) priority to apply to the pool processes (only if set) +; The value can vary from -19 (highest priority) to 20 (lower priority) +; Note: - It will only work if the FPM master process is launched as root +; - The pool processes will inherit the master process priority +; unless it specified otherwise +; Default Value: no set +; priority = -19 + +; Choose how the process manager will control the number of child processes. +; Possible Values: +; static - a fixed number (pm.max_children) of child processes; +; dynamic - the number of child processes are set dynamically based on the +; following directives. With this process management, there will be +; always at least 1 children. +; pm.max_children - the maximum number of children that can +; be alive at the same time. +; pm.start_servers - the number of children created on startup. +; pm.min_spare_servers - the minimum number of children in 'idle' +; state (waiting to process). If the number +; of 'idle' processes is less than this +; number then some children will be created. +; pm.max_spare_servers - the maximum number of children in 'idle' +; state (waiting to process). If the number +; of 'idle' processes is greater than this +; number then some children will be killed. +; ondemand - no children are created at startup. Children will be forked when +; new requests will connect. The following parameter are used: +; pm.max_children - the maximum number of children that +; can be alive at the same time. +; pm.process_idle_timeout - The number of seconds after which +; an idle process will be killed. +; Note: This value is mandatory. +pm = dynamic + +; The number of child processes to be created when pm is set to 'static' and the +; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. +; This value sets the limit on the number of simultaneous requests that will be +; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. +; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP +; CGI. The below defaults are based on a server without much resources. Don't +; forget to tweak pm.* to fit your needs. +; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' +; Note: This value is mandatory. +pm.max_children = 5 + +; The number of child processes created on startup. +; Note: Used only when pm is set to 'dynamic' +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 +pm.start_servers = 2 + +; The desired minimum number of idle server processes. +; Note: Used only when pm is set to 'dynamic' +; Note: Mandatory when pm is set to 'dynamic' +pm.min_spare_servers = 1 + +; The desired maximum number of idle server processes. +; Note: Used only when pm is set to 'dynamic' +; Note: Mandatory when pm is set to 'dynamic' +pm.max_spare_servers = 3 + +; The number of seconds after which an idle process will be killed. +; Note: Used only when pm is set to 'ondemand' +; Default Value: 10s +;pm.process_idle_timeout = 10s; + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. For +; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default Value: 0 +;pm.max_requests = 500 + +; The URI to view the FPM status page. If this value is not set, no URI will be +; recognized as a status page. It shows the following informations: +; pool - the name of the pool; +; process manager - static, dynamic or ondemand; +; start time - the date and time FPM has started; +; start since - number of seconds since FPM has started; +; accepted conn - the number of request accepted by the pool; +; listen queue - the number of request in the queue of pending +; connections (see backlog in listen(2)); +; max listen queue - the maximum number of requests in the queue +; of pending connections since FPM has started; +; listen queue len - the size of the socket queue of pending connections; +; idle processes - the number of idle processes; +; active processes - the number of active processes; +; total processes - the number of idle + active processes; +; max active processes - the maximum number of active processes since FPM +; has started; +; max children reached - number of times, the process limit has been reached, +; when pm tries to start more children (works only for +; pm 'dynamic' and 'ondemand'); +; Value are updated in real time. +; Example output: +; pool: www +; process manager: static +; start time: 01/Jul/2011:17:53:49 +0200 +; start since: 62636 +; accepted conn: 190460 +; listen queue: 0 +; max listen queue: 1 +; listen queue len: 42 +; idle processes: 4 +; active processes: 11 +; total processes: 15 +; max active processes: 12 +; max children reached: 0 +; +; By default the status page output is formatted as text/plain. Passing either +; 'html', 'xml' or 'json' in the query string will return the corresponding +; output syntax. Example: +; http://www.foo.bar/status +; http://www.foo.bar/status?json +; http://www.foo.bar/status?html +; http://www.foo.bar/status?xml +; +; By default the status page only outputs short status. Passing 'full' in the +; query string will also return status for each pool process. +; Example: +; http://www.foo.bar/status?full +; http://www.foo.bar/status?json&full +; http://www.foo.bar/status?html&full +; http://www.foo.bar/status?xml&full +; The Full status returns for each process: +; pid - the PID of the process; +; state - the state of the process (Idle, Running, ...); +; start time - the date and time the process has started; +; start since - the number of seconds since the process has started; +; requests - the number of requests the process has served; +; request duration - the duration in µs of the requests; +; request method - the request method (GET, POST, ...); +; request URI - the request URI with the query string; +; content length - the content length of the request (only with POST); +; user - the user (PHP_AUTH_USER) (or '-' if not set); +; script - the main script called (or '-' if not set); +; last request cpu - the %cpu the last request consumed +; it's always 0 if the process is not in Idle state +; because CPU calculation is done when the request +; processing has terminated; +; last request memory - the max amount of memory the last request consumed +; it's always 0 if the process is not in Idle state +; because memory calculation is done when the request +; processing has terminated; +; If the process is in Idle state, then informations are related to the +; last request the process has served. Otherwise informations are related to +; the current request being served. +; Example output: +; ************************ +; pid: 31330 +; state: Running +; start time: 01/Jul/2011:17:53:49 +0200 +; start since: 63087 +; requests: 12808 +; request duration: 1250261 +; request method: GET +; request URI: /test_mem.php?N=10000 +; content length: 0 +; user: - +; script: /home/fat/web/docs/php/test_mem.php +; last request cpu: 0.00 +; last request memory: 0 +; +; Note: There is a real-time FPM status monitoring sample web page available +; It's available in: ${prefix}/share/fpm/status.html +; +; Note: The value must start with a leading slash (/). The value can be +; anything, but it may not be a good idea to use the .php extension or it +; may conflict with a real PHP file. +; Default Value: not set +;pm.status_path = /status + +; The ping URI to call the monitoring page of FPM. If this value is not set, no +; URI will be recognized as a ping page. This could be used to test from outside +; that FPM is alive and responding, or to +; - create a graph of FPM availability (rrd or such); +; - remove a server from a group if it is not responding (load balancing); +; - trigger alerts for the operating team (24/7). +; Note: The value must start with a leading slash (/). The value can be +; anything, but it may not be a good idea to use the .php extension or it +; may conflict with a real PHP file. +; Default Value: not set +;ping.path = /ping + +; This directive may be used to customize the response of a ping request. The +; response is formatted as text/plain with a 200 response code. +; Default Value: pong +;ping.response = pong + +; The access log file +; Default: not set +;access.log = log/$pool.access.log + +; The access log format. +; The following syntax is allowed +; %%: the '%' character +; %C: %CPU used by the request +; it can accept the following format: +; - %{user}C for user CPU only +; - %{system}C for system CPU only +; - %{total}C for user + system CPU (default) +; %d: time taken to serve the request +; it can accept the following format: +; - %{seconds}d (default) +; - %{miliseconds}d +; - %{mili}d +; - %{microseconds}d +; - %{micro}d +; %e: an environment variable (same as $_ENV or $_SERVER) +; it must be associated with embraces to specify the name of the env +; variable. Some exemples: +; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e +; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e +; %f: script filename +; %l: content-length of the request (for POST request only) +; %m: request method +; %M: peak of memory allocated by PHP +; it can accept the following format: +; - %{bytes}M (default) +; - %{kilobytes}M +; - %{kilo}M +; - %{megabytes}M +; - %{mega}M +; %n: pool name +; %o: ouput header +; it must be associated with embraces to specify the name of the header: +; - %{Content-Type}o +; - %{X-Powered-By}o +; - %{Transfert-Encoding}o +; - .... +; %p: PID of the child that serviced the request +; %P: PID of the parent of the child that serviced the request +; %q: the query string +; %Q: the '?' character if query string exists +; %r: the request URI (without the query string, see %q and %Q) +; %R: remote IP address +; %s: status (response code) +; %t: server time the request was received +; it can accept a strftime(3) format: +; %d/%b/%Y:%H:%M:%S %z (default) +; %T: time the log has been written (the request has finished) +; it can accept a strftime(3) format: +; %d/%b/%Y:%H:%M:%S %z (default) +; %u: remote user +; +; Default: "%R - %u %t \"%m %r\" %s" +;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" + +; The log file for slow requests +; Default Value: not set +; Note: slowlog is mandatory if request_slowlog_timeout is set +;slowlog = log/$pool.log.slow + +; The timeout for serving a single request after which a PHP backtrace will be +; dumped to the 'slowlog' file. A value of '0s' means 'off'. +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) +; Default Value: 0 +;request_slowlog_timeout = 0 + +; The timeout for serving a single request after which the worker process will +; be killed. This option should be used when the 'max_execution_time' ini option +; does not stop script execution for some reason. A value of '0' means 'off'. +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) +; Default Value: 0 +;request_terminate_timeout = 0 + +; Set open file descriptor rlimit. +; Default Value: system defined value +;rlimit_files = 1024 + +; Set max core size rlimit. +; Possible Values: 'unlimited' or an integer greater or equal to 0 +; Default Value: system defined value +;rlimit_core = 0 + +; Chroot to this directory at the start. This value must be defined as an +; absolute path. When this value is not set, chroot is not used. +; Note: you can prefix with '$prefix' to chroot to the pool prefix or one +; of its subdirectories. If the pool prefix is not set, the global prefix +; will be used instead. +; Note: chrooting is a great security feature and should be used whenever +; possible. However, all PHP paths will be relative to the chroot +; (error_log, sessions.save_path, ...). +; Default Value: not set +;chroot = + +; Chdir to this directory at the start. +; Note: relative path can be used. +; Default Value: current directory or / when chroot +chdir = / + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +;catch_workers_output = yes + +; Limits the extensions of the main script FPM will allow to parse. This can +; prevent configuration mistakes on the web server side. You should only limit +; FPM to .php extensions to prevent malicious users to use other extensions to +; exectute php code. +; Note: set an empty value to allow all extensions. +; Default Value: .php +;security.limit_extensions = .php .php3 .php4 .php5 + +; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from +; the current environment. +; Default Value: clean env +;env[HOSTNAME] = $HOSTNAME +;env[PATH] = /usr/local/bin:/usr/bin:/bin +;env[TMP] = /tmp +;env[TMPDIR] = /tmp +;env[TEMP] = /tmp + +; Additional php.ini defines, specific to this pool of workers. These settings +; overwrite the values previously defined in the php.ini. The directives are the +; same as the PHP SAPI: +; php_value/php_flag - you can set classic ini defines which can +; be overwritten from PHP call 'ini_set'. +; php_admin_value/php_admin_flag - these directives won't be overwritten by +; PHP call 'ini_set' +; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. + +; Defining 'extension' will load the corresponding shared extension from +; extension_dir. Defining 'disable_functions' or 'disable_classes' will not +; overwrite previously defined php.ini values, but will append the new value +; instead. + +; Note: path INI options can be relative and will be expanded with the prefix +; (pool, global or /usr) + +; Default Value: nothing is defined by default except the values in php.ini and +; specified at startup with the -d argument +;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com +;php_flag[display_errors] = off +;php_admin_value[error_log] = /var/log/fpm-php.www.log +;php_admin_flag[log_errors] = on +;php_admin_value[memory_limit] = 32M diff --git a/lang/php7/files/php7-fpm.conf b/lang/php7/files/php7-fpm.conf new file mode 100644 index 00000000..c980b219 --- /dev/null +++ b/lang/php7/files/php7-fpm.conf @@ -0,0 +1,121 @@ +;;;;;;;;;;;;;;;;;;;;; +; FPM Configuration ; +;;;;;;;;;;;;;;;;;;;;; + +; All relative paths in this configuration file are relative to PHP's install +; prefix (/usr). This prefix can be dynamically changed by using the +; '-p' argument from the command line. + +; Include one or more files. If glob(3) exists, it is used to include a bunch of +; files from a glob(3) pattern. This directive can be used everywhere in the +; file. +; Relative path can also be used. They will be prefixed by: +; - the global prefix if it's been set (-p argument) +; - /usr otherwise +;include=/etc/php7/fpm/*.conf + +;;;;;;;;;;;;;;;;;; +; Global Options ; +;;;;;;;;;;;;;;;;;; + +[global] +; Pid file +; Note: the default prefix is /var +; Default Value: none +pid = /var/run/php7-fpm.pid + +; Error log file +; If it's set to "syslog", log is sent to syslogd instead of being written +; in a local file. +; Note: the default prefix is /var +; Default Value: log/php-fpm.log +error_log = /var/log/php7-fpm.log + +; syslog_facility is used to specify what type of program is logging the +; message. This lets syslogd specify that messages from different facilities +; will be handled differently. +; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON) +; Default Value: daemon +;syslog.facility = daemon + +; syslog_ident is prepended to every message. If you have multiple FPM +; instances running on the same server, you can change the default value +; which must suit common needs. +; Default Value: php-fpm +;syslog.ident = php-fpm + +; Log level +; Possible Values: alert, error, warning, notice, debug +; Default Value: notice +;log_level = notice + +; If this number of child processes exit with SIGSEGV or SIGBUS within the time +; interval set by emergency_restart_interval then FPM will restart. A value +; of '0' means 'Off'. +; Default Value: 0 +;emergency_restart_threshold = 0 + +; Interval of time used by emergency_restart_interval to determine when +; a graceful restart will be initiated. This can be useful to work around +; accidental corruptions in an accelerator's shared memory. +; Available Units: s(econds), m(inutes), h(ours), or d(ays) +; Default Unit: seconds +; Default Value: 0 +;emergency_restart_interval = 0 + +; Time limit for child processes to wait for a reaction on signals from master. +; Available units: s(econds), m(inutes), h(ours), or d(ays) +; Default Unit: seconds +; Default Value: 0 +;process_control_timeout = 0 + +; The maximum number of processes FPM will fork. This has been design to control +; the global number of processes when using dynamic PM within a lot of pools. +; Use it with caution. +; Note: A value of 0 indicates no limit +; Default Value: 0 +; process.max = 128 + +; Specify the nice(2) priority to apply to the master process (only if set) +; The value can vary from -19 (highest priority) to 20 (lower priority) +; Note: - It will only work if the FPM master process is launched as root +; - The pool process will inherit the master process priority +; unless it specified otherwise +; Default Value: no set +; process.priority = -19 + +; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. +; Default Value: yes +;daemonize = yes + +; Set open file descriptor rlimit for the master process. +; Default Value: system defined value +;rlimit_files = 1024 + +; Set max core size rlimit for the master process. +; Possible Values: 'unlimited' or an integer greater or equal to 0 +; Default Value: system defined value +;rlimit_core = 0 + +; Specify the event mechanism FPM will use. The following is available: +; - select (any POSIX os) +; - poll (any POSIX os) +; - epoll (linux >= 2.5.44) +; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0) +; - /dev/poll (Solaris >= 7) +; - port (Solaris >= 10) +; Default Value: not set (auto detection) +; events.mechanism = epoll + +;;;;;;;;;;;;;;;;;;;; +; Pool Definitions ; +;;;;;;;;;;;;;;;;;;;; + +; Multiple pools of child processes may be started with different listening +; ports and different management options. The name of the pool will be +; used in logs and stats. There is no limitation on the number of pools which +; FPM can handle. Your system will tell you anyway :) + +; To configure the pools it is recommended to have one .conf file per +; pool in the following directory: +include=/etc/php7-fpm.d/*.conf diff --git a/lang/php7/files/php7-fpm.config b/lang/php7/files/php7-fpm.config new file mode 100644 index 00000000..3a893c6f --- /dev/null +++ b/lang/php7/files/php7-fpm.config @@ -0,0 +1,2 @@ +config php7-fpm + option enabled 1 diff --git a/lang/php7/files/php7-fpm.init b/lang/php7/files/php7-fpm.init new file mode 100644 index 00000000..c913a2b6 --- /dev/null +++ b/lang/php7/files/php7-fpm.init @@ -0,0 +1,28 @@ +#!/bin/sh /etc/rc.common + +START=50 + +PROG=/usr/bin/php-fpm +CONFIG=/etc/php7-fpm.conf + +SERVICE_PID_FILE=/var/run/php7-fpm.pid + +start_instance() { + local section="$1" + local enabled + + config_get_bool enabled "$section" 'enabled' 0 + + [ $enabled -gt 0 ] || return 1 + + service_start $PROG -y $CONFIG -g $SERVICE_PID_FILE +} + +start() { + config_load 'php7-fpm' + config_foreach start_instance 'php7-fpm' +} + +stop() { + service_stop $PROG +} diff --git a/lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch b/lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch new file mode 100644 index 00000000..97fd734a --- /dev/null +++ b/lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch @@ -0,0 +1,653 @@ +# License: MIT +# http://opensource.org/licenses/MIT + +Add support for use of the system timezone database, rather +than embedding a copy. Discussed upstream but was not desired. + +History: +r15: adapt for timelib 2017.05beta7 (in 7.2.0RC1) +r14: improve check for valid tz file +r13: adapt for upstream changes to use PHP allocator +r12: adapt for upstream changes for new zic +r11: use canonical names to avoid more case sensitivity issues + round lat/long from zone.tab towards zero per builtin db +r10: make timezone case insensitive +r9: fix another compile error without --with-system-tzdata configured (Michael Heimpold) +r8: fix compile error without --with-system-tzdata configured +r7: improve check for valid timezone id to exclude directories +r6: fix fd leak in r5, fix country code/BC flag use in + timezone_identifiers_list() using system db, + fix use of PECL timezonedb to override system db, +r5: reverts addition of "System/Localtime" fake tzname. + updated for 5.3.0, parses zone.tab to pick up mapping between + timezone name, country code and long/lat coords +r4: added "System/Localtime" tzname which uses /etc/localtime +r3: fix a crash if /usr/share/zoneinfo doesn't exist (Raphael Geissert) +r2: add filesystem trawl to set up name alias index +r1: initial revision + +diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c +--- ./ext/date/lib/parse_tz.c.systzdata 2017-08-22 09:40:38.000000000 +0200 ++++ ./ext/date/lib/parse_tz.c 2017-08-22 12:16:00.370298079 +0200 +@@ -25,8 +25,21 @@ + #include "timelib.h" + #include "timelib_private.h" + ++#ifdef HAVE_SYSTEM_TZDATA ++#include ++#include ++#include ++#include ++#include ++ ++#include "php_scandir.h" ++ ++#else + #define TIMELIB_SUPPORTS_V2DATA + #include "timezonedb.h" ++#endif ++ ++#include + + #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__)) + # if defined(__LITTLE_ENDIAN__) +@@ -67,6 +80,11 @@ static int read_php_preamble(const unsig + { + uint32_t version; + ++ if (memcmp(*tzf, "TZif", 4) == 0) { ++ *tzf += 20; ++ return 0; ++ } ++ + /* read ID */ + version = (*tzf)[3] - '0'; + *tzf += 4; +@@ -374,7 +392,429 @@ void timelib_dump_tzinfo(timelib_tzinfo + } + } + +-static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb) ++#ifdef HAVE_SYSTEM_TZDATA ++ ++#ifdef HAVE_SYSTEM_TZDATA_PREFIX ++#define ZONEINFO_PREFIX HAVE_SYSTEM_TZDATA_PREFIX ++#else ++#define ZONEINFO_PREFIX "/usr/share/zoneinfo" ++#endif ++ ++/* System timezone database pointer. */ ++static const timelib_tzdb *timezonedb_system; ++ ++/* Hash table entry for the cache of the zone.tab mapping table. */ ++struct location_info { ++ char code[2]; ++ double latitude, longitude; ++ char name[64]; ++ char *comment; ++ struct location_info *next; ++}; ++ ++/* Cache of zone.tab. */ ++static struct location_info **system_location_table; ++ ++/* Size of the zone.tab hash table; a random-ish prime big enough to ++ * prevent too many collisions. */ ++#define LOCINFO_HASH_SIZE (1021) ++ ++/* Compute a case insensitive hash of str */ ++static uint32_t tz_hash(const char *str) ++{ ++ const unsigned char *p = (const unsigned char *)str; ++ uint32_t hash = 5381; ++ int c; ++ ++ while ((c = tolower(*p++)) != '\0') { ++ hash = (hash << 5) ^ hash ^ c; ++ } ++ ++ return hash % LOCINFO_HASH_SIZE; ++} ++ ++/* Parse an ISO-6709 date as used in zone.tab. Returns end of the ++ * parsed string on success, or NULL on parse error. On success, ++ * writes the parsed number to *result. */ ++static char *parse_iso6709(char *p, double *result) ++{ ++ double v, sign; ++ char *pend; ++ size_t len; ++ ++ if (*p == '+') ++ sign = 1.0; ++ else if (*p == '-') ++ sign = -1.0; ++ else ++ return NULL; ++ ++ p++; ++ for (pend = p; *pend >= '0' && *pend <= '9'; pend++) ++ ;; ++ ++ /* Annoying encoding used by zone.tab has no decimal point, so use ++ * the length to determine the format: ++ * ++ * 4 = DDMM ++ * 5 = DDDMM ++ * 6 = DDMMSS ++ * 7 = DDDMMSS ++ */ ++ len = pend - p; ++ if (len < 4 || len > 7) { ++ return NULL; ++ } ++ ++ /* p => [D]DD */ ++ v = (p[0] - '0') * 10.0 + (p[1] - '0'); ++ p += 2; ++ if (len == 5 || len == 7) ++ v = v * 10.0 + (*p++ - '0'); ++ /* p => MM[SS] */ ++ v += (10.0 * (p[0] - '0') ++ + p[1] - '0') / 60.0; ++ p += 2; ++ /* p => [SS] */ ++ if (len > 5) { ++ v += (10.0 * (p[0] - '0') ++ + p[1] - '0') / 3600.0; ++ p += 2; ++ } ++ ++ /* Round to five decimal place, not because it's a good idea, ++ * but, because the builtin data uses rounded data, so, match ++ * that. */ ++ *result = trunc(v * sign * 100000.0) / 100000.0; ++ ++ return p; ++} ++ ++/* This function parses the zone.tab file to build up the mapping of ++ * timezone to country code and geographic location, and returns a ++ * hash table. The hash table is indexed by the function: ++ * ++ * tz_hash(timezone-name) ++ */ ++static struct location_info **create_location_table(void) ++{ ++ struct location_info **li, *i; ++ char zone_tab[PATH_MAX]; ++ char line[512]; ++ FILE *fp; ++ ++ strncpy(zone_tab, ZONEINFO_PREFIX "/zone.tab", sizeof zone_tab); ++ ++ fp = fopen(zone_tab, "r"); ++ if (!fp) { ++ return NULL; ++ } ++ ++ li = calloc(LOCINFO_HASH_SIZE, sizeof *li); ++ ++ while (fgets(line, sizeof line, fp)) { ++ char *p = line, *code, *name, *comment; ++ uint32_t hash; ++ double latitude, longitude; ++ ++ while (isspace(*p)) ++ p++; ++ ++ if (*p == '#' || *p == '\0' || *p == '\n') ++ continue; ++ ++ if (!isalpha(p[0]) || !isalpha(p[1]) || p[2] != '\t') ++ continue; ++ ++ /* code => AA */ ++ code = p; ++ p[2] = 0; ++ p += 3; ++ ++ /* coords => [+-][D]DDMM[SS][+-][D]DDMM[SS] */ ++ p = parse_iso6709(p, &latitude); ++ if (!p) { ++ continue; ++ } ++ p = parse_iso6709(p, &longitude); ++ if (!p) { ++ continue; ++ } ++ ++ if (!p || *p != '\t') { ++ continue; ++ } ++ ++ /* name = string */ ++ name = ++p; ++ while (*p != '\t' && *p && *p != '\n') ++ p++; ++ ++ *p++ = '\0'; ++ ++ /* comment = string */ ++ comment = p; ++ while (*p != '\t' && *p && *p != '\n') ++ p++; ++ ++ if (*p == '\n' || *p == '\t') ++ *p = '\0'; ++ ++ hash = tz_hash(name); ++ i = malloc(sizeof *i); ++ memcpy(i->code, code, 2); ++ strncpy(i->name, name, sizeof i->name); ++ i->comment = strdup(comment); ++ i->longitude = longitude; ++ i->latitude = latitude; ++ i->next = li[hash]; ++ li[hash] = i; ++ /* printf("%s [%u, %f, %f]\n", name, hash, latitude, longitude); */ ++ } ++ ++ fclose(fp); ++ ++ return li; ++} ++ ++/* Return location info from hash table, using given timezone name. ++ * Returns NULL if the name could not be found. */ ++const struct location_info *find_zone_info(struct location_info **li, ++ const char *name) ++{ ++ uint32_t hash = tz_hash(name); ++ const struct location_info *l; ++ ++ if (!li) { ++ return NULL; ++ } ++ ++ for (l = li[hash]; l; l = l->next) { ++ if (strcasecmp(l->name, name) == 0) ++ return l; ++ } ++ ++ return NULL; ++} ++ ++/* Filter out some non-tzdata files and the posix/right databases, if ++ * present. */ ++static int index_filter(const struct dirent *ent) ++{ ++ return strcmp(ent->d_name, ".") != 0 ++ && strcmp(ent->d_name, "..") != 0 ++ && strcmp(ent->d_name, "posix") != 0 ++ && strcmp(ent->d_name, "posixrules") != 0 ++ && strcmp(ent->d_name, "right") != 0 ++ && strstr(ent->d_name, ".list") == NULL ++ && strstr(ent->d_name, ".tab") == NULL; ++} ++ ++static int sysdbcmp(const void *first, const void *second) ++{ ++ const timelib_tzdb_index_entry *alpha = first, *beta = second; ++ ++ return strcasecmp(alpha->id, beta->id); ++} ++ ++ ++/* Create the zone identifier index by trawling the filesystem. */ ++static void create_zone_index(timelib_tzdb *db) ++{ ++ size_t dirstack_size, dirstack_top; ++ size_t index_size, index_next; ++ timelib_tzdb_index_entry *db_index; ++ char **dirstack; ++ ++ /* LIFO stack to hold directory entries to scan; each slot is a ++ * directory name relative to the zoneinfo prefix. */ ++ dirstack_size = 32; ++ dirstack = malloc(dirstack_size * sizeof *dirstack); ++ dirstack_top = 1; ++ dirstack[0] = strdup(""); ++ ++ /* Index array. */ ++ index_size = 64; ++ db_index = malloc(index_size * sizeof *db_index); ++ index_next = 0; ++ ++ do { ++ struct dirent **ents; ++ char name[PATH_MAX], *top; ++ int count; ++ ++ /* Pop the top stack entry, and iterate through its contents. */ ++ top = dirstack[--dirstack_top]; ++ snprintf(name, sizeof name, ZONEINFO_PREFIX "/%s", top); ++ ++ count = php_scandir(name, &ents, index_filter, php_alphasort); ++ ++ while (count > 0) { ++ struct stat st; ++ const char *leaf = ents[count - 1]->d_name; ++ ++ snprintf(name, sizeof name, ZONEINFO_PREFIX "/%s/%s", ++ top, leaf); ++ ++ if (strlen(name) && stat(name, &st) == 0) { ++ /* Name, relative to the zoneinfo prefix. */ ++ const char *root = top; ++ ++ if (root[0] == '/') root++; ++ ++ snprintf(name, sizeof name, "%s%s%s", root, ++ *root ? "/": "", leaf); ++ ++ if (S_ISDIR(st.st_mode)) { ++ if (dirstack_top == dirstack_size) { ++ dirstack_size *= 2; ++ dirstack = realloc(dirstack, ++ dirstack_size * sizeof *dirstack); ++ } ++ dirstack[dirstack_top++] = strdup(name); ++ } ++ else { ++ if (index_next == index_size) { ++ index_size *= 2; ++ db_index = realloc(db_index, ++ index_size * sizeof *db_index); ++ } ++ ++ db_index[index_next++].id = strdup(name); ++ } ++ } ++ ++ free(ents[--count]); ++ } ++ ++ if (count != -1) free(ents); ++ free(top); ++ } while (dirstack_top); ++ ++ qsort(db_index, index_next, sizeof *db_index, sysdbcmp); ++ ++ db->index = db_index; ++ db->index_size = index_next; ++ ++ free(dirstack); ++} ++ ++#define FAKE_HEADER "1234\0??\1??" ++#define FAKE_UTC_POS (7 - 4) ++ ++/* Create a fake data segment for database 'sysdb'. */ ++static void fake_data_segment(timelib_tzdb *sysdb, ++ struct location_info **info) ++{ ++ size_t n; ++ char *data, *p; ++ ++ data = malloc(3 * sysdb->index_size + 7); ++ ++ p = mempcpy(data, FAKE_HEADER, sizeof(FAKE_HEADER) - 1); ++ ++ for (n = 0; n < sysdb->index_size; n++) { ++ const struct location_info *li; ++ timelib_tzdb_index_entry *ent; ++ ++ ent = (timelib_tzdb_index_entry *)&sysdb->index[n]; ++ ++ /* Lookup the timezone name in the hash table. */ ++ if (strcmp(ent->id, "UTC") == 0) { ++ ent->pos = FAKE_UTC_POS; ++ continue; ++ } ++ ++ li = find_zone_info(info, ent->id); ++ if (li) { ++ /* If found, append the BC byte and the ++ * country code; set the position for this ++ * section of timezone data. */ ++ ent->pos = (p - data) - 4; ++ *p++ = '\1'; ++ *p++ = li->code[0]; ++ *p++ = li->code[1]; ++ } ++ else { ++ /* If not found, the timezone data can ++ * point at the header. */ ++ ent->pos = 0; ++ } ++ } ++ ++ sysdb->data = (unsigned char *)data; ++} ++ ++/* Returns true if the passed-in stat structure describes a ++ * probably-valid timezone file. */ ++static int is_valid_tzfile(const struct stat *st, int fd) ++{ ++ if (fd) { ++ char buf[20]; ++ if (read(fd, buf, 20)!=20) { ++ return 0; ++ } ++ lseek(fd, SEEK_SET, 0); ++ if (memcmp(buf, "TZif", 4)) { ++ return 0; ++ } ++ } ++ return S_ISREG(st->st_mode) && st->st_size > 20; ++} ++ ++/* To allow timezone names to be used case-insensitively, find the ++ * canonical name for this timezone, if possible. */ ++static const char *canonical_tzname(const char *timezone) ++{ ++ if (timezonedb_system) { ++ timelib_tzdb_index_entry *ent, lookup; ++ ++ lookup.id = (char *)timezone; ++ ++ ent = bsearch(&lookup, timezonedb_system->index, ++ timezonedb_system->index_size, sizeof lookup, ++ sysdbcmp); ++ if (ent) { ++ return ent->id; ++ } ++ } ++ ++ return timezone; ++} ++ ++/* Return the mmap()ed tzfile if found, else NULL. On success, the ++ * length of the mapped data is placed in *length. */ ++static char *map_tzfile(const char *timezone, size_t *length) ++{ ++ char fname[PATH_MAX]; ++ struct stat st; ++ char *p; ++ int fd; ++ ++ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) { ++ return NULL; ++ } ++ ++ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone)); ++ ++ fd = open(fname, O_RDONLY); ++ if (fd == -1) { ++ return NULL; ++ } else if (fstat(fd, &st) != 0 || !is_valid_tzfile(&st, fd)) { ++ close(fd); ++ return NULL; ++ } ++ ++ *length = st.st_size; ++ p = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0); ++ close(fd); ++ ++ return p != MAP_FAILED ? p : NULL; ++} ++ ++#endif ++ ++static int inmem_seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb) + { + int left = 0, right = tzdb->index_size - 1; + #ifdef HAVE_SETLOCALE +@@ -419,9 +859,48 @@ static int seek_to_tz_position(const uns + return 0; + } + ++static int seek_to_tz_position(const unsigned char **tzf, char *timezone, ++ char **map, size_t *maplen, ++ const timelib_tzdb *tzdb) ++{ ++#ifdef HAVE_SYSTEM_TZDATA ++ if (tzdb == timezonedb_system) { ++ char *orig; ++ ++ orig = map_tzfile(timezone, maplen); ++ if (orig == NULL) { ++ return 0; ++ } ++ ++ (*tzf) = (unsigned char *)orig; ++ *map = orig; ++ return 1; ++ } ++ else ++#endif ++ { ++ return inmem_seek_to_tz_position(tzf, timezone, tzdb); ++ } ++} ++ + const timelib_tzdb *timelib_builtin_db(void) + { ++#ifdef HAVE_SYSTEM_TZDATA ++ if (timezonedb_system == NULL) { ++ timelib_tzdb *tmp = malloc(sizeof *tmp); ++ ++ tmp->version = "0.system"; ++ tmp->data = NULL; ++ create_zone_index(tmp); ++ system_location_table = create_location_table(); ++ fake_data_segment(tmp, system_location_table); ++ timezonedb_system = tmp; ++ } ++ ++ return timezonedb_system; ++#else + return &timezonedb_builtin; ++#endif + } + + const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(timelib_tzdb *tzdb, int *count) +@@ -433,7 +912,30 @@ const timelib_tzdb_index_entry *timelib_ + int timelib_timezone_id_is_valid(char *timezone, const timelib_tzdb *tzdb) + { + const unsigned char *tzf; +- return (seek_to_tz_position(&tzf, timezone, tzdb)); ++ ++#ifdef HAVE_SYSTEM_TZDATA ++ if (tzdb == timezonedb_system) { ++ char fname[PATH_MAX]; ++ struct stat st; ++ ++ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) { ++ return 0; ++ } ++ ++ if (system_location_table) { ++ if (find_zone_info(system_location_table, timezone) != NULL) { ++ /* found in cache */ ++ return 1; ++ } ++ } ++ ++ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone)); ++ ++ return stat(fname, &st) == 0 && is_valid_tzfile(&st, 0); ++ } ++#endif ++ ++ return (inmem_seek_to_tz_position(&tzf, timezone, tzdb)); + } + + static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz) +@@ -475,12 +977,14 @@ static timelib_tzinfo* timelib_tzinfo_ct + timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, int *error_code) + { + const unsigned char *tzf; ++ char *memmap = NULL; ++ size_t maplen; + timelib_tzinfo *tmp; + int version; + int transitions_result, types_result; + unsigned int type; /* TIMELIB_TZINFO_PHP or TIMELIB_TZINFO_ZONEINFO */ + +- if (seek_to_tz_position(&tzf, timezone, tzdb)) { ++ if (seek_to_tz_position(&tzf, timezone, &memmap, &maplen, tzdb)) { + tmp = timelib_tzinfo_ctor(timezone); + + version = read_preamble(&tzf, tmp, &type); +@@ -503,6 +1007,29 @@ timelib_tzinfo *timelib_parse_tzfile(cha + timelib_tzinfo_dtor(tmp); + return NULL; + } ++ ++#ifdef HAVE_SYSTEM_TZDATA ++ if (memmap) { ++ const struct location_info *li; ++ ++ /* TZif-style - grok the location info from the system database, ++ * if possible. */ ++ ++ if ((li = find_zone_info(system_location_table, timezone)) != NULL) { ++ tmp->location.comments = timelib_strdup(li->comment); ++ strncpy(tmp->location.country_code, li->code, 2); ++ tmp->location.longitude = li->longitude; ++ tmp->location.latitude = li->latitude; ++ tmp->bc = 1; ++ } ++ else { ++ set_default_location_and_comments(&tzf, tmp); ++ } ++ ++ /* Now done with the mmap segment - discard it. */ ++ munmap(memmap, maplen); ++ } else { ++#endif + if (version == 2 || version == 3) { + if (!skip_64bit_preamble(&tzf, tmp)) { + /* 64 bit preamble is not in place */ +@@ -520,6 +1047,9 @@ timelib_tzinfo *timelib_parse_tzfile(cha + } else { + set_default_location_and_comments(&tzf, tmp); + } ++#ifdef HAVE_SYSTEM_TZDATA ++ } ++#endif + } else { + *error_code = TIMELIB_ERROR_NO_SUCH_TIMEZONE; + tmp = NULL; +diff -up ./ext/date/lib/timelib.m4.systzdata ./ext/date/lib/timelib.m4 +--- ./ext/date/lib/timelib.m4.systzdata 2017-08-22 09:40:38.000000000 +0200 ++++ ./ext/date/lib/timelib.m4 2017-08-22 11:32:29.357799927 +0200 +@@ -81,3 +81,16 @@ io.h + + dnl Check for strtoll, atoll + AC_CHECK_FUNCS(strtoll atoll strftime gettimeofday) ++ ++PHP_ARG_WITH(system-tzdata, for use of system timezone data, ++[ --with-system-tzdata[=DIR] to specify use of system timezone data], ++no, no) ++ ++if test "$PHP_SYSTEM_TZDATA" != "no"; then ++ AC_DEFINE(HAVE_SYSTEM_TZDATA, 1, [Define if system timezone data is used]) ++ ++ if test "$PHP_SYSTEM_TZDATA" != "yes"; then ++ AC_DEFINE_UNQUOTED(HAVE_SYSTEM_TZDATA_PREFIX, "$PHP_SYSTEM_TZDATA", ++ [Define for location of system timezone data]) ++ fi ++fi diff --git a/lang/php7/patches/0016-dont-gitclean-in-build.patch b/lang/php7/patches/0016-dont-gitclean-in-build.patch new file mode 100644 index 00000000..32de5579 --- /dev/null +++ b/lang/php7/patches/0016-dont-gitclean-in-build.patch @@ -0,0 +1,19 @@ +From: Debian PHP Maintainers +Date: Sat, 2 May 2015 10:26:53 +0200 +Subject: dont-gitclean-in-build + +--- + build/build.mk | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/build/build.mk b/build/build.mk +index 9452984..b964def 100644 +--- a/build/build.mk ++++ b/build/build.mk +@@ -63,6 +63,5 @@ gitclean-work: + @if (test ! -f '.git/info/exclude' || grep -s "git-ls-files" .git/info/exclude); then \ + (echo "Rebuild .git/info/exclude" && echo '*.o' > .git/info/exclude && git svn propget svn:ignore | grep -v config.nice >> .git/info/exclude); \ + fi; \ +- git clean -X -f -d; + + .PHONY: $(ALWAYS) snapshot diff --git a/lang/php7/patches/0032-Use-system-timezone.patch b/lang/php7/patches/0032-Use-system-timezone.patch new file mode 100644 index 00000000..efa1fc7e --- /dev/null +++ b/lang/php7/patches/0032-Use-system-timezone.patch @@ -0,0 +1,43 @@ +From: Debian PHP Maintainers +Date: Sat, 2 May 2015 10:26:56 +0200 +Subject: Use system timezone + +Upstream don't want this patch. See +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=730771 for a summary. + +This delta is recovered from previous versions of the system timezone patch in +Debian, and appears to have inadvertently been dropped. Author unknown. + +To be used in tandem with use_embedded_timezonedb.patch and use_embedded_timezonedb_fixes.patch. +--- + ext/date/php_date.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/ext/date/php_date.c b/ext/date/php_date.c +index cbe6e91..1999c83 100644 +--- a/ext/date/php_date.c ++++ b/ext/date/php_date.c +@@ -1003,6 +1003,23 @@ static char* guess_timezone(const timelib_tzdb *tzdb) + DATEG(timezone_valid) = 1; + return DATEG(default_timezone); + } ++ /* Try to guess timezone from system information */ ++ { ++ struct tm *ta, tmbuf; ++ time_t the_time; ++ char *tzid = NULL; ++ ++ the_time = time(NULL); ++ ta = php_localtime_r(&the_time, &tmbuf); ++ if (ta) { ++ tzid = timelib_timezone_id_from_abbr(ta->tm_zone, ta->tm_gmtoff, ta->tm_isdst); ++ } ++ if (! tzid) { ++ tzid = "UTC"; ++ } ++ ++ return tzid; ++ } + /* Fallback to UTC */ + return "UTC"; + } diff --git a/lang/php7/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch b/lang/php7/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch new file mode 100644 index 00000000..e05c102b --- /dev/null +++ b/lang/php7/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch @@ -0,0 +1,102 @@ +From: Thijs Kinkhorst +Date: Wed, 15 Jun 2016 09:18:03 +0200 +Subject: Add patch to remove build timestamps from generated binaries. + +--- + ext/standard/info.c | 1 - + sapi/apache2handler/config.m4 | 15 +++------------ + sapi/cgi/cgi_main.c | 4 ++-- + sapi/cli/php_cli.c | 4 ++-- + sapi/fpm/fpm/fpm_main.c | 4 ++-- + sapi/phpdbg/phpdbg.c | 4 +--- + 6 files changed, 10 insertions(+), 22 deletions(-) + +--- a/ext/standard/info.c ++++ b/ext/standard/info.c +@@ -830,7 +830,6 @@ PHPAPI void php_print_info(int flag) + php_info_print_box_end(); + php_info_print_table_start(); + php_info_print_table_row(2, "System", ZSTR_VAL(php_uname)); +- php_info_print_table_row(2, "Build Date", __DATE__ " " __TIME__); + #ifdef COMPILER + php_info_print_table_row(2, "Compiler", COMPILER); + #endif +--- a/sapi/apache2handler/config.m4 ++++ b/sapi/apache2handler/config.m4 +@@ -67,18 +67,9 @@ if test "$PHP_APXS2" != "no"; then + fi + + APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR` +- if test -z `$APXS -q SYSCONFDIR`; then +- INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ +- $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ +- -i -n php7" +- else +- APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR` +- INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ +- \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \ +- $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ +- -S SYSCONFDIR='$APXS_SYSCONFDIR' \ +- -i -a -n php7" +- fi ++ INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ ++ $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ ++ -i -n php7" + + case $host_alias in + *aix*) +--- a/sapi/cgi/cgi_main.c ++++ b/sapi/cgi/cgi_main.c +@@ -2427,9 +2427,9 @@ consult the installation file that came + SG(request_info).no_headers = 1; + } + #if ZEND_DEBUG +- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); + #else +- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); + #endif + php_request_shutdown((void *) 0); + fcgi_shutdown(); +--- a/sapi/cli/php_cli.c ++++ b/sapi/cli/php_cli.c +@@ -697,8 +697,8 @@ static int do_cli(int argc, char **argv) + goto out; + + case 'v': /* show php version & quit */ +- php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) 1997-2018 The PHP Group\n%s", +- PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__, ++ php_printf("PHP %s (%s) ( %s)\nCopyright (c) 1997-2018 The PHP Group\n%s", ++ PHP_VERSION, cli_sapi_module.name, + #if ZTS + "ZTS " + #else +--- a/sapi/fpm/fpm/fpm_main.c ++++ b/sapi/fpm/fpm/fpm_main.c +@@ -1755,9 +1755,9 @@ int main(int argc, char *argv[]) + SG(request_info).no_headers = 1; + + #if ZEND_DEBUG +- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); + #else +- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); + #endif + php_request_shutdown((void *) 0); + fcgi_shutdown(); +--- a/sapi/phpdbg/phpdbg.c ++++ b/sapi/phpdbg/phpdbg.c +@@ -1697,10 +1697,8 @@ phpdbg_main: + phpdbg_do_help_cmd(exec); + } else if (show_version) { + phpdbg_out( +- "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2018 The PHP Group\n%s", ++ "phpdbg %s\nPHP %s, Copyright (c) 1997-2018 The PHP Group\n%s", + PHPDBG_VERSION, +- __DATE__, +- __TIME__, + PHP_VERSION, + get_zend_version() + ); diff --git a/lang/php7/patches/0042-Remove-W3C-validation-icon-to-not-expose-the-reader-.patch b/lang/php7/patches/0042-Remove-W3C-validation-icon-to-not-expose-the-reader-.patch new file mode 100644 index 00000000..78f7dca4 --- /dev/null +++ b/lang/php7/patches/0042-Remove-W3C-validation-icon-to-not-expose-the-reader-.patch @@ -0,0 +1,25 @@ +From: =?utf-8?q?Ond=C5=99ej_Sur=C3=BD?= +Date: Wed, 29 Jul 2015 14:37:55 +0200 +Subject: Remove W3C validation icon to not expose the reader's IP address to + potential tracking. + +--- + sapi/fpm/status.html.in | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/sapi/fpm/status.html.in b/sapi/fpm/status.html.in +index 86492d7..31c31ff 100644 +--- a/sapi/fpm/status.html.in ++++ b/sapi/fpm/status.html.in +@@ -71,11 +71,6 @@ + PID↓Start TimeStart SinceRequests ServedRequest DurationRequest methodRequest URIContent LengthUserScriptLast Request %CPULast Request Memory + + +-

+- +- Valid XHTML 1.0 Transitional +- +-

+