From 9f5db9a6dbd1ba422035df300f5b8e925232325a Mon Sep 17 00:00:00 2001 From: RISCi_ATOM Date: Sat, 31 Mar 2018 12:47:15 -0400 Subject: [PATCH] Commit based upon d6442850bde61f0c3e7e2ae3247b4a856073c5e0 --- lang/chardet/Makefile | 53 + lang/django-appconf/Makefile | 48 + lang/django-compressor/Makefile | 49 + lang/django-constance/Makefile | 48 + lang/django-jsonfield/Makefile | 48 + lang/django-picklefield/Makefile | 48 + lang/django-postoffice/Makefile | 49 + lang/django-restframework/Makefile | 49 + lang/django-statici18n/Makefile | 48 + lang/django/Makefile | 65 + lang/dkjson/Makefile | 49 + 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/et_xmlfile/Makefile | 48 + lang/flup/Makefile | 48 + lang/gunicorn/Makefile | 53 + lang/jamvm/Makefile | 67 + lang/jdcal/Makefile | 48 + lang/json4lua/Makefile | 52 + lang/lpeg/Makefile | 48 + lang/lua-bencode/Makefile | 49 + lang/lua-cjson/Makefile | 56 + lang/lua-copas/Makefile | 62 + lang/lua-copas/patches/makefile.patch | 15 + lang/lua-coxpcall/Makefile | 59 + lang/lua-coxpcall/patches/config.patch | 4 + lang/lua-lsqlite3/Makefile | 58 + lang/lua-lzlib/Makefile | 48 + .../patches/001-allow_optim_flags.patch | 12 + lang/lua-md5/Makefile | 75 + lang/lua-md5/patches/config.patch | 19 + lang/lua-md5/patches/makefile.patch | 10 + lang/lua-mobdebug/Makefile | 56 + lang/lua-openssl/Makefile | 42 + .../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 | 46 + lang/lua-rings/Makefile | 54 + lang/lua-rings/patches/config.patch | 28 + lang/lua-rings/patches/makefile.patch | 11 + lang/lua-rs232/Makefile | 62 + lang/lua-sha2/Makefile | 52 + lang/lua-sha2/patches/001-makefile.patch | 14 + lang/lua-wsapi/Makefile | 95 + lang/lua-xavante/Makefile | 58 + 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 | 66 + lang/luai2c/Makefile | 45 + lang/lualanes/Makefile | 57 + lang/lualanes/patches/100-musl-compat.patch | 13 + lang/luaposix/Makefile | 61 + lang/luaposix/patches/100-eglibc-compat.patch | 30 + .../luaposix/patches/101-disable-curses.patch | 32 + .../102-disable-compat-deprecated.diff | 20 + lang/luarocks/Makefile | 62 + .../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 | 63 + .../patches/0001-Add-interface-support.patch | 237 + lang/luasql/Makefile | 118 + lang/lzmq/Makefile | 48 + lang/micropython-lib/Makefile | 55 + lang/micropython/Makefile | 57 + .../patches/000-Makefile-no-errors | 13 + lang/node-arduino-firmata/Makefile | 68 + .../arduino-firmata/lib/arduino-firmata.js | 306 + .../patches/000-new-serialport.patch | 10 + lang/node-cylon/Makefile | 99 + lang/node-cylon/patches/0001-serialport.patch | 12 + lang/node-hid/Makefile | 65 + lang/node-serialport/Makefile | 65 + lang/node/Makefile | 94 + lang/node/patches/001-hardfloat.patch | 12 + lang/node/patches/002-addr_info.patch | 10 + lang/node/patches/003-path.patch | 12 + lang/openpyxl/Makefile | 48 + 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 | 49 + 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-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 | 185 + lang/perl/README.patches | 9 + lang/perl/files/README.config | 59 + lang/perl/files/architecture.config | 121 + lang/perl/files/arm.config | 19 + lang/perl/files/armeb.config | 19 + lang/perl/files/base.config | 1005 + lang/perl/files/i486.config | 28 + lang/perl/files/libc.config | 47 + lang/perl/files/mips.config | 19 + lang/perl/files/mips64.config | 19 + lang/perl/files/mipsel.config | 19 + 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 | 19 + lang/perl/files/signal.config | 18 + lang/perl/files/threads.config | 197 + lang/perl/files/version.config | 38 + lang/perl/files/x86_64.config | 28 + lang/perl/patches/010-musl-compat.patch | 11 + ...st-libc-dir-moved-debian+derivatives.patch | 27 + ...x-cross-compile-endianness-detection.patch | 22 + .../patches/110-always_use_miniperl.patch | 27 + lang/perl/patches/300-add-relink-hack.patch | 6 + lang/perl/patches/310-recompile-hack.patch | 16 + ...e_fetch_count_t-handle_missing_crypt.patch | 26 + .../710-threads_join-skip_ps_on_busybox.patch | 81 + lang/perl/patches/900-CVE-2015-8607.patch | 57 + lang/perl/patches/901-CVE-2016-2381.patch | 102 + lang/perl/perlbase.mk | 1559 + lang/perl/perlmod.mk | 166 + lang/php7-pecl-dio/Makefile | 34 + lang/php7-pecl-http/Makefile | 57 + .../patches.old/100_config9-m4.patch | 22 + .../100_php_http_etag_bigendian_check.patch | 11 + lang/php7-pecl-libevent/Makefile | 38 + .../patches/010-libevent2.patch | 16 + lang/php7-pecl-propro/Makefile | 43 + lang/php7-pecl-raphf/Makefile | 43 + lang/php7/Makefile | 594 + 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 | 684 + .../patches/0016-dont-gitclean-in-build.patch | 19 + .../patches/0032-Use-system-timezone.patch | 43 + ...ove-build-timestamps-from-generated-.patch | 114 + ...ation-icon-to-not-expose-the-reader-.patch | 25 + ...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 + ...onstraints-in-aarch64-multiply-macro.patch | 29 + lang/php7/pecl.mk | 47 + lang/pillow/Makefile | 53 + lang/pillow/patches/010-fix-paths.patch | 182 + lang/python-attrs/Makefile | 47 + lang/python-cffi/Makefile | 57 + lang/python-crcmod/Makefile | 50 + lang/python-crypto/Makefile | 54 + .../patches/001-no-host-paths.patch | 11 + .../patches/002-fix-endianness-detect.patch | 13 + lang/python-cryptography/Makefile | 53 + lang/python-dateutil/Makefile | 48 + lang/python-dns/Makefile | 46 + lang/python-egenix-mx-base/Makefile | 55 + lang/python-enum34/Makefile | 51 + .../python-enum34/patches/001-omit-docs.patch | 19 + lang/python-gmpy2/Makefile | 49 + lang/python-idna/Makefile | 48 + lang/python-ipaddress/Makefile | 44 + lang/python-ldap/Makefile | 59 + lang/python-ldap/patches/010-setup_cfg.patch | 16 + lang/python-mysql/Makefile | 50 + .../python-mysql/patches/010-threadsafe.patch | 11 + lang/python-packages/Makefile | 131 + lang/python-packages/README.md | 72 + lang/python-parsley/Makefile | 43 + .../patches/001-omit-tests.patch | 12 + lang/python-pcapy/Makefile | 47 + lang/python-pip/Makefile | 76 + lang/python-pip/files/pip.conf | 3 + lang/python-ply/Makefile | 58 + lang/python-psycopg2/Makefile | 55 + lang/python-pyasn1-modules/Makefile | 46 + lang/python-pyasn1/Makefile | 48 + lang/python-pycparser/Makefile | 59 + .../patches/001-use-external-ply.patch | 41 + lang/python-pyopenssl/Makefile | 45 + lang/python-pyptlib/Makefile | 46 + lang/python-pyserial/Makefile | 50 + lang/python-service-identity/Makefile | 46 + lang/python-setuptools/Makefile | 78 + .../patches/0001-remove-windows-support.patch | 20 + .../0002-fix-pyvenv-environment-get.patch | 13 + lang/python-six/Makefile | 48 + lang/python-txsocksx/Makefile | 49 + .../patches/001-omit-tests.patch | 11 + .../patches/002-do-not-use-vcversioner.patch | 29 + lang/python-urllib3/Makefile | 49 + lang/python-yaml/Makefile | 43 + lang/python/files/config.site | 12 + lang/python/files/python-host.mk | 81 + lang/python/files/python-package-codecs.mk | 23 + lang/python/files/python-package-compiler.mk | 16 + lang/python/files/python-package-ctypes.mk | 18 + lang/python/files/python-package-db.mk | 18 + lang/python/files/python-package-decimal.mk | 16 + lang/python/files/python-package-dev.mk | 27 + lang/python/files/python-package-distutils.mk | 16 + lang/python/files/python-package-email.mk | 16 + lang/python/files/python-package-gdbm.mk | 16 + lang/python/files/python-package-lib2to3.mk | 18 + lang/python/files/python-package-logging.mk | 16 + .../files/python-package-multiprocessing.mk | 17 + lang/python/files/python-package-ncurses.mk | 18 + lang/python/files/python-package-openssl.mk | 17 + lang/python/files/python-package-pydoc.mk | 18 + lang/python/files/python-package-sqlite3.mk | 17 + lang/python/files/python-package-unittest.mk | 16 + lang/python/files/python-package-xml.mk | 20 + lang/python/files/python-package.mk | 138 + .../007-distutils-do-not-adjust-path.patch | 10 + lang/python3-bottle/Makefile | 51 + lang/python3-pip/Makefile | 61 + .../0001-remove-self-version-checking.patch | 70 + lang/python3-setuptools/Makefile | 61 + .../patches/0001-remove-windows-support.patch | 20 + .../0002-fix-pyvenv-environment-get.patch | 13 + lang/python3/Makefile | 272 + lang/python3/files/config.site | 12 + lang/python3/files/python3-host.mk | 90 + lang/python3/files/python3-package-asyncio.mk | 16 + lang/python3/files/python3-package-codecs.mk | 22 + lang/python3/files/python3-package-ctypes.mk | 18 + lang/python3/files/python3-package-dbm.mk | 17 + lang/python3/files/python3-package-decimal.mk | 17 + lang/python3/files/python3-package-dev.mk | 27 + .../files/python3-package-distutils.mk | 16 + lang/python3/files/python3-package-email.mk | 16 + lang/python3/files/python3-package-gdbm.mk | 16 + lang/python3/files/python3-package-lib2to3.mk | 18 + lang/python3/files/python3-package-logging.mk | 16 + lang/python3/files/python3-package-lzma.mk | 17 + .../files/python3-package-multiprocessing.mk | 17 + lang/python3/files/python3-package-ncurses.mk | 18 + lang/python3/files/python3-package-openssl.mk | 17 + lang/python3/files/python3-package-pydoc.mk | 18 + lang/python3/files/python3-package-sqlite3.mk | 17 + .../python3/files/python3-package-unittest.mk | 16 + lang/python3/files/python3-package-xml.mk | 19 + lang/python3/files/python3-package.mk | 138 + lang/python3/files/python3-version.mk | 13 + lang/python3/patches/001-enable-zlib.patch | 25 + ...dd-include-dirs-when-cross-compiling.patch | 14 + .../003-do-not-run-distutils-tests.patch | 46 + .../004-do-not-write-bytes-codes.patch | 22 + .../005-fix-libffi-x86-64-configure.patch | 31 + .../006-remove-debian-multiarch-support.patch | 12 + .../007-distutils-do-not-adjust-path.patch | 10 + ...add-rt-lib-dirs-when-cross-compiling.patch | 15 + .../patches/011-do-not-prefer-ncursesw.patch | 15 + ...11-fix-ncursesw-definition-colisions.patch | 24 + .../012-disable-wcsftime-detection.patch | 13 + .../014-remove-platform-so-suffix.patch | 26 + .../patches/015-abort-on-failed-modules.patch | 12 + .../patches/016-adjust-config-paths.patch | 72 + lang/pytz/Makefile | 48 + lang/rcssmin/Makefile | 57 + lang/ruby/files/ruby | 5 + lang/ruby/ruby_find_pkgsdeps | 266 + lang/ruby/ruby_missingfiles | 28 + lang/simplejson/Makefile | 48 + lang/tcl/Makefile | 73 + .../100-disable_tzdata_and_msgs_install.patch | 22 + lang/tcl/patches/200-fix_mips_build.patch | 20 + lang/twisted/Makefile | 58 + .../patches/001-fix-zsh-completion.patch | 10 + lang/twisted/patches/002-omit-tests.patch | 41 + lang/uuid/Makefile | 51 + lang/vala/Makefile | 93 + lang/zope-interface/Makefile | 56 + libs/alsa-lib/patches/001-link_fix.patch | 22 + ...5-fix_include_file_redirect_warnings.patch | 142 + 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 | 406 + 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 | 461 + libs/boost/patches/01_fiber_fix.patch | 26 + libs/c-ares/Makefile | 54 + libs/check/Makefile | 61 + libs/classpath/Makefile | 90 + .../patches/010-double-memleak.patch | 91 + libs/confuse/Makefile | 79 + 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 + libs/dtc/Makefile | 74 + libs/dtndht/Makefile | 46 + libs/dtndht/patches/001-musl_header.patch | 30 + libs/elektra/Makefile | 409 + libs/eventlog/Makefile | 44 + libs/faad2/Config.in | 12 + libs/faad2/Makefile | 114 + 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 | 119 + libs/fftw3/patches/001-makefile.patch | 20 + libs/file/Makefile | 97 + 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 | 17 + libs/flac/patches/010-automake-compat.patch | 11 + .../020-fix-musl-sigemptyset-x86.patch | 11 + libs/freetype/Makefile | 84 + libs/gdbm/Makefile | 69 + libs/giflib/Makefile | 60 + libs/giflib/patches/100-no-docs.patch | 10 + libs/glpk/Makefile | 66 + libs/gperf/Makefile | 47 + libs/hidapi/Makefile | 77 + .../patches/010-add-iconv-linkage.patch | 22 + libs/hiredis/Makefile | 55 + libs/ibrcommon/Makefile | 49 + .../patches/001-fix-build-with-musl.patch | 23 + libs/ibrdtn/Makefile | 50 + .../000-dont-cpy-files-from-topdirs.patch | 12 + libs/icu/patches/001-disable-strtod_l.patch | 26 + .../patches/CVE-2017-7867_CVE-2017-7868.patch | 176 + 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 + libs/libavl/Makefile | 55 + .../patches/010-update_GNUmakefile.patch | 45 + libs/libcanfestival/Makefile | 71 + .../patches/001-sigval-ref-fix.patch | 11 + .../patches/002-makefile-gcc-linker.patch | 33 + .../patches/003-makefile-skip-examples.patch | 20 + libs/libcap/Makefile | 56 + libs/libcap/patches/100-portability.patch | 19 + libs/libcoap/Makefile | 64 + 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 + libs/libdbi/Makefile | 57 + 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 | 54 + libs/libesmtp/Makefile | 55 + libs/libestr/Makefile | 53 + libs/libev/Makefile | 59 + libs/libevdev/Makefile | 57 + ...010-no-clock-monotonic-raw-in-uclibc.patch | 14 + libs/libevent/Makefile | 67 + libs/libexif/Makefile | 64 + libs/libexif/patches/100-no_doc.patch | 12 + libs/libextractor/Makefile | 139 + .../001-backport-support-for-giflib-5-1.patch | 26 + .../patches/002-ffmpeg2.9_api_backport.patch | 347 + libs/libfastjson/Makefile | 55 + 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/libgee/Makefile | 73 + .../libgee-0.18.0-no-introspection.patch | 101 + libs/libhttp-parser/Makefile | 60 + libs/libical/Makefile | 62 + libs/libid3tag/Makefile | 65 + libs/libidn/Makefile | 97 + .../002-disable-po-docs-examples.patch | 22 + .../patches/010-fix-idn-error-usage.patch | 119 + libs/libimobiledevice/Makefile | 96 + libs/libinput/Makefile | 63 + libs/libinput/patches/001-no-locale.patch | 22 + libs/libinput/patches/002-static_assert.patch | 14 + libs/liblo/Makefile | 70 + libs/liblo/patches/001-fix-musl-include.patch | 11 + libs/liblz4/Makefile | 58 + libs/libmad/Makefile | 79 + .../001-mips_removal_h_constraint.patch | 70 + libs/libmcrypt/Makefile | 65 + libs/libmicrohttpd/Makefile | 94 + libs/libmms/Makefile | 63 + libs/libmodbus/Makefile | 56 + libs/libmpdclient/Makefile | 69 + libs/libmpeg2/Makefile | 60 + .../libmpeg2/patches/101-ppc_no_altivec.patch | 66 + .../patches/102-arm_data_preload_check.patch | 19 + libs/libnatpmp/Makefile | 87 + .../patches/001-install_declspec.patch | 11 + libs/libnet-1.2.x/Makefile | 71 + .../patches/100-musl-compat.patch | 16 + libs/libnopoll/Makefile | 58 + libs/libogg/Makefile | 59 + libs/liboil/Makefile | 70 + libs/liboping/Makefile | 84 + libs/liboping/patches/01-no-werror.patch | 11 + libs/libowfat/Makefile | 61 + libs/libowfat/patches/001-fixbuild.patch | 11 + libs/libp11/Makefile | 61 + libs/libp11/patches/001-fix-install.patch | 69 + libs/libplist/Makefile | 105 + libs/libsamplerate/Makefile | 55 + libs/libsearpc/Makefile | 64 + libs/libseccomp/Makefile | 74 + ...100-dont-use-linux-prctl.h-with-musl.patch | 14 + libs/libshout/Makefile | 119 + .../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/libsoxr/Makefile | 65 + libs/libstrophe/Config.in | 14 + libs/libstrophe/Makefile | 69 + libs/libtalloc/Makefile | 112 + libs/libtheora/Makefile | 68 + .../libtheora/patches/001-no_docs_tests.patch | 33 + libs/libtheora/patches/002-no_sdl_check.patch | 14 + libs/libtorrent/Makefile | 69 + .../patches/100-fix_cross_compile.patch | 41 + libs/libuecc/Makefile | 52 + libs/libugpio/Makefile | 72 + libs/libunistring/Makefile | 59 + libs/libupnp/Makefile | 76 + libs/libupnpp/Makefile | 51 + libs/liburcu/Makefile | 53 + libs/libusbmuxd/Makefile | 90 + libs/libuv/Makefile | 76 + libs/libuvc/Makefile | 53 + libs/libv4l/Makefile | 116 + .../patches/020-add-missing-includes.patch | 28 + .../patches/030-dont-call-getsubopt.patch | 28 + libs/libvorbis/Makefile | 65 + libs/libvorbisidec/Makefile | 62 + libs/libvpx/Makefile | 84 + libs/libx264/Makefile | 83 + libs/libxerces-c/Makefile | 91 + libs/libzdb/Makefile | 89 + .../patches/010-cross-compile-fixes.patch | 186 + .../020-filterh-use-host-built-version.patch | 20 + 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/mxml/Makefile | 56 + libs/mxml/patches/001-targets.patch | 11 + libs/nacl/Makefile | 49 + libs/nacl/do-openwrt | 206 + libs/neon/Makefile | 78 + libs/opus/Makefile | 69 + libs/poco/Makefile | 65 + libs/poco/patches/100-configure.patch | 15 + libs/poco/patches/200-strerror.patch | 11 + libs/postgresql/files/postgresql.config | 2 + libs/postgresql/files/postgresql.init | 78 + libs/postgresql/files/postgresql.sh | 60 + .../patches/001-configure_fixes.patch | 11 + libs/postgresql/patches/200-ranlib.patch | 10 + .../patches/800-busybox-default-pager.patch | 13 + .../patches/900-pg_ctl-setuid.patch | 109 + libs/protobuf-c/Makefile | 62 + libs/protobuf/Makefile | 78 + .../protobuf/patches/001-mipseb-compile.patch | 11 + .../patches/003-mips2andHigher-compile.patch | 11 + libs/pthsem/Makefile | 68 + libs/pthsem/patches/001-linux3x-fix.patch | 12 + libs/pthsem/patches/002-fix-signal.h | 22 + libs/qrencode/Makefile | 90 + libs/qrencode/patches/001-disable-png.patch | 306 + libs/quasselc/Makefile | 64 + .../patches/001-respect-cflags-ldflags.patch | 18 + libs/rxtx/Makefile | 49 + libs/rxtx/patches/010-acm-devices.patch | 11 + libs/sbc/Makefile | 57 + libs/speex/Makefile | 105 + 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 | 56 + libs/tdb/patches/001-printf-fix.patch | 41 + libs/tinycdb/Makefile | 39 + libs/tinycdb/patches/100-Makefile.patch | 25 + libs/unixodbc/Makefile | 117 + libs/unixodbc/files/unixodbc_conf.h | 22 + libs/vips/Makefile | 82 + libs/vips/patches/001-no_cpp.patch | 154 + libs/xmlrpc-c/Makefile | 226 + 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 | 59 + .../100-link-reformatter-uclibc-libm.patch | 11 + .../patches/101-link-perf-uclibc-libm.patch | 8 + libs/yaml/Makefile | 51 + libs/zmq/Makefile | 93 + ...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/bogofilter/Makefile | 58 + mail/bogofilter/files/postfix-bogofilter | 43 + multimedia/crtmpserver/Makefile | 98 + 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/fswebcam/Makefile | 50 + multimedia/gst1-libav/Config.in | 279 + multimedia/gst1-libav/Makefile | 198 + multimedia/gst1-plugins-base/Makefile | 291 + .../patches/001-no-translations.patch | 28 + .../patches/002-no-tests.patch | 44 + .../patches/003-no-docs.patch | 30 + multimedia/gstreamer1/Makefile | 237 + .../patches/001-no-translations.patch | 28 + .../gstreamer1/patches/002-no-tests.patch | 44 + .../gstreamer1/patches/003-no-docs.patch | 39 + ...10-gstplugin-use-lazy-symbol-binding.patch | 20 + multimedia/icecast/Makefile | 80 + 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/mjpg-streamer/Config.in | 36 + multimedia/mjpg-streamer/Makefile | 112 + .../mjpg-streamer/files/mjpg-streamer.config | 15 + .../mjpg-streamer/files/mjpg-streamer.hotplug | 10 + .../mjpg-streamer/files/mjpg-streamer.init | 97 + .../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 + ...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 | 58 + .../motion/patches/100-musl-compat.patch | 49 + multimedia/oggfwd/Makefile | 50 + multimedia/tvheadend/Config.in | 17 + multimedia/tvheadend/Makefile | 98 + multimedia/tvheadend/files/tvheadend.config | 13 + multimedia/tvheadend/files/tvheadend.init | 71 + multimedia/xupnpd/Makefile | 75 + 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 | 45 + net/apache/Makefile | 173 + 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 + net/bmon/Makefile | 52 + net/daemonlogger/Makefile | 47 + net/davfs2/Makefile | 71 + 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/iotivity/Makefile | 311 + 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/lighttpd/Makefile | 188 - net/lighttpd/files/lighttpd.conf | 32 - net/lighttpd/files/lighttpd.init | 20 - ...CGI-local-redir-strict-adherence-210.patch | 62 - ...local-redir-w-url.rewrite-once-fixes.patch | 34 - ...us-200-OK-if-no-hdrs-deprecated-2786.patch | 46 - ...local-redir-enable-disable-2108-2793.patch | 105 - net/noddos/Makefile | 83 - net/ola/Makefile | 115 - net/ola/files/olad.init | 14 - net/ola/patches/001-include-endian_h.patch | 15 - ...emove-visibility-inlines-hidden-flag.patch | 13 - ...functionality-optional-at-build-time.patch | 61 - net/openconnect/Config.in | 21 - net/openconnect/Makefile | 78 - net/openconnect/README | 43 - net/openconnect/files/openconnect-wrapper | 41 - net/openconnect/files/openconnect.sh | 95 - net/openconnect/files/openconnect.upgrade | 9 - net/tor/Makefile | 144 + net/tor/files/tor.init | 26 + net/tor/patches/001-torrc.patch | 25 + net/wireguard/Makefile | 110 + net/wireguard/files/wireguard.sh | 183 + sound/alsa-utils/Makefile | 89 + .../patches/100-uClibc-compat.patch | 23 + sound/espeak/Makefile | 57 + sound/espeak/patches/101-portaudio.patch | 2093 ++ sound/forked-daapd/Makefile | 75 + sound/forked-daapd/files/forked-daapd.conf | 187 + sound/forked-daapd/files/forked-daapd.init | 15 + .../patches/010-include_pregen.patch | 23739 ++++++++++++++++ sound/lame/Makefile | 84 + sound/lame/patches/001-automake-compat.patch | 33 + sound/madplay/Makefile | 85 + .../patches/0001-switch-to-new-alsa-api.patch | 173 + .../patches/010-use_correct_shell.patch | 30 + sound/mocp/Makefile | 66 + sound/mpc/Makefile | 58 + sound/mpc/files/pls-handler.sh | 5 + sound/mpd/Makefile | 229 + 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 | 102 + sound/pianod/Makefile | 110 + sound/pianod/files/pianod.init | 42 + sound/portaudio/Makefile | 70 + sound/pulseaudio/Makefile | 195 + sound/pulseaudio/files/pulseaudio.init | 29 + .../patches/001-no_default_64mb_alloc.patch | 11 + sound/shairplay/Makefile | 50 + 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 | 124 + .../files/shairport-sync.config | 61 + .../shairport-sync/files/shairport-sync.init | 142 + .../100-replace_polarssl_with_mbedtls.patch | 395 + sound/shairport/Makefile | 60 + sound/shairport/files/shairport.config | 36 + sound/shairport/files/shairport.init | 104 + .../patches/001-disable_pulseaudio.patch | 12 + sound/shine/Makefile | 64 + .../shine/patches/001-fix_mips64_bswap.patch | 11 + .../002-fix-name-collision-with-ffmpeg.patch | 64 + sound/sox/Makefile | 88 + sound/sox/patches/001-cross_compile.patch | 22 + .../patches/010-fix_uclibc_build_issue.patch | 19 + sound/squeezelite/Makefile | 146 + 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_mpg123.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/bluelog/Makefile | 108 + utils/bluelog/files/bluelog.init | 13 + .../100-gen-oui-fix-tempfile-use-mirror.patch | 31 + utils/bluez/Makefile | 159 + utils/bluez/files/bluetooth.config | 15 + utils/bluez/files/bluetooth.dbus | 37 + utils/bluez/files/bluetoothd.init | 13 + 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/200-uart-speed.patch | 40 + utils/bluez/patches/201-readline.patch | 48 + utils/collectd/files/collectd.conf | 39 + utils/collectd/files/collectd.init | 15 + .../001-undefined-AM_PATH_LIBGCRYPT.patch | 4 + .../collectd/patches/003-remove-werror.patch | 22 + ...upstream-fix-for-network-plugin-ddos.patch | 50 + .../100-rrdtool-add-rrasingle-option.patch | 57 + .../collectd/patches/140-fix-fqdnlookup.patch | 11 + .../patches/200-fix-git-describe-error.patch | 11 + .../patches/300-delay-first-read-cycle.patch | 11 + .../patches/400-fix-olsrd-get-all.patch | 11 + .../patches/600-fix-libmodbus-detection.patch | 40 + .../patches/900-add-iwinfo-plugin.patch | 276 + .../patches/920-fix-ping-droprate.patch | 11 + utils/crelay/Makefile | 74 + utils/crelay/files/crelay.init | 24 + .../crelay/patches/010-link_with_ftdi1.patch | 11 + 814 files changed, 83545 insertions(+), 1075 deletions(-) create mode 100644 lang/chardet/Makefile create mode 100644 lang/django-appconf/Makefile create mode 100644 lang/django-compressor/Makefile create mode 100644 lang/django-constance/Makefile create mode 100644 lang/django-jsonfield/Makefile create mode 100644 lang/django-picklefield/Makefile create mode 100644 lang/django-postoffice/Makefile create mode 100644 lang/django-restframework/Makefile create mode 100644 lang/django-statici18n/Makefile create mode 100644 lang/django/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/et_xmlfile/Makefile create mode 100644 lang/flup/Makefile create mode 100644 lang/gunicorn/Makefile create mode 100644 lang/jamvm/Makefile create mode 100644 lang/jdcal/Makefile create mode 100644 lang/json4lua/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-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-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 100755 lang/luai2c/Makefile 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/luasql/Makefile create mode 100644 lang/lzmq/Makefile create mode 100644 lang/micropython-lib/Makefile create mode 100644 lang/micropython/Makefile create mode 100644 lang/micropython/patches/000-Makefile-no-errors 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-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/openpyxl/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-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/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-host-libc-dir-moved-debian+derivatives.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/300-add-relink-hack.patch create mode 100644 lang/perl/patches/310-recompile-hack.patch create mode 100644 lang/perl/patches/700-tie_fetch_count_t-handle_missing_crypt.patch create mode 100644 lang/perl/patches/710-threads_join-skip_ps_on_busybox.patch create mode 100644 lang/perl/patches/900-CVE-2015-8607.patch create mode 100644 lang/perl/patches/901-CVE-2016-2381.patch create mode 100644 lang/perl/perlbase.mk create mode 100644 lang/perl/perlmod.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.old/100_config9-m4.patch create mode 100644 lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.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/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/1005-fix-asm-constraints-in-aarch64-multiply-macro.patch create mode 100644 lang/php7/pecl.mk create mode 100644 lang/pillow/Makefile create mode 100644 lang/pillow/patches/010-fix-paths.patch create mode 100644 lang/python-attrs/Makefile create mode 100644 lang/python-cffi/Makefile create mode 100644 lang/python-crcmod/Makefile create mode 100644 lang/python-crypto/Makefile create mode 100644 lang/python-crypto/patches/001-no-host-paths.patch create mode 100644 lang/python-crypto/patches/002-fix-endianness-detect.patch create mode 100644 lang/python-cryptography/Makefile create mode 100644 lang/python-dateutil/Makefile create mode 100644 lang/python-dns/Makefile create mode 100644 lang/python-egenix-mx-base/Makefile create mode 100644 lang/python-enum34/Makefile create mode 100644 lang/python-enum34/patches/001-omit-docs.patch create mode 100644 lang/python-gmpy2/Makefile create mode 100644 lang/python-idna/Makefile create mode 100644 lang/python-ipaddress/Makefile create mode 100644 lang/python-ldap/Makefile create mode 100644 lang/python-ldap/patches/010-setup_cfg.patch create mode 100644 lang/python-mysql/Makefile create mode 100644 lang/python-mysql/patches/010-threadsafe.patch create mode 100644 lang/python-packages/Makefile create mode 100644 lang/python-packages/README.md create mode 100644 lang/python-parsley/Makefile create mode 100644 lang/python-parsley/patches/001-omit-tests.patch create mode 100644 lang/python-pcapy/Makefile create mode 100644 lang/python-pip/Makefile create mode 100644 lang/python-pip/files/pip.conf create mode 100644 lang/python-ply/Makefile create mode 100644 lang/python-psycopg2/Makefile create mode 100644 lang/python-pyasn1-modules/Makefile create mode 100644 lang/python-pyasn1/Makefile create mode 100644 lang/python-pycparser/Makefile create mode 100644 lang/python-pycparser/patches/001-use-external-ply.patch create mode 100644 lang/python-pyopenssl/Makefile create mode 100644 lang/python-pyptlib/Makefile create mode 100644 lang/python-pyserial/Makefile create mode 100644 lang/python-service-identity/Makefile create mode 100644 lang/python-setuptools/Makefile create mode 100644 lang/python-setuptools/patches/0001-remove-windows-support.patch create mode 100644 lang/python-setuptools/patches/0002-fix-pyvenv-environment-get.patch create mode 100644 lang/python-six/Makefile create mode 100644 lang/python-txsocksx/Makefile create mode 100644 lang/python-txsocksx/patches/001-omit-tests.patch create mode 100644 lang/python-txsocksx/patches/002-do-not-use-vcversioner.patch create mode 100644 lang/python-urllib3/Makefile create mode 100644 lang/python-yaml/Makefile create mode 100644 lang/python/files/config.site create mode 100644 lang/python/files/python-host.mk create mode 100644 lang/python/files/python-package-codecs.mk create mode 100644 lang/python/files/python-package-compiler.mk create mode 100644 lang/python/files/python-package-ctypes.mk create mode 100644 lang/python/files/python-package-db.mk create mode 100644 lang/python/files/python-package-decimal.mk create mode 100644 lang/python/files/python-package-dev.mk create mode 100644 lang/python/files/python-package-distutils.mk create mode 100644 lang/python/files/python-package-email.mk create mode 100644 lang/python/files/python-package-gdbm.mk create mode 100644 lang/python/files/python-package-lib2to3.mk create mode 100644 lang/python/files/python-package-logging.mk create mode 100644 lang/python/files/python-package-multiprocessing.mk create mode 100644 lang/python/files/python-package-ncurses.mk create mode 100644 lang/python/files/python-package-openssl.mk create mode 100644 lang/python/files/python-package-pydoc.mk create mode 100644 lang/python/files/python-package-sqlite3.mk create mode 100644 lang/python/files/python-package-unittest.mk create mode 100644 lang/python/files/python-package-xml.mk create mode 100644 lang/python/files/python-package.mk create mode 100644 lang/python/patches/007-distutils-do-not-adjust-path.patch create mode 100644 lang/python3-bottle/Makefile create mode 100644 lang/python3-pip/Makefile create mode 100644 lang/python3-pip/patches/0001-remove-self-version-checking.patch create mode 100644 lang/python3-setuptools/Makefile create mode 100644 lang/python3-setuptools/patches/0001-remove-windows-support.patch create mode 100644 lang/python3-setuptools/patches/0002-fix-pyvenv-environment-get.patch create mode 100644 lang/python3/Makefile create mode 100644 lang/python3/files/config.site create mode 100644 lang/python3/files/python3-host.mk create mode 100644 lang/python3/files/python3-package-asyncio.mk create mode 100644 lang/python3/files/python3-package-codecs.mk create mode 100644 lang/python3/files/python3-package-ctypes.mk create mode 100644 lang/python3/files/python3-package-dbm.mk create mode 100644 lang/python3/files/python3-package-decimal.mk create mode 100644 lang/python3/files/python3-package-dev.mk create mode 100644 lang/python3/files/python3-package-distutils.mk create mode 100644 lang/python3/files/python3-package-email.mk create mode 100644 lang/python3/files/python3-package-gdbm.mk create mode 100644 lang/python3/files/python3-package-lib2to3.mk create mode 100644 lang/python3/files/python3-package-logging.mk create mode 100644 lang/python3/files/python3-package-lzma.mk create mode 100644 lang/python3/files/python3-package-multiprocessing.mk create mode 100644 lang/python3/files/python3-package-ncurses.mk create mode 100644 lang/python3/files/python3-package-openssl.mk create mode 100644 lang/python3/files/python3-package-pydoc.mk create mode 100644 lang/python3/files/python3-package-sqlite3.mk create mode 100644 lang/python3/files/python3-package-unittest.mk create mode 100644 lang/python3/files/python3-package-xml.mk create mode 100644 lang/python3/files/python3-package.mk create mode 100644 lang/python3/files/python3-version.mk create mode 100644 lang/python3/patches/001-enable-zlib.patch create mode 100644 lang/python3/patches/002-do-not-add-include-dirs-when-cross-compiling.patch create mode 100644 lang/python3/patches/003-do-not-run-distutils-tests.patch create mode 100644 lang/python3/patches/004-do-not-write-bytes-codes.patch create mode 100644 lang/python3/patches/005-fix-libffi-x86-64-configure.patch create mode 100644 lang/python3/patches/006-remove-debian-multiarch-support.patch create mode 100644 lang/python3/patches/007-distutils-do-not-adjust-path.patch create mode 100644 lang/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch create mode 100644 lang/python3/patches/011-do-not-prefer-ncursesw.patch create mode 100644 lang/python3/patches/011-fix-ncursesw-definition-colisions.patch create mode 100644 lang/python3/patches/012-disable-wcsftime-detection.patch create mode 100644 lang/python3/patches/014-remove-platform-so-suffix.patch create mode 100644 lang/python3/patches/015-abort-on-failed-modules.patch create mode 100644 lang/python3/patches/016-adjust-config-paths.patch create mode 100644 lang/pytz/Makefile create mode 100644 lang/rcssmin/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/simplejson/Makefile 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/twisted/Makefile create mode 100644 lang/twisted/patches/001-fix-zsh-completion.patch create mode 100644 lang/twisted/patches/002-omit-tests.patch create mode 100644 lang/uuid/Makefile create mode 100644 lang/vala/Makefile create mode 100644 lang/zope-interface/Makefile create mode 100644 libs/alsa-lib/patches/001-link_fix.patch create mode 100644 libs/alsa-lib/patches/005-fix_include_file_redirect_warnings.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/boost/patches/01_fiber_fix.patch 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/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/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/faad2/Config.in 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/flac/patches/020-fix-musl-sigemptyset-x86.patch create mode 100644 libs/freetype/Makefile create mode 100644 libs/gdbm/Makefile create mode 100644 libs/giflib/Makefile create mode 100644 libs/giflib/patches/100-no-docs.patch create mode 100644 libs/glpk/Makefile create mode 100644 libs/gperf/Makefile 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/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/patches/000-dont-cpy-files-from-topdirs.patch create mode 100644 libs/icu/patches/001-disable-strtod_l.patch create mode 100644 libs/icu/patches/CVE-2017-7867_CVE-2017-7868.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/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/libcap/Makefile create mode 100644 libs/libcap/patches/100-portability.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/Makefile 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/libevent/Makefile 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/libextractor/patches/001-backport-support-for-giflib-5-1.patch create mode 100644 libs/libextractor/patches/002-ffmpeg2.9_api_backport.patch create mode 100644 libs/libfastjson/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/libgee/Makefile create mode 100644 libs/libgee/patches/libgee-0.18.0-no-introspection.patch 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/002-disable-po-docs-examples.patch create mode 100644 libs/libidn/patches/010-fix-idn-error-usage.patch 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/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/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/libnatpmp/Makefile create mode 100644 libs/libnatpmp/patches/001-install_declspec.patch 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/libnopoll/Makefile 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/libplist/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/libsoxr/Makefile create mode 100644 libs/libstrophe/Config.in create mode 100644 libs/libstrophe/Makefile create mode 100644 libs/libtalloc/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/libtorrent/Makefile create mode 100644 libs/libtorrent/patches/100-fix_cross_compile.patch create mode 100644 libs/libuecc/Makefile create mode 100644 libs/libugpio/Makefile create mode 100644 libs/libunistring/Makefile 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 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/libx264/Makefile create mode 100644 libs/libxerces-c/Makefile 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/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/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/opus/Makefile 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/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/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/protobuf/patches/001-mipseb-compile.patch create mode 100644 libs/protobuf/patches/003-mips2andHigher-compile.patch 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/qrencode/Makefile create mode 100644 libs/qrencode/patches/001-disable-png.patch create mode 100644 libs/quasselc/Makefile create mode 100644 libs/quasselc/patches/001-respect-cflags-ldflags.patch create mode 100755 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/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/patches/001-printf-fix.patch create mode 100644 libs/tinycdb/Makefile create mode 100644 libs/tinycdb/patches/100-Makefile.patch create mode 100644 libs/unixodbc/Makefile create mode 100644 libs/unixodbc/files/unixodbc_conf.h create mode 100644 libs/vips/Makefile create mode 100644 libs/vips/patches/001-no_cpp.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/bogofilter/Makefile create mode 100755 mail/bogofilter/files/postfix-bogofilter 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/fswebcam/Makefile create mode 100644 multimedia/gst1-libav/Config.in create mode 100644 multimedia/gst1-libav/Makefile 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/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/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/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/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/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/bmon/Makefile create mode 100644 net/daemonlogger/Makefile 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/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 delete mode 100644 net/lighttpd/Makefile delete mode 100644 net/lighttpd/files/lighttpd.conf delete mode 100644 net/lighttpd/files/lighttpd.init delete mode 100644 net/lighttpd/patches/0001-mod_cgi-RFC3875-CGI-local-redir-strict-adherence-210.patch delete mode 100644 net/lighttpd/patches/0002-mod_cgi-fix-CGI-local-redir-w-url.rewrite-once-fixes.patch delete mode 100644 net/lighttpd/patches/0003-mod_cgi-status-200-OK-if-no-hdrs-deprecated-2786.patch delete mode 100644 net/lighttpd/patches/0004-mod_cgi-cgi.local-redir-enable-disable-2108-2793.patch delete mode 100644 net/noddos/Makefile delete mode 100644 net/ola/Makefile delete mode 100644 net/ola/files/olad.init delete mode 100644 net/ola/patches/001-include-endian_h.patch delete mode 100644 net/ola/patches/002-remove-visibility-inlines-hidden-flag.patch delete mode 100644 net/ola/patches/003-Make-DNS-SD-functionality-optional-at-build-time.patch delete mode 100644 net/openconnect/Config.in delete mode 100644 net/openconnect/Makefile delete mode 100644 net/openconnect/README delete mode 100755 net/openconnect/files/openconnect-wrapper delete mode 100755 net/openconnect/files/openconnect.sh delete mode 100644 net/openconnect/files/openconnect.upgrade 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/wireguard/Makefile create mode 100644 net/wireguard/files/wireguard.sh create mode 100644 sound/alsa-utils/Makefile create mode 100644 sound/alsa-utils/patches/100-uClibc-compat.patch create mode 100644 sound/espeak/Makefile create mode 100644 sound/espeak/patches/101-portaudio.patch 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-include_pregen.patch create mode 100644 sound/lame/Makefile create mode 100644 sound/lame/patches/001-automake-compat.patch 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/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/shairport-sync/patches/100-replace_polarssl_with_mbedtls.patch create mode 100644 sound/shairport/Makefile create mode 100644 sound/shairport/files/shairport.config create mode 100644 sound/shairport/files/shairport.init create mode 100644 sound/shairport/patches/001-disable_pulseaudio.patch 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/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_mpg123.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/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/bluetooth.dbus 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/200-uart-speed.patch create mode 100644 utils/bluez/patches/201-readline.patch 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/003-remove-werror.patch create mode 100644 utils/collectd/patches/050-upstream-fix-for-network-plugin-ddos.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/200-fix-git-describe-error.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/900-add-iwinfo-plugin.patch create mode 100644 utils/collectd/patches/920-fix-ping-droprate.patch 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 diff --git a/lang/chardet/Makefile b/lang/chardet/Makefile new file mode 100644 index 0000000..6343b4e --- /dev/null +++ b/lang/chardet/Makefile @@ -0,0 +1,53 @@ +# +# 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:=chardet +PKG_VERSION:=2.3.0 +PKG_RELEASE:=1 +PKG_LICENSE:=LGPL-2.1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/c/chardet/ +PKG_MD5SUM:=25274d664ccb5130adae08047416e1a8 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/chardet + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=Universal encoding detector for Python 2 and 3 + URL:=https://github.com/chardet/chardet + DEPENDS:=+python +endef + +define Package/chardet/description + Universal encoding detector for Python 2 and 3 +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/chardet/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(INSTALL_DIR) $(1)/usr/bin + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/chardetect \ + $(1)/usr/bin + # fix python exec path in scripts + sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/chardetect +endef + +$(eval $(call BuildPackage,chardet)) diff --git a/lang/django-appconf/Makefile b/lang/django-appconf/Makefile new file mode 100644 index 0000000..c06fa6a --- /dev/null +++ b/lang/django-appconf/Makefile @@ -0,0 +1,48 @@ +# +# 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:=django-appconf +PKG_VERSION:=1.0.2 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://pypi.python.org/packages/34/b9/d07195652ab494b026f7cb0341dd6e5f2e6e39be177abe05e2cec8bd46e4/ +PKG_MD5SUM:=cc11511a47088bc56531df67cd5d6261 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/django-appconf + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=A helper class for handling configuration defaults of packaged apps gracefully. + URL:=http://django-appconf.readthedocs.org/ + DEPENDS:=+python +django +endef + +define Package/django-appconf/description + A helper class for handling configuration defaults of packaged apps gracefully. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-appconf/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-appconf)) diff --git a/lang/django-compressor/Makefile b/lang/django-compressor/Makefile new file mode 100644 index 0000000..414e342 --- /dev/null +++ b/lang/django-compressor/Makefile @@ -0,0 +1,49 @@ +# +# 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:=django-compressor +PKG_VERSION:=2.1 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=django_compressor-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://pypi.python.org/packages/23/46/2c7d582255969ad5259937f5f9e14aec1f3349d0fc0651129330918d1c6d/ +PKG_BUILD_DIR:=$(BUILD_DIR)/django_compressor-$(PKG_VERSION)/ +PKG_MD5SUM:=21ecfe4e8615eae64f7068a5599df9af +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/django-compressor + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=Compresses linked and inline JavaScript or CSS into single cached files. + URL:=http://django-compressor.readthedocs.org/ + DEPENDS:=+python +django +endef + +define Package/django-compressor/description + Compresses linked and inline JavaScript or CSS into single cached files. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-compressor/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-compressor)) diff --git a/lang/django-constance/Makefile b/lang/django-constance/Makefile new file mode 100644 index 0000000..11dd2e2 --- /dev/null +++ b/lang/django-constance/Makefile @@ -0,0 +1,48 @@ +# +# 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:=django-constance +PKG_VERSION:=1.2 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://pypi.python.org/packages/0a/ff/1c1caae2b7be9c26f2aee0703236998e22cf5557fa56726347b5afa149d1/ +PKG_MD5SUM:=f9f8e527df50b0a1533149d9be0b814b +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/django-constance + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=Django live settings with pluggable backends, including Redis. + URL:=https://github.com/jazzband/django-constance + DEPENDS:=+python +django +endef + +define Package/django-constance/description + Django live settings with pluggable backends, including Redis. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-constance/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-constance)) diff --git a/lang/django-jsonfield/Makefile b/lang/django-jsonfield/Makefile new file mode 100644 index 0000000..40a9ff7 --- /dev/null +++ b/lang/django-jsonfield/Makefile @@ -0,0 +1,48 @@ +# +# 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:=django-jsonfield +PKG_VERSION:=1.0.1 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://pypi.python.org/packages/e4/b2/a079f0a2218e0eb7892edbf404e0bbfbb281a6bbf06966b775f5142ed159/ +PKG_MD5SUM:=2e5e737a3f93f3b5d7ae6026b1340167 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/django-jsonfield + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=JSONField for django models + URL:=https://github.com/bradjasper/django-jsonfield + DEPENDS:=+python +django +endef + +define Package/django-jsonfield/description + JSONField for django models +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-jsonfield/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-jsonfield)) diff --git a/lang/django-picklefield/Makefile b/lang/django-picklefield/Makefile new file mode 100644 index 0000000..0747796 --- /dev/null +++ b/lang/django-picklefield/Makefile @@ -0,0 +1,48 @@ +# +# 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:=django-picklefield +PKG_VERSION:=0.3.2 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/d/django-picklefield/ +PKG_MD5SUM:=b2c17ca9e03704ce33890e6aefc7b2e5 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/django-picklefield + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=Pickled object field for Django + URL:=http://github.com/gintas/django-picklefield/ + DEPENDS:=+python +django +endef + +define Package/django-picklefield/description + Pickled object field for Django +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-picklefield/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-picklefield)) diff --git a/lang/django-postoffice/Makefile b/lang/django-postoffice/Makefile new file mode 100644 index 0000000..18dce36 --- /dev/null +++ b/lang/django-postoffice/Makefile @@ -0,0 +1,49 @@ +# +# 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:=django-postoffice +PKG_VERSION:=2.0.8 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=django-post_office-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://pypi.python.org/packages/52/25/cc0cfe923f183d7c19b162cac3bf8430ddaed7bad28202b8f93a97d248a4/ +PKG_BUILD_DIR:=$(BUILD_DIR)/django-post_office-$(PKG_VERSION)/ +PKG_MD5SUM:=437bf62cef06381d346ae2bc087c0e3c +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/django-postoffice + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=A Django app to monitor and send mail asynchronously, complete with template support. + URL:=https://github.com/ui/django-postoffice + DEPENDS:=+python +django +django-jsonfield +endef + +define Package/django-postoffice/description + A Django app to monitor and send mail asynchronously, complete with template support. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-postoffice/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-postoffice)) diff --git a/lang/django-restframework/Makefile b/lang/django-restframework/Makefile new file mode 100644 index 0000000..5ae6956 --- /dev/null +++ b/lang/django-restframework/Makefile @@ -0,0 +1,49 @@ +# +# 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:=django-restframework +PKG_VERSION:=3.3.3 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE:=djangorestframework-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/d/djangorestframework/ +PKG_BUILD_DIR:=$(BUILD_DIR)/djangorestframework-$(PKG_VERSION) +PKG_MD5SUM:=6f5ee9646e7fa87dad4385d3c7e7678d +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/django-restframework + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=Web APIs for Django, made easy. + URL:=http://www.django-rest-framework.org/ + DEPENDS:=+python +django +endef + +define Package/django-restframework/description + Web APIs for Django, made easy. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-restframework/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-restframework)) diff --git a/lang/django-statici18n/Makefile b/lang/django-statici18n/Makefile new file mode 100644 index 0000000..5d94774 --- /dev/null +++ b/lang/django-statici18n/Makefile @@ -0,0 +1,48 @@ +# +# 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:=django-statici18n +PKG_VERSION:=1.2.1 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://pypi.python.org/packages/72/76/6ee13019e1691bff6b759136068ee77fcc2982b700135caa134030937b28/ +PKG_MD5SUM:=67cac19909dd3272ae1fc73ad8d1dca3 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/django-statici18n + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=A Django app that provides helper for generating JavaScript catalog to static files. + URL:=http://django-statici18n.readthedocs.org/ + DEPENDS:=+python +django +endef + +define Package/django-statici18n/description + A Django app that provides helper for generating JavaScript catalog to static files. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-statici18n/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-statici18n)) diff --git a/lang/django/Makefile b/lang/django/Makefile new file mode 100644 index 0000000..c932cc1 --- /dev/null +++ b/lang/django/Makefile @@ -0,0 +1,65 @@ +# +# 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:=django +PKG_VERSION:=1.8.12 +PKG_RELEASE=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/django/django.git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=c168aeba175dbb92c615460a360cb1ea978de5d3 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/django + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=The web framework for perfectionists with deadlines. + MAINTAINER:=Gergely Kiss + URL:=https://www.djangoproject.com/ + DEPENDS:=+python +endef + +define Package/django/description + The web framework for perfectionists with deadlines. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(INSTALL_DIR) $(1)/usr/bin + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \ + $(1)/usr/bin +endef + +define Package/django/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(INSTALL_DIR) $(1)/usr/bin + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \ + $(1)/usr/bin + # fix python exec path + sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/django-admin.py +endef + +$(eval $(call BuildPackage,django)) diff --git a/lang/dkjson/Makefile b/lang/dkjson/Makefile new file mode 100644 index 0000000..efb0012 --- /dev/null +++ b/lang/dkjson/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:=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_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 0000000..3a86aa5 --- /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_MD5SUM:=346dd0136bf1cc28cebc140e505206bb + +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 0000000..5a413af --- /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 0000000..d23900e --- /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 0000000..9412195 --- /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/et_xmlfile/Makefile b/lang/et_xmlfile/Makefile new file mode 100644 index 0000000..f0c0139 --- /dev/null +++ b/lang/et_xmlfile/Makefile @@ -0,0 +1,48 @@ +# +# 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:=et_xmlfile +PKG_VERSION:=1.0.1 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/e/et_xmlfile/ +PKG_MD5SUM:=f47940fd9d556375420b2e276476cfaf +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/et_xmlfile + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=An implementation of lxml.xmlfile for the standard library + URL:=https://bitbucket.org/openpyxl/et_xmlfile + DEPENDS:=+python +endef + +define Package/et_xmlfile/description + An implementation of lxml.xmlfile for the standard library +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/et_xmlfile/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,et_xmlfile)) diff --git a/lang/flup/Makefile b/lang/flup/Makefile new file mode 100644 index 0000000..b0514f4 --- /dev/null +++ b/lang/flup/Makefile @@ -0,0 +1,48 @@ +# +# 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:=flup +PKG_VERSION:=1.0.2 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/f/flup/ +PKG_MD5SUM:=24dad7edc5ada31dddd49456ee8d5254 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/flup + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=Random assortment of WSGI servers + URL:=http://www.saddi.com/software/flup/ + DEPENDS:=+python +endef + +define Package/flup/description + Random assortment of WSGI servers +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/flup/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,flup)) diff --git a/lang/gunicorn/Makefile b/lang/gunicorn/Makefile new file mode 100644 index 0000000..efdf9f4 --- /dev/null +++ b/lang/gunicorn/Makefile @@ -0,0 +1,53 @@ +# +# 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:=gunicorn +PKG_VERSION:=19.6.0 +PKG_RELEASE=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://pypi.python.org/packages/84/ce/7ea5396efad1cef682bbc4068e72a0276341d9d9d0f501da609fab9fcb80/ +PKG_MD5SUM:=338e5e8a83ea0f0625f768dba4597530 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/gunicorn + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=WSGI HTTP Server for UNIX + MAINTAINER:=Gergely Kiss + URL:=http://gunicorn.org/ + DEPENDS:=+python +python-setuptools +endef + +define Package/gunicorn/description + WSGI HTTP Server for UNIX +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/gunicorn/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(INSTALL_DIR) $(1)/usr/bin + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gunicorn* \ + $(1)/usr/bin + # fix python exec path in scripts + $(SED) 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/gunicorn* +endef + +$(eval $(call BuildPackage,gunicorn)) diff --git a/lang/jamvm/Makefile b/lang/jamvm/Makefile new file mode 100644 index 0000000..996dfa0 --- /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:=1 +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_MD5SUM:=a6e3321ef4b3cfb4afc20bd75452e11e + +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/jdcal/Makefile b/lang/jdcal/Makefile new file mode 100644 index 0000000..34d3970 --- /dev/null +++ b/lang/jdcal/Makefile @@ -0,0 +1,48 @@ +# +# 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:=jdcal +PKG_VERSION:=1.2 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/j/jdcal/ +PKG_MD5SUM:=ab8d5ba300fd1eb01514f363d19b1eb9 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/jdcal + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=Julian dates from proleptic Gregorian and Julian calendars. + URL:=http://github.com/phn/jdcal + DEPENDS:=+python +endef + +define Package/jdcal/description + Julian dates from proleptic Gregorian and Julian calendars. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/jdcal/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,jdcal)) diff --git a/lang/json4lua/Makefile b/lang/json4lua/Makefile new file mode 100644 index 0000000..0e0c9c5 --- /dev/null +++ b/lang/json4lua/Makefile @@ -0,0 +1,52 @@ +# +# 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_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/lpeg/Makefile b/lang/lpeg/Makefile new file mode 100644 index 0000000..ee8a4ef --- /dev/null +++ b/lang/lpeg/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:=lpeg +PKG_VERSION:=0.12.2 +PKG_RELEASE:=1 +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_MD5SUM:=fabb614eb46e370d4f6b8fd82d17ca7e + +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 += + +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 0000000..a7b898b --- /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 0000000..7cdb350 --- /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_MD5SUM:=24f270663e9f6ca8ba2a02cef19f7963 + +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 0000000..4f073e2 --- /dev/null +++ b/lang/lua-copas/Makefile @@ -0,0 +1,62 @@ +# +# 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_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 0000000..10e4734 --- /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 0000000..6ca3ff8 --- /dev/null +++ b/lang/lua-coxpcall/Makefile @@ -0,0 +1,59 @@ +# +# 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_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 0000000..2a1dbfd --- /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 0000000..473e215 --- /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_MD5SUM:=8e16ef4fda82eb73295bf2f1050d14f1 + +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 0000000..e4094f5 --- /dev/null +++ b/lang/lua-lzlib/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:=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_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 0000000..78f981d --- /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 0000000..36e0d9d --- /dev/null +++ b/lang/lua-md5/Makefile @@ -0,0 +1,75 @@ +# +# 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_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 0000000..abea3a8 --- /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 0000000..89a2e33 --- /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 0000000..3d11539 --- /dev/null +++ b/lang/lua-mobdebug/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-mobdebug +PKG_VERSION:=0.61 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Dirk Chang +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +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-openssl/Makefile b/lang/lua-openssl/Makefile new file mode 100644 index 0000000..6f46e7a --- /dev/null +++ b/lang/lua-openssl/Makefile @@ -0,0 +1,42 @@ +# +# 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_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/$(PKG_NAME) + 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/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/openssl.so $(1)/usr/lib/lua/ +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) 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 0000000..e084c0b --- /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 0000000..52bcf1a --- /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 0000000..2f29680 --- /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 0000000..44e5330 --- /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 0000000..5c1b72a --- /dev/null +++ b/lang/lua-penlight/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lua-penlight +PKG_VERSION:=1.3.2 +PKG_RELEASE:=2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Penlight-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/stevedonovan/Penlight/archive/ +PKG_MD5SUM:=0315a39834bb6fab07741ec04ede1bf4 +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE.md + +include $(INCLUDE_DIR)/package.mk + +define Package/$(PKG_NAME) + 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/$(PKG_NAME)/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/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(CP) $(PKG_BUILD_DIR)/lua/pl $(1)/usr/lib/lua +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/lua-rings/Makefile b/lang/lua-rings/Makefile new file mode 100644 index 0000000..7b2e270 --- /dev/null +++ b/lang/lua-rings/Makefile @@ -0,0 +1,54 @@ +# +# 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_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 0000000..5740fae --- /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 0000000..8bb0551 --- /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 0000000..7ef5ac7 --- /dev/null +++ b/lang/lua-rs232/Makefile @@ -0,0 +1,62 @@ +# +# 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:=1 +PKG_MAINTAINER:=Dirk Chang +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +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-sha2/Makefile b/lang/lua-sha2/Makefile new file mode 100644 index 0000000..321d6de --- /dev/null +++ b/lang/lua-sha2/Makefile @@ -0,0 +1,52 @@ +# +# 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_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 0000000..e395044 --- /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 0000000..5117596 --- /dev/null +++ b/lang/lua-wsapi/Makefile @@ -0,0 +1,95 @@ +# +# 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_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 0000000..71ed8bd --- /dev/null +++ b/lang/lua-xavante/Makefile @@ -0,0 +1,58 @@ +# +# 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_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 0000000..6153c8d --- /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_MD5SUM:=d0c1080fe0c844e8477279668e2d0d06 +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 0000000..eae164f --- /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_MD5SUM:=3c20b5795e7107f847f8da844fbfe2da + +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 0000000..6fdb8b7 --- /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 0000000..97570d9 --- /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 0000000..0938d56 --- /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 0000000..13abef6 --- /dev/null +++ b/lang/luafilesystem/Makefile @@ -0,0 +1,66 @@ +# +# 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_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 100755 index 0000000..5022b49 --- /dev/null +++ b/lang/luai2c/Makefile @@ -0,0 +1,45 @@ +# +# 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:=luai2c +PKG_VERSION:=1.0.0 +PKG_RELEASE:=3 +PKG_MAINTAINER:=Frank Edelhaeuser +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/mrpace2/i2c-lua.git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=$(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/i2c-lua/ + 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/lualanes/Makefile b/lang/lualanes/Makefile new file mode 100644 index 0000000..749709d --- /dev/null +++ b/lang/lualanes/Makefile @@ -0,0 +1,57 @@ +# +# 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_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 luac/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 0000000..ba3f49f --- /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 0000000..9bf3628 --- /dev/null +++ b/lang/luaposix/Makefile @@ -0,0 +1,61 @@ +# +# 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_MD5SUM:=aa68b5c07ab1ecea81bb466c81e88056 +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 + +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 + PKG_BUILD_DEPENDS:=+lua/host +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 +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 0000000..e4df63b --- /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 0000000..6412799 --- /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 0000000..7c58be4 --- /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 0000000..73dbde7 --- /dev/null +++ b/lang/luarocks/Makefile @@ -0,0 +1,62 @@ +# +# 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_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 luac/host +PKG_LICENSE=GPL + +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) + +CONFIGURE_VARS = \ + LUAROCKS_UNAME_S="Linux" \ + LUAROCKS_UNAME_M="$(ARCH)" + +define Build/Compile + $(call Build/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 + +$(eval $(call BuildPackage,luarocks)) 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 0000000..a1bad21 --- /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 0000000..5c9c968 --- /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 0000000..b2bde57 --- /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_MD5SUM:=14e1aef6d2aae96bbf98afc6b6634af2 +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 0000000..6ebf03b --- /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_MD5SUM:= + +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 0000000..5e7c983 --- /dev/null +++ b/lang/luasocket/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:=luasocket +PKG_SOURCE_VERSION:=6d5e40c324c84d9c1453ae88e0ad5bdd0a631448 +PKG_VERSION:=3.0-rc1-20130909 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +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 0000000..3be42ed --- /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/luasql/Makefile b/lang/luasql/Makefile new file mode 100644 index 0000000..135ebff --- /dev/null +++ b/lang/luasql/Makefile @@ -0,0 +1,118 @@ +# +# 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_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/lzmq/Makefile b/lang/lzmq/Makefile new file mode 100644 index 0000000..b17b945 --- /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_MD5SUM:=c4e51a60a5a26987bdce59e45d674a9e + +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/micropython-lib/Makefile b/lang/micropython-lib/Makefile new file mode 100644 index 0000000..2f3fc61 --- /dev/null +++ b/lang/micropython-lib/Makefile @@ -0,0 +1,55 @@ +# +# 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:=micropython-lib +PKG_VERSION=1.8.6-$(PKG_SOURCE_VERSION) +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Roger D +PKG_LICENSE:=MIT, PSFL +PKG_LICENSE_FILES:=LICENSE + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/micropython/micropython-lib.git +PKG_SOURCE_VERSION:=f81e979c56dddb771ad36ec381b7f2c6cd12111f + +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION) +PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/micropython-lib + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=micropython-lib + URL:=https://github.com/micropython/micropython-lib + DEPENDS:=+micropython +endef + +define Package/micropython-lib/description + This package contains micropython-lib, a project to develop a non-monolothic + standard library for Micro Python. Note that this is a work in progress and + several libraries may be missing, incomplete or buggy. +endef + +MAKE_FLAGS:=\ + -C $(PKG_BUILD_DIR) \ + PREFIX=$(PKG_BUILD_DIR)/_install_tmp \ + install + +define Package/micropython-lib/install + $(INSTALL_DIR) $(1)/usr/lib/micropython + $(CP) $(PKG_BUILD_DIR)/_install_tmp/* $(1)/usr/lib/micropython +endef + +$(eval $(call BuildPackage,micropython-lib)) + diff --git a/lang/micropython/Makefile b/lang/micropython/Makefile new file mode 100644 index 0000000..7ee5882 --- /dev/null +++ b/lang/micropython/Makefile @@ -0,0 +1,57 @@ +# +# 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:=micropython +PKG_VERSION=1.8.6-$(PKG_SOURCE_VERSION) +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Roger D +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/micropython/micropython.git +PKG_SOURCE_VERSION:=5a1d63fc14dae788f705403a43c2d8639b7dd9cd + +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/micropython + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Micro Python + URL:=http://micropython.org + DEPENDS:=+libffi +endef + +define Package/micropython/description + This package contains Micro Python, a lean and fast implementation of the Python 3.4 programming language + that is optimised to run on a microcontroller (and low power computers). +endef + + +MAKE_FLAGS += -C $(PKG_BUILD_DIR)/unix + +define Build/Compile + $(call Build/Compile/Default,axtls) + $(call Build/Compile/Default) + +endef + +define Package/micropython/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/unix/micropython $(1)/usr/bin/micropython +endef + +$(eval $(call BuildPackage,micropython)) diff --git a/lang/micropython/patches/000-Makefile-no-errors b/lang/micropython/patches/000-Makefile-no-errors new file mode 100644 index 0000000..765f3e7 --- /dev/null +++ b/lang/micropython/patches/000-Makefile-no-errors @@ -0,0 +1,13 @@ +Index: micropython-1.5-20161117-e81a5353cb794b8d6c57317488e5db6a1c524755/unix/Makefile +=================================================================== +--- micropython-1.5-20161117-e81a5353cb794b8d6c57317488e5db6a1c524755.orig/unix/Makefile 2016-11-17 02:43:13.000000000 +0100 ++++ micropython-1.5-20161117-e81a5353cb794b8d6c57317488e5db6a1c524755/unix/Makefile 2016-11-17 16:49:02.937809018 +0100 +@@ -21,7 +21,7 @@ + INC += -I$(BUILD) + + # compiler settings +-CWARN = -Wall -Werror ++CWARN = -Wall + CWARN += -Wpointer-arith -Wuninitialized + CFLAGS = $(INC) $(CWARN) -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA) + diff --git a/lang/node-arduino-firmata/Makefile b/lang/node-arduino-firmata/Makefile new file mode 100644 index 0000000..f4de0c0 --- /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.3 +PKG_RELEASE:=5 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/shokai/node-arduino-firmata.git +PKG_SOURCE_VERSION:=16e76007edf218d72df590adbd711ac6b7432845 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz + +PKG_BUILD_DEPENDS:=node/host +PKG_NODE_VERSION:=4.4.5 + +PKG_MAINTAINER:=John Crispin +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE.txt + +include $(INCLUDE_DIR)/package.mk + +define Package/node-arduino-firmata + DEPENDS:=+node + SUBMENU:=Node.js + SECTION:=lang + CATEGORY:=Languages + DEPENDS:=+node +node-serialport + TITLE:=Node.js package to access serial ports for reading and writing + URL:=https://www.npmjs.org/package/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 0000000..578bd40 --- /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 0000000..10eab64 --- /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 0000000..13833a3 --- /dev/null +++ b/lang/node-cylon/Makefile @@ -0,0 +1,99 @@ +# +# 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.22.0 +PKG_RELEASE:=5 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/hybridgroup/cylon-firmata.git +PKG_SOURCE_VERSION:=0c37da77e48b3e2cc3a8d566822a17689de91b40 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz + +PKG_BUILD_DEPENDS:=node/host +PKG_NODE_VERSION:=4.4.5 + +PKG_MAINTAINER:=John Crispin +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +include $(INCLUDE_DIR)/package.mk + +define Package/node-cylon/default + DEPENDS:=+node $(2) + SUBMENU:=Node.js + SECTION:=lang + CATEGORY:=Languages + TITLE:=CylonJS - $(1) + URL:=https://www.npmjs.org/package/cylon +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 0000000..08d579c --- /dev/null +++ b/lang/node-cylon/patches/0001-serialport.patch @@ -0,0 +1,12 @@ +Index: node-cylon-0.22.0/package.json +=================================================================== +--- node-cylon-0.22.0.orig/package.json 2015-10-20 20:32:48.000000000 +0200 ++++ node-cylon-0.22.0/package.json 2015-10-21 10:42:20.616109122 +0200 +@@ -38,7 +38,6 @@ + }, + + "dependencies": { +- "firmata": ">= 0.3.2", + "cylon": "1.1.0", + "cylon-gpio": "0.26.0", + "cylon-i2c": "0.22.0" diff --git a/lang/node-hid/Makefile b/lang/node-hid/Makefile new file mode 100644 index 0000000..b8a5b7a --- /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.5.1 +PKG_RELEASE:=5 + +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:=35d830b7810c87d32484d0a346621568c4849441 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz + +PKG_BUILD_DEPENDS:=node/host +PKG_NODE_VERSION:=4.4.5 + +PKG_MAINTAINER:=John Crispin +PKG_LICENSE:=Custom +PKG_LICENSE_FILES:= + +include $(INCLUDE_DIR)/package.mk + +define Package/node-hid + DEPENDS:=+node + SUBMENU:=Node.js + SECTION:=lang + CATEGORY:=Languages + DEPENDS:=+libusb-1.0 +hidapi +libstdcpp + TITLE:=Node.js package to access HID devices + URL:=https://github.com/node-hid/node-hid +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-serialport/Makefile b/lang/node-serialport/Makefile new file mode 100644 index 0000000..3109404 --- /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:=3.0.0 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/ +PKG_MD5SUM:=ea20a17746dd64e72d5f6f2019d9e28d + +PKG_BUILD_DEPENDS:=node/host +PKG_NODE_VERSION:=4.4.5 + +PKG_MAINTAINER:=John Crispin +PKG_LICENSE:=Custom +PKG_LICENSE_FILES:=LICENSE + +include $(INCLUDE_DIR)/package.mk + +define Package/node-serialport + DEPENDS:=+node + 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 +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 0000000..3a1a2f3 --- /dev/null +++ b/lang/node/Makefile @@ -0,0 +1,94 @@ +# +# 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:=node +PKG_VERSION:=v4.4.5 +PKG_RELEASE:=1 + +PKG_SOURCE:=node-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=http://nodejs.org/dist/${PKG_VERSION} +PKG_MD5SUM:=376140907bbe362f36065a30af04f020 + +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 +PKG_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:=+libpthread +librt +libstdcpp +libopenssl +zlib +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 + +CPU:=$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))) + +MAKE_VARS += \ + DESTCPU=$(CPU) + +CONFIGURE_ARGS= \ + --dest-cpu=$(CPU) \ + --dest-os=linux \ + --without-snapshot \ + --shared-zlib \ + --shared-openssl \ + --prefix=/usr + +ifneq ($(findstring arm,$(ARCH)),) +CONFIGURE_ARGS+= \ + $(if $(CONFIG_SOFT_FLOAT),--with-arm-float-abi=soft,--with-arm-float-abi=hard) +endif + +ifneq ($(findstring mips,$(ARCH)),) +CONFIGURE_ARGS+= \ + $(if $(CONFIG_SOFT_FLOAT),--with-mips-float-abi=soft,--with-mips-float-abi=hard) +endif + +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 $(1)/usr/lib/node_modules/npm/{bin,lib,node_modules} + $(CP) $(PKG_INSTALL_DIR)/usr/bin/{node,npm} $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/{package.json,LICENSE,cli.js} $(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/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)) diff --git a/lang/node/patches/001-hardfloat.patch b/lang/node/patches/001-hardfloat.patch new file mode 100644 index 0000000..1bb2493 --- /dev/null +++ b/lang/node/patches/001-hardfloat.patch @@ -0,0 +1,12 @@ +diff --git a/deps/v8/src/base/cpu.cc b/deps/v8/src/base/cpu.cc +index 4f58720..1f3071e 100644 +--- a/deps/v8/src/base/cpu.cc ++++ b/deps/v8/src/base/cpu.cc +@@ -143,6 +143,7 @@ int __detect_fp64_mode(void) { + ".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 0000000..0aa02da --- /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 +@@ -99,6 +99,7 @@ static void uv__getaddrinfo_work(struct + 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 0000000..01a71c6 --- /dev/null +++ b/lang/node/patches/003-path.patch @@ -0,0 +1,12 @@ +--- a/lib/module.js ++++ b/lib/module.js +@@ -453,7 +453,8 @@ Module._initPaths = function() { + homeDir = process.env.HOME; + } + +- var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')]; ++ var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node'), ++ path.resolve(process.execPath, '..', '..', 'lib', 'node_modules')]; + + if (homeDir) { + paths.unshift(path.resolve(homeDir, '.node_libraries')); diff --git a/lang/openpyxl/Makefile b/lang/openpyxl/Makefile new file mode 100644 index 0000000..6656d56 --- /dev/null +++ b/lang/openpyxl/Makefile @@ -0,0 +1,48 @@ +# +# 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:=openpyxl +PKG_VERSION:=2.4.0 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://pypi.python.org/packages/7e/75/9bb309f80e4f75d139ecc55e9edf65c5844336b5a84966a609267255f961/ +PKG_MD5SUM:=e3376d1fce0681fd0b4047ab89218af4 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/openpyxl + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=A Python library to read/write Excel 2010 xlsx/xlsm files + URL:=https://openpyxl.readthedocs.org/ + DEPENDS:=+python +django +endef + +define Package/openpyxl/description + A Python library to read/write Excel 2010 xlsx/xlsm files +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/openpyxl/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,openpyxl)) diff --git a/lang/perl-cgi/Makefile b/lang/perl-cgi/Makefile new file mode 100644 index 0000000..eaca425 --- /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.35 +PKG_RELEASE:=2 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEEJO +PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz +PKG_MD5SUM:=15e63942c02354426b25f056f2a4467c + +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 0000000..2876646 --- /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_MD5SUM:=d5ef04d1e51fe45743b3044abad967d2 + +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 0000000..3c594d1 --- /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_MD5SUM:=4ad15a9c2cc9b68e3fe1f5cadf9cdb30 + +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 0000000..2069bed --- /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_MD5SUM:=82c698151f934eb28c65d1838cee7d9e + +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 0000000..0a2c737 --- /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_MD5SUM:=aa91bee777f7ed7a18225a84f8795344 + +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 0000000..66ece00 --- /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 0000000..5201894 --- /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 0000000..9365eb4 --- /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 0000000..7d43e73 --- /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 0000000..3fce75a --- /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 0000000..55e5cc3 --- /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 0000000..54071dc --- /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_MD5SUM:=fcfdb8e4ee34bcf62aed429b4a23db27 + +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 0000000..19a6938 --- /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_MD5SUM:=83f636b477741f3a014585bb9cc079a6 + +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 0000000..d107d70 --- /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_MD5SUM:=37fb7fa72ce7184516dd022aba62f524 + +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 0000000..d412a1f --- /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_MD5SUM:=fa6c2680207ed4fef5ea2ef09c210614 + +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 0000000..e977217 --- /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_MD5SUM:=eb7505e5f626913350df9dd4a03d54a8 + +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 0000000..4bcd10c --- /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_MD5SUM:=d2bfa18fe1904df7f683e96611e87437 + +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 0000000..d1b4ac9 --- /dev/null +++ b/lang/perl-html-tree/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-html-tree +PKG_VERSION:=3.23 +PKG_RELEASE:=4 +PKG_MD5SUM:=6352f50be402301f79b580dd235d7762 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/P/PE/PETEK/ +PKG_SOURCE:=HTML-Tree-$(PKG_VERSION).tar.gz +PKG_MD5SUM:=6352f50be402301f79b580dd235d7762 + +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 0000000..329767a --- /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_MD5SUM:=ecfd0eeb88512033352c2f13c9580f03 + +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 0000000..178573d --- /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_MD5SUM:=ed0ae02d25d7f1e89456d4d69732adc2 + +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 0000000..bf0bd40 --- /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_MD5SUM:=52b7a0d5982d61be1edb217751d7daba + +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 0000000..2b90e2a --- /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_MD5SUM:=4ed7add10daea3ab30abfeab6d03872f + +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 0000000..a72893a --- /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_MD5SUM:=1236195250e264d7436e7bb02031671b + +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 0000000..9a41da6 --- /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_MD5SUM:=ef736daddc7a32a29207fa4ed5f5d62e + +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 0000000..52826d2 --- /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.76 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/I/IN/INGY +PKG_SOURCE:=Inline-C-$(PKG_VERSION).tar.gz +PKG_MD5SUM:=c0fbfdd058075c9271a1384c822c9a87 + +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-extutils +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 0000000..dcfe2bb --- /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 0000000..b2ae09e --- /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 0000000..a120705 --- /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_MD5SUM:=510bbac46e727bcaf240b7feac2646c9 + +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 0000000..9390c36 --- /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_MD5SUM:=3f8958718844dc96b9f6946f21d70d22 + +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 0000000..b81e678 --- /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_MD5SUM:=4421283b4f32549e5299963734170044 + +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 0000000..6985431 --- /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_MD5SUM:=8c5f25fb64b974d22aff424476ba13c9 + +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 0000000..058ac16 --- /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_MD5SUM:=3d84d17f64c7316d69e7eb7b4e292b9a + +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 0000000..c915064 --- /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_MD5SUM:=d2514080116c1b0fa5f96295c84538e3 + +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 0000000..bbeff7b --- /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_MD5SUM:=98f582240556a4a92e5d57e480f9d39d + +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 0000000..266bce4 --- /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_MD5SUM:=5d0752dbfa94d0c91b25a264f47f5675 + +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 0000000..0c14e85 --- /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_MD5SUM:=4c8d9c77e8e06ca96c7383c05c8f3616 + +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 0000000..995e1ba --- /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_MD5SUM:=8306b998a96d2cc69266b5248d550472 + +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-uri/Makefile b/lang/perl-uri/Makefile new file mode 100644 index 0000000..18667fc --- /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.71 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/ +PKG_SOURCE:=URI-$(PKG_VERSION).tar.gz +PKG_MD5SUM:=247c3da29a794f72730e01aa5a715daf + +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 0000000..1e424cb --- /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_MD5SUM:=997ac81cd6b03b30b36f7cd930474845 + +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 0000000..568b65c --- /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 0000000..34221c0 --- /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 0000000..f51eaf5 --- /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 0000000..93d6be2 --- /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_MD5SUM:=9a4b9c8827f519908ef0a0d2b8ae96fa + +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 0000000..c28b8c2 --- /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_MD5SUM:=b7186e8b8b3701e70c22abf430742403 + +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 0000000..86bf15b --- /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_MD5SUM:=6888c9d8728cd6f3ea3c9754461c9f94 + +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 0000000..57977c1 --- /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_MD5SUM:=af4813fe3952362451201ced6fbce379 + +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 0000000..e2aad83 --- /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 0000000..4e17daa --- /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 0000000..65a3a47 --- /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 0000000..d3cb081 --- /dev/null +++ b/lang/perl/Makefile @@ -0,0 +1,185 @@ +# +# 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:=perl +PKG_VERSION:=5.22.1 +PKG_RELEASE:=4 + +PKG_SOURCE_URL:=ftp://ftp.cpan.org/pub/CPAN/src/5.0 \ + http://www.cpan.org/src/5.0 \ + ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/src/5.0 \ + http://ftp.mpi-sb.mpg.de/pub/perl/CPAN/src/5.0 \ + ftp://ftp.gmd.de/mirrors/CPAN/src/5.0 \ + http://ftp5.gwdg.de/pub/languages/perl/CPAN/src/ \ + ftp://ftp.funet.fi/pub/languages/perl/CPAN/src/5.0 \ + http://ftp.funet.fi/pub/languages/perl/CPAN/src/5.0 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MD5SUM:=19295bbb775a3c36123161b9bf4892f1 + +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='-rdynamic $(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 0000000..5f3b595 --- /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 0000000..16bf058 --- /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/architecture.config b/lang/perl/files/architecture.config new file mode 100644 index 0000000..cc97281 --- /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 0000000..75fe254 --- /dev/null +++ b/lang/perl/files/arm.config @@ -0,0 +1,19 @@ +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_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 0000000..081300c --- /dev/null +++ b/lang/perl/files/armeb.config @@ -0,0 +1,19 @@ +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_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 0000000..edc3bd4 --- /dev/null +++ b/lang/perl/files/base.config @@ -0,0 +1,1005 @@ +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_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_choose_expr='define' +d_builtin_expect='undef' +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_drand48proto='define' +d_dup2='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_fchown='define' +d_fcntl='define' +d_fcntl_can_lock='define' +d_fd_macros='define' +d_fd_set='define' +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_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_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_llrint='define' +d_llrintl='define' +d_llround='define' +d_llroundl='define' +d_localtime64='undef' +d_locconv='define' +d_lockf='define' +d_log1p='define' +d_log2='define' +d_logb='define' +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_mbstowcs='define' +d_mbtowc='define' +d_memchr='define' +d_memcmp='define' +d_memcpy='define' +d_memmove='define' +d_memset='define' +d_mkdir='define' +d_mkdtemp='define' +d_mkfifo='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_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_pathconf='define' +d_pause='define' +d_perl_otherlibdirs='undef' +d_phostname='undef' +d_pipe='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_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_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_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_strftime='define' +d_strlcat='define' +d_strlcpy='define' +d_strtod='define' +d_strtol='define' +d_strtold='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_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_unordered='undef' +d_unsetenv='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='' +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' +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="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $owrt:cflags" +ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' +ccdlflags="-fPIC -Wl,-rpath,$owrt:perllibpath/CORE" +cccdlflags='-fPIC' +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 0000000..b44c64e --- /dev/null +++ b/lang/perl/files/i486.config @@ -0,0 +1,28 @@ +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_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 0000000..93d190c --- /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 0000000..05e807b --- /dev/null +++ b/lang/perl/files/mips.config @@ -0,0 +1,19 @@ +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_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 0000000..89875f7 --- /dev/null +++ b/lang/perl/files/mips64.config @@ -0,0 +1,19 @@ +owrt:arch=mips64 +owrt:bits=64 +owrt:endian=big + +ccsymbols='' +cppccsymbols='' +cppsymbols='' +d_casti32='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 0000000..d209a0d --- /dev/null +++ b/lang/perl/files/mipsel.config @@ -0,0 +1,19 @@ +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_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 0000000..3e8f6bd --- /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 0000000..bf83c0a --- /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 0000000..f169980 --- /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 0000000..33af767 --- /dev/null +++ b/lang/perl/files/powerpc.config @@ -0,0 +1,19 @@ +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_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 0000000..183d3b9 --- /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 0000000..e0a2f82 --- /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 0000000..98cd2a5 --- /dev/null +++ b/lang/perl/files/version.config @@ -0,0 +1,38 @@ +# Set the version here +PERL_REVISION=5 +PERL_VERSION=22 +PERL_SUBVERSION=1 + +# (api_revison, api_version, api_subversion) = (revision, version, 0) usually +PERL_API_REVISION=5 +PERL_API_VERSION=22 +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 0000000..a9cb581 --- /dev/null +++ b/lang/perl/files/x86_64.config @@ -0,0 +1,28 @@ +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_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 0000000..8dbad78 --- /dev/null +++ b/lang/perl/patches/010-musl-compat.patch @@ -0,0 +1,11 @@ +--- a/pp.c ++++ b/pp.c +@@ -43,7 +43,7 @@ extern Pid_t getpid (void); + * Some BSDs and Cygwin default to POSIX math instead of IEEE. + * This switches them over to IEEE. + */ +-#if defined(LIBM_LIB_VERSION) ++#if defined(LIBM_LIB_VERSION) && (defined(__GLIBC__) || defined(__UCLIBC__)) + _LIB_VERSION_TYPE _LIB_VERSION = _IEEE_; + #endif + diff --git a/lang/perl/patches/020-host-libc-dir-moved-debian+derivatives.patch b/lang/perl/patches/020-host-libc-dir-moved-debian+derivatives.patch new file mode 100644 index 0000000..956466d --- /dev/null +++ b/lang/perl/patches/020-host-libc-dir-moved-debian+derivatives.patch @@ -0,0 +1,27 @@ +--- a/hints/linux.sh ++++ b/hints/linux.sh +@@ -221,6 +221,24 @@ case "$libc" in + ;; + esac + ++# Ubuntu 11.04 (and later, presumably) doesn't keep most libraries ++# (such as -lm) in /lib or /usr/lib. So we have to ask gcc to tell us ++# where to look. We don't want gcc's own libraries, however, so we ++# filter those out. ++# This could be conditional on Unbuntu, but other distributions may ++# follow suit, and this scheme seems to work even on rather old gcc's. ++# This unconditionally uses gcc because even if the user is using another ++# compiler, we still need to find the math library and friends, and I don't ++# know how other compilers will cope with that situation. ++# Still, as an escape hatch, allow Configure command line overrides to ++# plibpth to bypass this check. ++case "$plibpth" in ++'') plibpth=`gcc -print-search-dirs | grep libraries | ++ cut -f2- -d= | tr ':' $trnl | grep -v 'gcc'` ++ plibpth="$plibpth" # Collapse all entries on one line ++ ;; ++esac ++ + # Are we using ELF? Thanks to Kenneth Albanowski + # for this test. + cat >try.c <<'EOM' 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 0000000..e187941 --- /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 0000000..9f9f812 --- /dev/null +++ b/lang/perl/patches/110-always_use_miniperl.patch @@ -0,0 +1,27 @@ +--- a/Makefile.SH ++++ b/Makefile.SH +@@ -316,22 +316,11 @@ MANIFEST_SRT = MANIFEST.srt + + !GROK!THIS! + +-case "$usecrosscompile$perl" in +-define?*) +- $spitshell >>$Makefile <>$Makefile <>$Makefile <>$Makefile < "relink"); diff --git a/lang/perl/patches/310-recompile-hack.patch b/lang/perl/patches/310-recompile-hack.patch new file mode 100644 index 0000000..05a8e9b --- /dev/null +++ b/lang/perl/patches/310-recompile-hack.patch @@ -0,0 +1,16 @@ +perl: Work around recompile failures + +Apparently, recompiling/relinking fails under some circumstances. This +patch has been reported to work around that issue. + +--- a/Makefile.SH ++++ b/Makefile.SH +@@ -818,7 +818,7 @@ $(LIBPERL): $& $(obj) $(DYNALOADER) $(LI + true) + $spitshell >>$Makefile <<'!NO!SUBS!' + rm -f $@ +- $(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs) ++ $(CC) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs) + !NO!SUBS! + case "$osname" in + aix) diff --git a/lang/perl/patches/700-tie_fetch_count_t-handle_missing_crypt.patch b/lang/perl/patches/700-tie_fetch_count_t-handle_missing_crypt.patch new file mode 100644 index 0000000..f90e5d9 --- /dev/null +++ b/lang/perl/patches/700-tie_fetch_count_t-handle_missing_crypt.patch @@ -0,0 +1,26 @@ +--- a/t/op/tie_fetch_count.t ++++ b/t/op/tie_fetch_count.t +@@ -250,12 +250,17 @@ for ([chdir=>''],[chmod=>'0,'],[chown=>' + check_count "$op $args\\\$tied_glob$postargs"; + } + +-$dummy = crypt $var,0; check_count 'crypt $tied, ...'; +-$dummy = crypt 0,$var; check_count 'crypt ..., $tied'; +-$var = substr(chr 256,0,0); +-$dummy = crypt $var,0; check_count 'crypt $tied_utf8, ...'; +-$var = substr(chr 256,0,0); +-$dummy = crypt 0,$var; check_count 'crypt ..., $tied_utf8'; ++SKIP: { ++ use Config; ++ skip "crypt() is unavailable", 4, unless defined $Config{'d_crypt'}; ++ ++ $dummy = crypt $var,0; check_count 'crypt $tied, ...'; ++ $dummy = crypt 0,$var; check_count 'crypt ..., $tied'; ++ $var = substr(chr 256,0,0); ++ $dummy = crypt $var,0; check_count 'crypt $tied_utf8, ...'; ++ $var = substr(chr 256,0,0); ++ $dummy = crypt 0,$var; check_count 'crypt ..., $tied_utf8'; ++} + + SKIP: + { 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 0000000..e60ee8c --- /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-CVE-2015-8607.patch b/lang/perl/patches/900-CVE-2015-8607.patch new file mode 100644 index 0000000..5f1c1cb --- /dev/null +++ b/lang/perl/patches/900-CVE-2015-8607.patch @@ -0,0 +1,57 @@ +From b6307f728a4f842a54ea96959e386c7daa92ece1 Mon Sep 17 00:00:00 2001 +From: Tony Cook +Date: Tue, 15 Dec 2015 10:56:54 +1100 +Subject: [perl #126862] ensure File::Spec::canonpath() preserves taint + +Previously the unix specific XS implementation of canonpath() would +return an untainted path when supplied a tainted path. + +For the empty string case, newSVpvs() already sets taint as needed on +its result. +--- + dist/PathTools/Cwd.xs | 1 + + dist/PathTools/t/taint.t | 19 ++++++++++++++++++- + 2 files changed, 19 insertions(+), 1 deletion(-) + +--- a/dist/PathTools/Cwd.xs ++++ b/dist/PathTools/Cwd.xs +@@ -535,6 +535,7 @@ THX_unix_canonpath(pTHX_ SV *path) + *o = 0; + SvPOK_on(retval); + SvCUR_set(retval, o - SvPVX(retval)); ++ SvTAINT(retval); + return retval; + } + +--- a/dist/PathTools/t/taint.t ++++ b/dist/PathTools/t/taint.t +@@ -12,7 +12,7 @@ use Test::More; + BEGIN { + plan( + ${^TAINT} +- ? (tests => 17) ++ ? (tests => 21) + : (skip_all => "A perl without taint support") + ); + } +@@ -34,3 +34,20 @@ foreach my $func (@Functions) { + + # Previous versions of Cwd tainted $^O + is !tainted($^O), 1, "\$^O should not be tainted"; ++ ++{ ++ # [perl #126862] canonpath() loses taint ++ my $tainted = substr($ENV{PATH}, 0, 0); ++ # yes, getcwd()'s result should be tainted, and is tested above ++ # but be sure ++ ok tainted(File::Spec->canonpath($tainted . Cwd::getcwd)), ++ "canonpath() keeps taint on non-empty string"; ++ ok tainted(File::Spec->canonpath($tainted)), ++ "canonpath() keeps taint on empty string"; ++ ++ (Cwd::getcwd() =~ /^(.*)/); ++ my $untainted = $1; ++ ok !tainted($untainted), "make sure our untainted value is untainted"; ++ ok !tainted(File::Spec->canonpath($untainted)), ++ "canonpath() doesn't add taint to untainted string"; ++} diff --git a/lang/perl/patches/901-CVE-2016-2381.patch b/lang/perl/patches/901-CVE-2016-2381.patch new file mode 100644 index 0000000..ee5db6c --- /dev/null +++ b/lang/perl/patches/901-CVE-2016-2381.patch @@ -0,0 +1,102 @@ +From: Tony Cook +Date: Wed, 27 Jan 2016 00:52:15 +0000 (+1100) +Subject: remove duplicate environment variables from environ +X-Git-Url: http://perl5.git.perl.org/perl.git/commitdiff_plain/ae37b791a73a9e78dedb89fb2429d2628cf58076 + +remove duplicate environment variables from environ + +If we see duplicate environment variables while iterating over +environ[]: + +a) make sure we use the same value in %ENV that getenv() returns. + +Previously on a duplicate, %ENV would have the last entry for the name +from environ[], but a typical getenv() would return the first entry. + +Rather than assuming all getenv() implementations return the first entry +explicitly call getenv() to ensure they agree. + +b) remove duplicate entries from environ + +Previously if there was a duplicate definition for a name in environ[] +setting that name in %ENV could result in an unsafe value being passed +to a child process, so ensure environ[] has no duplicates. + +CVE-2016-2381 +--- + +--- a/perl.c ++++ b/perl.c +@@ -4298,23 +4298,70 @@ S_init_postdump_symbols(pTHX_ int argc, + } + if (env) { + char *s, *old_var; ++ STRLEN nlen; + SV *sv; ++ HV *dups = newHV(); ++ + for (; *env; env++) { + old_var = *env; + + if (!(s = strchr(old_var,'=')) || s == old_var) + continue; ++ nlen = s - old_var; + + #if defined(MSDOS) && !defined(DJGPP) + *s = '\0'; + (void)strupr(old_var); + *s = '='; + #endif +- sv = newSVpv(s+1, 0); +- (void)hv_store(hv, old_var, s - old_var, sv, 0); ++ if (hv_exists(hv, old_var, nlen)) { ++ const char *name = savepvn(old_var, nlen); ++ ++ /* make sure we use the same value as getenv(), otherwise code that ++ uses getenv() (like setlocale()) might see a different value to %ENV ++ */ ++ sv = newSVpv(PerlEnv_getenv(name), 0); ++ ++ /* keep a count of the dups of this name so we can de-dup environ later */ ++ if (hv_exists(dups, name, nlen)) ++ ++SvIVX(*hv_fetch(dups, name, nlen, 0)); ++ else ++ (void)hv_store(dups, name, nlen, newSViv(1), 0); ++ ++ Safefree(name); ++ } ++ else { ++ sv = newSVpv(s+1, 0); ++ } ++ (void)hv_store(hv, old_var, nlen, sv, 0); + if (env_is_not_environ) + mg_set(sv); + } ++ if (HvKEYS(dups)) { ++ /* environ has some duplicate definitions, remove them */ ++ HE *entry; ++ hv_iterinit(dups); ++ while ((entry = hv_iternext_flags(dups, 0))) { ++ STRLEN nlen; ++ const char *name = HePV(entry, nlen); ++ IV count = SvIV(HeVAL(entry)); ++ IV i; ++ SV **valp = hv_fetch(hv, name, nlen, 0); ++ ++ assert(valp); ++ ++ /* try to remove any duplicate names, depending on the ++ * implementation used in my_setenv() the iteration might ++ * not be necessary, but let's be safe. ++ */ ++ for (i = 0; i < count; ++i) ++ my_setenv(name, 0); ++ ++ /* and set it back to the value we set $ENV{name} to */ ++ my_setenv(name, SvPV_nolen(*valp)); ++ } ++ } ++ SvREFCNT_dec_NN(dups); + } + #endif /* USE_ENVIRON_ARRAY */ + #endif /* !PERL_MICRO */ diff --git a/lang/perl/perlbase.mk b/lang/perl/perlbase.mk new file mode 100644 index 0000000..9ad9d77 --- /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 0000000..be56608 --- /dev/null +++ b/lang/perl/perlmod.mk @@ -0,0 +1,166 @@ +# This makefile simplifies perl module builds. +# + +PERL_VERSION:=5.22 + +# 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_VERSION).0 + +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)); \ + PERL_MM_USE_DEFAULT=1 \ + $(2) \ + $(PERL_CMD) -MConfig -e '$$$${tied %Config::Config}{cpprun}="$(GNU_TARGET_NAME)-cpp -E"; do "Makefile.PL"' \ + $(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 's!^PERL_INC = .*!PERL_INC = $(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)/CORE/!' -i $(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/php7-pecl-dio/Makefile b/lang/php7-pecl-dio/Makefile new file mode 100644 index 0000000..9c1d52e --- /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.0.9 +PKG_RELEASE:=1 +PKG_MD5SUM:=2c80b63fbbbaead856cb468955c14dc328d1262621b0c704b122d902053c8156 + +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 0000000..be9267a --- /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:=2 +PKG_MD5SUM:=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 +libidn +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.old/100_config9-m4.patch b/lang/php7-pecl-http/patches.old/100_config9-m4.patch new file mode 100644 index 0000000..304a1df --- /dev/null +++ b/lang/php7-pecl-http/patches.old/100_config9-m4.patch @@ -0,0 +1,22 @@ +--- a/config9.m4 2016-09-08 21:39:18.000000000 +0200 ++++ b/config9.m4 2016-09-08 21:42:35.066903251 +0200 +@@ -71,18 +71,7 @@ + extname=$1 + haveext=$[PHP_]translit($1,a-z_-,A-Z__) + AC_MSG_CHECKING([for ext/$extname support]) +- if test -x "$PHP_EXECUTABLE"; then +- grepext=`$PHP_EXECUTABLE -m | $EGREP ^$extname\$` +- if test "$grepext" = "$extname"; then +- [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=1 +- AC_MSG_RESULT([yes]) +- $2 +- else +- [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)= +- AC_MSG_RESULT([no]) +- $3 +- fi +- elif test "$haveext" != "no" && test "x$haveext" != "x"; then ++ if test "$haveext" != "no" && test "x$haveext" != "x"; then + [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=1 + AC_MSG_RESULT([yes]) + $2 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 0000000..ee925c4 --- /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-libevent/Makefile b/lang/php7-pecl-libevent/Makefile new file mode 100644 index 0000000..272b34a --- /dev/null +++ b/lang/php7-pecl-libevent/Makefile @@ -0,0 +1,38 @@ +# +# 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=2016-08-30-$(PKG_SOURCE_VERSION) +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/expressif/pecl-event-libevent.git +PKG_SOURCE_VERSION:=9e72744ce6224beafc7b54ce2a3a990f1c552a5a +PKG_SOURCE_SUBDIR:=$(PECL_NAME)-$(PKG_SOURCE_VERSION) +PKG_SOURCE:=$(PECL_NAME)-$(PKG_SOURCE_VERSION).tar.gz + +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 0000000..961fb36 --- /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 0000000..3bfe535 --- /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.0.1 +PKG_RELEASE:=2 +PKG_MD5SUM:=19f9517210a87e18cc09faed262e1522 + +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 0000000..4ce09f9 --- /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_MD5SUM:=bc465eb5caa9d0f09cced121a8ac2e8e + +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 0000000..6cd2beb --- /dev/null +++ b/lang/php7/Makefile @@ -0,0 +1,594 @@ +# +# 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.1.1 +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_MD5SUM:=65eef256f6e7104a05361939f5e23ada +PKG_HASH:=b3565b0c1441064eba204821608df1ec7367abff881286898d900c2c2a5ffe70 + +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 intl \ + json \ + ldap \ + mbstring mcrypt mysqli \ + opcache openssl \ + pcntl pdo pdo-mysql pdo-pgsql pdo-sqlite pgsql phar \ + session shmop simplexml 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 + +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 + + 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 + select PACKAGE_zoneinfo-core + 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 +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+= +php7-cgi + 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 + +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 \ + \ + --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 \ + --without-freetype-dir \ + --with-jpeg-dir="$(STAGING_DIR)/usr" \ + --with-png-dir="$(STAGING_DIR)/usr" \ + --without-xpm-dir \ + --without-t1lib \ + --enable-gd-native-ttf \ + --disable-gd-jis-conv +else + CONFIGURE_ARGS+= --without-gd +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-intl),) + CONFIGURE_ARGS+= --enable-intl=shared +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-mcrypt),) + CONFIGURE_ARGS+= --with-mcrypt=shared,"$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --without-mcrypt +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-mysqli),) + CONFIGURE_ARGS+= --with-mysqli=shared,"$(STAGING_DIR)/usr/bin/mysql_config" +else + CONFIGURE_ARGS+= --without-mysqli +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),) + 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,"$(STAGING_DIR)/usr" + 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-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" \ + +define Package/php7/conffiles +/etc/php.ini +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 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)) +$(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,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,mcrypt,Mcrypt,+PACKAGE_php7-mod-mcrypt:libmcrypt +PACKAGE_php7-mod-mcrypt:libltdl)) +$(eval $(call BuildModule,mysqli,MySQL Improved Extension,+PACKAGE_php7-mod-mysqli:libmysqlclient)) +$(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:libmysqlclient)) +$(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,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 0000000..c88ab0a --- /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 0000000..22e9998 --- /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 0000000..21f5b09 --- /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 0000000..d3a3222 --- /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 0000000..c980b21 --- /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 0000000..3a893c6 --- /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 0000000..c913a2b --- /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 0000000..819ad1e --- /dev/null +++ b/lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch @@ -0,0 +1,684 @@ +From: Joe Orton +Date: Thu, 20 Oct 2016 11:44:14 +0200 +Subject: Add support for use of the system timezone database + +Add support for use of the system timezone database, rather +than embedding a copy. Discussed upstream but was not desired. + +History: +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 +--- + ext/date/lib/parse_tz.c | 560 +++++++++++++++++++++++++++++++++++++++++++++++- + ext/date/lib/timelib.m4 | 13 ++ + 2 files changed, 562 insertions(+), 11 deletions(-) + +diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c +index 20d7eea..ed7717e 100644 +--- a/ext/date/lib/parse_tz.c ++++ b/ext/date/lib/parse_tz.c +@@ -24,6 +24,16 @@ + + #include "timelib.h" + ++#ifdef HAVE_SYSTEM_TZDATA ++#include ++#include ++#include ++#include ++#include ++ ++#include "php_scandir.h" ++#endif ++ + #include + + #ifdef HAVE_LOCALE_H +@@ -36,8 +46,12 @@ + #include + #endif + ++#ifndef HAVE_SYSTEM_TZDATA + #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__) +@@ -59,6 +73,11 @@ static int read_preamble(const unsigned char **tzf, timelib_tzinfo *tz) + { + uint32_t version; + ++ if (memcmp(*tzf, "TZif", 4) == 0) { ++ *tzf += 20; ++ return 0; ++ } ++ + /* read ID */ + version = (*tzf)[3] - '0'; + *tzf += 4; +@@ -302,7 +321,429 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz) + } + } + +-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 +@@ -341,21 +782,88 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const + 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_builtin_identifiers_list(int *count) + { ++#ifdef HAVE_SYSTEM_TZDATA ++ *count = timezonedb_system->index_size; ++ return timezonedb_system->index; ++#else + *count = sizeof(timezonedb_idx_builtin) / sizeof(*timezonedb_idx_builtin); + return timezonedb_idx_builtin; ++#endif + } + + 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 void skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz) +@@ -380,24 +888,54 @@ static void read_64bit_header(const unsigned char **tzf, timelib_tzinfo *tz) + timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb) + { + const unsigned char *tzf; ++ char *memmap = NULL; ++ size_t maplen; + timelib_tzinfo *tmp; + int version; + +- 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); + read_header(&tzf, tmp); + read_transistions(&tzf, tmp); + read_types(&tzf, tmp); +- if (version == 2) { +- skip_64bit_preamble(&tzf, tmp); +- read_64bit_header(&tzf, tmp); +- skip_64bit_transistions(&tzf, tmp); +- skip_64bit_types(&tzf, tmp); +- skip_posix_string(&tzf, tmp); +- } +- read_location(&tzf, tmp); ++ ++#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 { ++ strcpy(tmp->location.country_code, "??"); ++ tmp->bc = 0; ++ tmp->location.comments = timelib_strdup(""); ++ } ++ ++ /* Now done with the mmap segment - discard it. */ ++ munmap(memmap, maplen); ++ } else ++#endif ++ { ++ /* PHP-style - use the embedded info. */ ++ if (version == 2) { ++ skip_64bit_preamble(&tzf, tmp); ++ read_64bit_header(&tzf, tmp); ++ skip_64bit_transistions(&tzf, tmp); ++ skip_64bit_types(&tzf, tmp); ++ skip_posix_string(&tzf, tmp); ++ } ++ read_location(&tzf, tmp); ++ } + } else { + tmp = NULL; + } +diff --git a/ext/date/lib/timelib.m4 b/ext/date/lib/timelib.m4 +index 99bf9fa..4bf7e46 100644 +--- a/ext/date/lib/timelib.m4 ++++ b/ext/date/lib/timelib.m4 +@@ -78,3 +78,16 @@ stdlib.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 0000000..32de557 --- /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 0000000..efa1fc7 --- /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 0000000..0a10afa --- /dev/null +++ b/lang/php7/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch @@ -0,0 +1,114 @@ +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(-) + +diff --git a/ext/standard/info.c b/ext/standard/info.c +index e74d6b4..883fbdf 100644 +--- a/ext/standard/info.c ++++ b/ext/standard/info.c +@@ -865,7 +865,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 +diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4 +index f286b1a..fba92b8 100644 +--- a/sapi/apache2handler/config.m4 ++++ b/sapi/apache2handler/config.m4 +@@ -59,18 +59,9 @@ if test "$PHP_APXS2" != "no"; then + APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APR_CFLAGS $APU_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" + + 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*) +diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c +index 0b6deb1..bb9014a 100644 +--- a/sapi/cgi/cgi_main.c ++++ b/sapi/cgi/cgi_main.c +@@ -2342,9 +2342,9 @@ consult the installation file that came with this distribution, or visit \n\ + SG(request_info).no_headers = 1; + } + #if ZEND_DEBUG +- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2017 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-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); + #endif + php_request_shutdown((void *) 0); + fcgi_shutdown(); +diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c +index dc92045..bb28364 100644 +--- a/sapi/cli/php_cli.c ++++ b/sapi/cli/php_cli.c +@@ -690,8 +690,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-2017 The PHP Group\n%s", +- PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__, ++ php_printf("PHP %s (%s) ( %s)\nCopyright (c) 1997-2017 The PHP Group\n%s", ++ PHP_VERSION, cli_sapi_module.name, + #if ZTS + "ZTS " + #else +diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c +index 6768113..545c52e 100644 +--- a/sapi/fpm/fpm/fpm_main.c ++++ b/sapi/fpm/fpm/fpm_main.c +@@ -1756,9 +1756,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-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2017 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-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); + #endif + php_request_shutdown((void *) 0); + fcgi_shutdown(); +diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c +index b47c7c8..ab94bba 100644 +--- a/sapi/phpdbg/phpdbg.c ++++ b/sapi/phpdbg/phpdbg.c +@@ -1699,10 +1699,8 @@ phpdbg_main: + phpdbg_do_help_cmd(exec); + } else if (show_version) { + phpdbg_out( +- "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2017 The PHP Group\n%s", ++ "phpdbg %s\nPHP %s, Copyright (c) 1997-2017 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 0000000..78f7dca --- /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 +- +-

+