summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/fastjar/APKBUILD51
-rw-r--r--user/fastjar/efficiency.patch104
-rw-r--r--user/fastjar/null-terminate.patch14
-rw-r--r--user/fastjar/write-return.patch15
-rw-r--r--user/gpgme/1.12.0-fix-t-tofuinfo.patch100
-rw-r--r--user/gpgme/APKBUILD27
-rw-r--r--user/java-cacerts/APKBUILD24
-rw-r--r--user/java-cacerts/java-cacerts3
-rw-r--r--user/java-common/APKBUILD22
-rw-r--r--user/java-common/java-common.trigger13
-rw-r--r--user/java-gcj-compat/APKBUILD65
-rw-r--r--user/libxp/APKBUILD38
-rw-r--r--user/lksctp-tools/APKBUILD38
-rw-r--r--user/lzo/APKBUILD41
-rw-r--r--user/lzop/APKBUILD38
-rw-r--r--user/netqmail/APKBUILD4
-rw-r--r--user/openjdk7/APKBUILD286
-rw-r--r--user/openjdk7/icedtea-cpio.patch11
-rw-r--r--user/openjdk7/icedtea-hotspot-musl-ppc.patch169
-rw-r--r--user/openjdk7/icedtea-hotspot-musl.patch79
-rw-r--r--user/openjdk7/icedtea-hotspot-noagent-musl.patch54
-rw-r--r--user/openjdk7/icedtea-hotspot-uclibc-fixes.patch93
-rw-r--r--user/openjdk7/icedtea-jdk-execinfo.patch40
-rw-r--r--user/openjdk7/icedtea-jdk-fix-build.patch56
-rw-r--r--user/openjdk7/icedtea-jdk-fix-ipv6-init.patch42
-rw-r--r--user/openjdk7/icedtea-jdk-musl.patch116
-rw-r--r--user/openjdk7/icedtea-jdk-no-lib-nsl-uclibc.patch84
-rw-r--r--user/openjdk7/icedtea-jdk-no-soname.patch12
-rw-r--r--user/openjdk7/icedtea-remove-gawk.patch22
-rw-r--r--user/openjdk7/icedtea-tar.patch22
-rw-r--r--user/openjdk7/icedtea-xattr.patch11
-rw-r--r--user/openjdk7/remove-gawk.patch125
-rw-r--r--user/openjdk7/xattr.patch11
-rw-r--r--user/perl-test-differences/APKBUILD4
-rw-r--r--user/s6-dns/APKBUILD48
-rw-r--r--user/s6-networking/APKBUILD46
-rw-r--r--user/xorgproto/APKBUILD12
-rw-r--r--user/xorgproto/xprint.patch424
38 files changed, 2249 insertions, 115 deletions
diff --git a/user/fastjar/APKBUILD b/user/fastjar/APKBUILD
new file mode 100644
index 000000000..b821b2419
--- /dev/null
+++ b/user/fastjar/APKBUILD
@@ -0,0 +1,51 @@
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=fastjar
+pkgver=0.98
+pkgrel=0
+pkgdesc="Java archiver tool, tuned for performance"
+url="https://savannah.nongnu.org/projects/fastjar/"
+arch="all"
+license="GPL-2.0+ AND LGPL-2.0+"
+depends=""
+makedepends="zlib-dev"
+subpackages="$pkgname-doc"
+source="https://download.savannah.nongnu.org/releases/fastjar/fastjar-$pkgver.tar.gz
+ null-terminate.patch
+ write-return.patch
+ efficiency.patch
+ "
+
+prepare() {
+ cd "$builddir"
+ default_prepare
+ update_config_sub
+}
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var
+ make
+}
+
+check() {
+ cd "$builddir"
+ make check
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+ rm -f "$pkgdir"/usr/lib/charset.alias
+}
+
+sha512sums="c0f9fca7b58d6acd00b90a5184dbde9ba3ffc5bf4d69512743e450649a272baf1f6af98b15d79d2b53990eaf84ef402c986035e6b615a19e35ed424348143903 fastjar-0.98.tar.gz
+073c4fcc780588f146f2970f8718dbd70597ce46be8429b86d989056811bd331e209edf90e49d9ed8507e518fd7d7f57a76749f36eb308c12f9a74c7ab10beca null-terminate.patch
+061c9ca0a13136b5eacef453822f71b8dc27f7501e2bbf5243785c147800f5793cffa6d1998dce0c12ce12fd892f3f0f03c06350e50621b5782dfb9a16c375ae write-return.patch
+16584ebe2bc104c2489ee8ff0f0aca471dc0d95c79b199fc463d6bdd6fe99425d583948ebb7e9aab775dffbffdea3babbd824df5debdbd445f559e1334815583 efficiency.patch"
diff --git a/user/fastjar/efficiency.patch b/user/fastjar/efficiency.patch
new file mode 100644
index 000000000..54c471e25
--- /dev/null
+++ b/user/fastjar/efficiency.patch
@@ -0,0 +1,104 @@
+From: Jakub Jelinek <jakub@redhat.com>
+Date: Thu, 10 Jun 2010 11:32:48 +0000
+Subject: [PATCH] jartool.c (extract_jar)
+
+Fix up checks for traversal to parent directories, disallow absolute
+paths, make the code slightly more efficient.
+
+Author: Dan Rosenberg <dan.j.rosenberg@gmail.com>
+
+--- a/jartool.c 2010/06/10 08:46:10 1.61
++++ b/jartool.c 2010/06/10 11:32:48 1.62
+@@ -1731,7 +1731,17 @@
+ struct stat sbuf;
+ int depth = 0;
+
+- tmp_buff = malloc(sizeof(char) * strlen((const char *)filename));
++ if(*filename == '/'){
++ fprintf(stderr, "Absolute path names are not allowed.\n");
++ exit(EXIT_FAILURE);
++ }
++
++ tmp_buff = malloc(strlen((const char *)filename));
++
++ if(tmp_buff == NULL) {
++ fprintf(stderr, "Out of memory.\n");
++ exit(EXIT_FAILURE);
++ }
+
+ for(;;){
+ const ub1 *idx = (const unsigned char *)strchr((const char *)start, '/');
+@@ -1739,25 +1749,28 @@
+ if(idx == NULL)
+ break;
+ else if(idx == start){
++ tmp_buff[idx - filename] = '/';
+ start++;
+ continue;
+ }
+- start = idx + 1;
+
+- strncpy(tmp_buff, (const char *)filename, (idx - filename));
+- tmp_buff[(idx - filename)] = '\0';
++ memcpy(tmp_buff + (start - filename), (const char *)start, (idx - start));
++ tmp_buff[idx - filename] = '\0';
+
+ #ifdef DEBUG
+ printf("checking the existance of %s\n", tmp_buff);
+ #endif
+- if(strcmp(tmp_buff, "..") == 0){
++ if(idx - start == 2 && memcmp(start, "..", 2) == 0){
+ --depth;
+ if (depth < 0){
+ fprintf(stderr, "Traversal to parent directories during unpacking!\n");
+ exit(EXIT_FAILURE);
+ }
+- } else if (strcmp(tmp_buff, ".") != 0)
++ } else if (idx - start != 1 || *start != '.')
+ ++depth;
++
++ start = idx + 1;
++
+ if(stat(tmp_buff, &sbuf) < 0){
+ if(errno != ENOENT)
+ exit_on_error("stat");
+@@ -1766,6 +1779,7 @@
+ #ifdef DEBUG
+ printf("Directory exists\n");
+ #endif
++ tmp_buff[idx - filename] = '/';
+ continue;
+ }else {
+ fprintf(stderr, "Hmmm.. %s exists but isn't a directory!\n",
+@@ -1782,10 +1796,11 @@
+ if(verbose && handle)
+ printf("%10s: %s/\n", "created", tmp_buff);
+
++ tmp_buff[idx - filename] = '/';
+ }
+
+ /* only a directory */
+- if(strlen((const char *)start) == 0)
++ if(*start == '\0')
+ dir = TRUE;
+
+ #ifdef DEBUG
+@@ -1793,7 +1808,7 @@
+ #endif
+
+ /* If the entry was just a directory, don't write to file, etc */
+- if(strlen((const char *)start) == 0)
++ if(*start == '\0')
+ f_fd = -1;
+
+ free(tmp_buff);
+@@ -1877,7 +1892,8 @@
+ exit(EXIT_FAILURE);
+ }
+
+- close(f_fd);
++ if (f_fd != -1)
++ close(f_fd);
+
+ if(verbose && dir == FALSE && handle)
+ printf("%10s: %s\n",
diff --git a/user/fastjar/null-terminate.patch b/user/fastjar/null-terminate.patch
new file mode 100644
index 000000000..d9aad6ca2
--- /dev/null
+++ b/user/fastjar/null-terminate.patch
@@ -0,0 +1,14 @@
+From: Richard Guenther <rguenther@suse.de>
+Date: Mon, 01 Mar 2010 15:38:43 +0000
+Subject: [PATCH] jartool.c (read_entries): Properly zero-terminate filename.
+
+--- a/jartool.c 2009/09/06 22:16:00 1.59
++++ b/jartool.c 2010/03/01 15:38:43 1.60
+@@ -790,6 +790,7 @@
+ progname, jarfile);
+ return 1;
+ }
++ ze->filename[len] = '\0';
+ len = UNPACK_UB4(header, CEN_EFLEN);
+ len += UNPACK_UB4(header, CEN_COMLEN);
+ if (lseek (fd, len, SEEK_CUR) == -1)
diff --git a/user/fastjar/write-return.patch b/user/fastjar/write-return.patch
new file mode 100644
index 000000000..795179fcd
--- /dev/null
+++ b/user/fastjar/write-return.patch
@@ -0,0 +1,15 @@
+From: Chris Ball <cjb@laptop.org>
+Date: Thu, 10 Jun 2010 08:46:10 +0000
+Subject: [PATCH] jartool.c (add_file_to_jar): Fix write return value check.
+
+--- a/jartool.c 2010/03/01 15:38:43 1.60
++++ b/jartool.c 2010/06/10 08:46:10 1.61
+@@ -1258,7 +1258,7 @@
+ exit_on_error("write");
+
+ /* write the file name to the zip file */
+- if (1 == write(jfd, fname, file_name_length))
++ if (-1 == write(jfd, fname, file_name_length))
+ exit_on_error("write");
+
+ if(verbose){
diff --git a/user/gpgme/1.12.0-fix-t-tofuinfo.patch b/user/gpgme/1.12.0-fix-t-tofuinfo.patch
new file mode 100644
index 000000000..74ba11050
--- /dev/null
+++ b/user/gpgme/1.12.0-fix-t-tofuinfo.patch
@@ -0,0 +1,100 @@
+From 66376f3e206a1aa791d712fb8577bb3490268f60 Mon Sep 17 00:00:00 2001
+From: Andre Heinecke <aheinecke@gnupg.org>
+Date: Wed, 9 Jan 2019 08:25:21 +0100
+Subject: [PATCH] qt: Use tofu conflict test keys without expiry
+
+* lang/qt/tests/t-tofuinfo.cpp: Use new test keys without
+expiry.
+
+--
+The old keys expired on 2019-01-06.
+
+GnuPG-Bug-Id: T3815
+---
+ lang/qt/tests/t-tofuinfo.cpp | 58 +++++++++++++++++++-----------------
+ 1 file changed, 30 insertions(+), 28 deletions(-)
+
+diff --git a/lang/qt/tests/t-tofuinfo.cpp b/lang/qt/tests/t-tofuinfo.cpp
+index b7161028..2d881069 100644
+--- a/lang/qt/tests/t-tofuinfo.cpp
++++ b/lang/qt/tests/t-tofuinfo.cpp
+@@ -69,46 +69,48 @@ static const char testMsg1[] =
+
+ static const char conflictKey1[] = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
+ "\n"
+-"mDMEWG+w/hYJKwYBBAHaRw8BAQdAiq1oStvDYg8ZfFs5DgisYJo8dJxD+C/AA21O\n"
+-"K/aif0O0GXRvZnVfY29uZmxpY3RAZXhhbXBsZS5jb22IlgQTFggAPhYhBHoJBLaV\n"
+-"DamYAgoa1L5BwMOl/x88BQJYb7D+AhsDBQkDwmcABQsJCAcCBhUICQoLAgQWAgMB\n"
+-"Ah4BAheAAAoJEL5BwMOl/x88GvwA/0SxkbLyAcshGm2PRrPsFQsSVAfwaSYFVmS2\n"
+-"cMVIw1PfAQDclRH1Z4MpufK07ju4qI33o4s0UFpVRBuSxt7A4P2ZD7g4BFhvsP4S\n"
+-"CisGAQQBl1UBBQEBB0AmVrgaDNJ7K2BSalsRo2EkRJjHGqnp5bBB0tapnF81CQMB\n"
+-"CAeIeAQYFggAIBYhBHoJBLaVDamYAgoa1L5BwMOl/x88BQJYb7D+AhsMAAoJEL5B\n"
+-"wMOl/x88OR0BAMq4/vmJUORRTmzjHcv/DDrQB030DSq666rlckGIKTShAPoDXM9N\n"
+-"0gZK+YzvrinSKZXHmn0aSwmC1/hyPybJPEljBw==\n"
+-"=p2Oj\n"
++"mDMEXDWgpxYJKwYBBAHaRw8BAQdAguVu4qkx8iw4eU+TQ4vvcKG7IdcZvbMhw3Zc\n"
++"npGf0+u0GXRvZnVfY29uZmxpY3RAZXhhbXBsZS5jb22IkAQTFggAOBYhBO6ovNDG\n"
++"nLzbR1TlMJYJ0fjlWbUrBQJcNaCnAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheA\n"
++"AAoJEJYJ0fjlWbUrLaMBALegwkv2+sEcmKZqxt8JscYvFiEuycv2+rKHaZA0eDoN\n"
++"AP97W4XrJb5x49J5jDDdeko8k00uGqiiuAXJo27/i/phA7g4BFw1oKcSCisGAQQB\n"
++"l1UBBQEBB0Crhw24E2lPBhd/y+ZFotQ/2TrYqkUQqGPmff8ofLziNgMBCAeIeAQY\n"
++"FggAIBYhBO6ovNDGnLzbR1TlMJYJ0fjlWbUrBQJcNaCnAhsMAAoJEJYJ0fjlWbUr\n"
++"/K8BAJWsa+tOZsJw7w5fz6O0We6Xx4Rt17jHf563G6wMcz9+AQDRsedJ7w4zYzS9\n"
++"MFiJQ5aN0NDHMRtDFWAgCunVnJ3OBw==\n"
++"=fZa5\n"
+ "-----END PGP PUBLIC KEY BLOCK-----\n";
+
+ static const char conflictKey2[] = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
+ "\n"
+-"mDMEWG+xShYJKwYBBAHaRw8BAQdA567gPEPJRpqKnZjlFJMRNUqruRviYMyygfF6\n"
+-"6Ok+ygu0GXRvZnVfY29uZmxpY3RAZXhhbXBsZS5jb22IlgQTFggAPhYhBJ5kRh7E\n"
+-"I98w8kgUcmkAfYFvqqHsBQJYb7FKAhsDBQkDwmcABQsJCAcCBhUICQoLAgQWAgMB\n"
+-"Ah4BAheAAAoJEGkAfYFvqqHsYR0BAOz8JjYB4VvGkt6noLS3F5TLfsedGwQkBCw5\n"
+-"znw/vGZsAQD9DSX+ekwdrN56mNO8ISt5uVS7B1ZQtouNBF+nzcwbDbg4BFhvsUoS\n"
+-"CisGAQQBl1UBBQEBB0BFupW8+Xc1ikab8TJqANjQhvFVh6uLsgcK4g9lZgbGXAMB\n"
+-"CAeIeAQYFggAIBYhBJ5kRh7EI98w8kgUcmkAfYFvqqHsBQJYb7FKAhsMAAoJEGkA\n"
+-"fYFvqqHs15ABALdN3uiV/07cJ3RkNb3WPcijGsto+lECDS11dKEwTMFeAQDx+V36\n"
+-"ocbYC/xEuwi3w45oNqGieazzcD/GBbt8OBk3BA==\n"
+-"=45IR\n"
++"mDMEXDWgixYJKwYBBAHaRw8BAQdAMWOhumYspcvEOTuesOSN4rvnJVOj/6qOWFTu\n"
++"x+wPRra0GXRvZnVfY29uZmxpY3RAZXhhbXBsZS5jb22IkAQTFggAOBYhBA64G88Q\n"
++"NPXztj8ID/FhC7tiGbeRBQJcNaCLAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheA\n"
++"AAoJEPFhC7tiGbeRUt4A/2hf4Zgz+TYyfeH/4/ZtyL1JuZggqR1s5UopEx2Aiw10\n"
++"AP405KiTd31TJQN8Ru+7bskPu0/mzLZMNkRvBNEdc5kbDLg4BFw1oIsSCisGAQQB\n"
++"l1UBBQEBB0B5NtSrx7wDDKgwUe5Rxz0vRkaWLtyE0KbfE77oPy5DGAMBCAeIeAQY\n"
++"FggAIBYhBA64G88QNPXztj8ID/FhC7tiGbeRBQJcNaCLAhsMAAoJEPFhC7tiGbeR\n"
++"km0BAP8TQwraipqb1pJlLsEgDXeM5Jocz4fuePD78BsOBtORAP9gpCyKXdyJYGlA\n"
++"qjmG356yG6pCK9aPckTZ9IViPiHWCw==\n"
++"=tn3Q\n"
+ "-----END PGP PUBLIC KEY BLOCK-----\n";
+
+ static const char conflictMsg1[] = "-----BEGIN PGP MESSAGE-----\n"
+ "\n"
+-"owGbwMvMwCG2z/HA4aX/5W0YT3MlMUTkb2xPSizi6ihlYRDjYJAVU2Sp4mTZNpV3\n"
+-"5QwmLqkrMLWsTCCFDFycAjCR1vcMf4U0Qrs6qzqfHJ9puGOFduLN2nVmhsumxjBE\n"
+-"mdw4lr1ehIWR4QdLuNBpe86PGx1PtNXfVAzm/hu+vfjCp5BVNjPTM9L0eAA=\n"
+-"=MfBD\n"
++"owGbwMvMwCE2jfPij6eRW7UZTwsnMcSYLnT0Ki0uUXD3C1XILFHk6ihlYRDjYJAV\n"
++"U2R5t2LPhWNz9tx2D3lqANPEygTSwcDFKQAT+RjG8M9of873hQrMpinBVwKYv+rq\n"
++"XGmYW+ZcZJ+133KDq+itzlxGhg3L2X/6Khj+2Hd+He+KnXtunF2wNWxl7849e/Sy\n"
++"v6tc+8MBAA==\n"
++"=fZLe\n"
+ "-----END PGP MESSAGE-----\n";
+
+ static const char conflictMsg2[] = "-----BEGIN PGP MESSAGE-----\n"
+ "\n"
+-"owGbwMvMwCGWyVDbmL9q4RvG01xJDBH5GyvS8vO5OkpZGMQ4GGTFFFnmpbjJHVG+\n"
+-"b/DJQ6QIppaVCaSQgYtTACaySZHhr/SOPrdFJ89KrcwKY5i1XnflXYf2PK76SafK\n"
+-"tkxXuXzvJAvDX4kCybuqFk3HXCexz2+IrnZ+5X5EqOnuo3ens2cte+uzlhMA\n"
+-"=BIAi\n"
++"owGbwMvMwCH2MZF7d5Lk9omMp4WTGGJMFwZ4lRaXKLj7hSpklihydZSyMIhxMMiK\n"
++"KbLw7ZA+L2Dy9fM2ew5+mCZWJpAOBi5OAZhIUhIjw7bV+xS+cR0quqhmcY2Dl3WW\n"
++"8Ufr+rRNufOPyIdoO6nEXGH47/B+E1+oxS6e5f5n7MJ3aHBO+s345sipGV/4f665\n"
++"9mmiGjsA\n"
++"=8oJA\n"
+ "-----END PGP MESSAGE-----\n";
+
+ class TofuInfoTest: public QGpgMETest
+--
+2.19.2
+
diff --git a/user/gpgme/APKBUILD b/user/gpgme/APKBUILD
index 21b537848..bb97598e4 100644
--- a/user/gpgme/APKBUILD
+++ b/user/gpgme/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=gpgme
pkgver=1.12.0
-pkgrel=0
+pkgrel=1
pkgdesc="GnuPG Made Easy"
url="https://www.gnupg.org/related_software/gpgme/"
arch="all"
@@ -10,9 +10,10 @@ arch="all"
license="(LGPL-3.0+ OR GPL-2.0+) AND LGPL-2.1+ AND MIT AND GPL-3.0+"
depends="gnupg"
depends_dev="libgpg-error-dev libassuan-dev qt5-qtbase-dev"
-makedepends="$depends_dev doxygen"
-subpackages="$pkgname-dev $pkgname-doc gpgmepp qgpgme"
-source="ftp://ftp.gnupg.org/gcrypt/$pkgname/$pkgname-$pkgver.tar.bz2"
+makedepends="$depends_dev doxygen python3-dev swig cmd:which"
+subpackages="$pkgname-dev $pkgname-doc gpgmepp qgpgme py3-gpg:_py"
+source="https://gnupg.org/ftp/gcrypt/$pkgname/$pkgname-$pkgver.tar.bz2
+ 1.12.0-fix-t-tofuinfo.patch"
build() {
cd "$builddir"
@@ -23,7 +24,8 @@ build() {
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
- --localstatedir=/var
+ --localstatedir=/var \
+ --enable-languages=cl,cpp,python3,qt
make
}
@@ -43,16 +45,19 @@ qgpgme() {
mv "$pkgdir"/usr/lib/libqgpgme.so* "$subpkgdir"/usr/lib/
}
-check() {
- cd "$builddir"
- make check
-}
-
gpgmepp() {
pkgdesc="C++ bindings for GPGME"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgpgmepp.so.* "$subpkgdir"/usr/lib/
}
+_py() {
+ pkgdesc="$pkgdesc (Python bindings)"
+ depends="$pkgname=$pkgver-r$pkgrel python3"
+
+ mkdir -p "$subpkgdir/usr/lib/"
+ mv "$pkgdir/usr/lib/python"* "$subpkgdir/usr/lib/"
+}
-sha512sums="c228b3df28377df882be536ada56dc9c73150048a58e591aa4495f89c854af95820152cd60139840f994c249e9c7df50d8b89eb9d6dc4ce02aa80bbfebcdd014 gpgme-1.12.0.tar.bz2"
+sha512sums="c228b3df28377df882be536ada56dc9c73150048a58e591aa4495f89c854af95820152cd60139840f994c249e9c7df50d8b89eb9d6dc4ce02aa80bbfebcdd014 gpgme-1.12.0.tar.bz2
+c8748651021a6ea670329cffb9565b905272b092315e77dc6fa9fa23890f8a55c2159edbfa026e8af961f2ff0c0d524dc8332a2e9a24fce2b37ac7cc4bb88cb3 1.12.0-fix-t-tofuinfo.patch"
diff --git a/user/java-cacerts/APKBUILD b/user/java-cacerts/APKBUILD
new file mode 100644
index 000000000..b096f7795
--- /dev/null
+++ b/user/java-cacerts/APKBUILD
@@ -0,0 +1,24 @@
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=java-cacerts
+pkgver=1.0
+pkgrel=0
+pkgdesc="Script to update Java security certificates"
+url=" "
+arch="noarch"
+options="!check" # Simple script, no tests
+license="MIT"
+depends="p11-kit p11-kit-trust ca-certificates"
+makedepends=""
+subpackages=""
+source="java-cacerts"
+
+builddir="$srcdir"
+
+package() {
+ cd "$builddir"
+ install -D -m755 "$srcdir"/java-cacerts \
+ "$pkgdir"/etc/ca-certificates/update.d/java-cacerts
+ mkdir -p "$pkgdir"/etc/ssl/certs/java
+}
+
+sha512sums="4cc444bcd15312fad08eb23ec605311ef2c525e8ae5b03bd5dfbcbf63632a0f8c5c475f0f5adecebb0c368aa6543a56f3355cf1b98ff9742e3f30a9cc55d02e8 java-cacerts"
diff --git a/user/java-cacerts/java-cacerts b/user/java-cacerts/java-cacerts
new file mode 100644
index 000000000..bfbe473ba
--- /dev/null
+++ b/user/java-cacerts/java-cacerts
@@ -0,0 +1,3 @@
+#!/bin/sh
+exec trust extract --overwrite --format=java-cacerts --filter=ca-anchors \
+ --purpose server-auth /etc/ssl/certs/java/cacerts
diff --git a/user/java-common/APKBUILD b/user/java-common/APKBUILD
new file mode 100644
index 000000000..12259b209
--- /dev/null
+++ b/user/java-common/APKBUILD
@@ -0,0 +1,22 @@
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=java-common
+pkgver=6
+pkgrel=0
+pkgdesc="Default Java runtime binary symlinks"
+url=" "
+arch="noarch"
+options="!check" # Symlinks only.
+license="Public-Domain"
+depends=""
+makedepends=""
+subpackages=""
+source=""
+triggers="java-common.trigger=/usr/lib/jvm"
+
+package() {
+ mkdir -p "$pkgdir"/usr/bin
+ ln -sf ../lib/jvm/default-jvm/jre/bin/java "$pkgdir"/usr/bin
+ ln -sf ../lib/jvm/default-jvm/jre/bin/rmiregistry "$pkgdir"/usr/bin
+ ln -sf ../lib/jvm/default-jvm/jre/bin/keytool "$pkgdir"/usr/bin
+ ln -sf ../lib/jvm/default-jvm/bin/appletviewer "$pkgdir"/usr/bin
+}
diff --git a/user/java-common/java-common.trigger b/user/java-common/java-common.trigger
new file mode 100644
index 000000000..6d0613d48
--- /dev/null
+++ b/user/java-common/java-common.trigger
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ -x /usr/lib/jvm/forced-jvm ]; then
+ ln -sfn forced-jvm default-jvm
+ exit 0
+fi
+
+cd /usr/lib/jvm
+LATEST=`ls -d java-* | sort -r | head -1`
+if [ "$LATEST" ]; then
+ ln -sfn $LATEST default-jvm
+fi
+
diff --git a/user/java-gcj-compat/APKBUILD b/user/java-gcj-compat/APKBUILD
new file mode 100644
index 000000000..a75f1e6b1
--- /dev/null
+++ b/user/java-gcj-compat/APKBUILD
@@ -0,0 +1,65 @@
+# Contributor: Timo Teras <timo.teras@iki.fi>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+gccver=6.4.0
+gccpkgrel=10
+
+pkgname=java-gcj-compat
+pkgver=$gccver
+pkgrel=$gccpkgrel
+pkgdesc="Java runtime environment using GCC Java"
+url="https://gcc.gnu.org/"
+arch="all"
+license="GPL-3.0+ AND LGPL-2.1+"
+depends="fastjar gcc-java=$gccver-r$gccpkgrel java-common"
+makedepends="gcc-java=$gccver-r$gccpkgrel zlib-dev"
+subpackages=""
+source=""
+
+build() {
+ mkdir -p $builddir
+ cd $builddir
+ msg "Building ecj..."
+ gcj -Wl,-Bsymbolic -findirect-dispatch -o ecj \
+ --main=org.eclipse.jdt.internal.compiler.batch.Main \
+ /usr/share/java/ecj.jar -lgcj
+}
+
+check() {
+ $builddir/ecj > /dev/null
+}
+
+package() {
+ JVM_DIR=$pkgdir/usr/lib/jvm
+ JDK_DIR=$JVM_DIR/java-1.5-gcj
+ JDK_BIN_DIR=$JDK_DIR/bin
+ JRE_DIR=$JDK_DIR/jre
+ JRE_BIN_DIR=$JRE_DIR/bin
+ JRE_LIB_DIR=$JRE_DIR/lib
+
+ CPU=$(uname -m | sed -e 's/i.86/i386/g' -e 's/x86_64/amd64/g')
+
+ mkdir -p $JDK_BIN_DIR
+ ln -sf ../../../../bin/gij $JDK_BIN_DIR/java
+ ln -sf ../../../../bin/fastjar $JDK_BIN_DIR/fastjar
+ ln -sf ../../../../bin/sinjdoc $JDK_BIN_DIR/javadoc
+ ln -sf ../../../../bin/grmic $JDK_BIN_DIR/rmic
+ ln -sf ../../../../bin/gjavah $JDK_BIN_DIR/javah
+ install -s $builddir/ecj $JDK_BIN_DIR/javac
+ ln -sf ../../../../bin/gappletviewer $JDK_BIN_DIR/appletviewer
+ ln -sf ../../../../bin/gjarsigner $JDK_BIN_DIR/jarsigner
+ ln -sf ../../../../bin/grmiregistry $JDK_BIN_DIR/rmiregistry
+ ln -sf ../../../../bin/gkeytool $JDK_BIN_DIR/keytool
+
+ gcjrel=`ls -d /usr/lib/gcj-$gccver-* | cut -d '-' -f 3`
+
+ mkdir -p $JRE_BIN_DIR $JRE_LIB_DIR/$CPU
+ ln -sf ../../../../../bin/gij $JRE_BIN_DIR/java
+ ln -sf ../../../../../bin/grmiregistry $JRE_BIN_DIR/rmiregistry
+ ln -sf ../../../../../bin/gkeytool $JRE_BIN_DIR/keytool
+ ln -sf ../../../../../share/java/libgcj-$gccver.jar $JRE_LIB_DIR/rt.jar
+ ln -sf ../../../../../share/java/libgcj-tools-$gccver.jar $JRE_LIB_DIR/tools.jar
+ ln -sf ../../../../../../lib/gcj-$gccver-$gcjrel/libjvm.so $JRE_LIB_DIR/$CPU
+ ln -sf ../../../../../../lib/gcj-$gccver-$gcjrel/libjavamath.so $JRE_LIB_DIR/$CPU
+ ln -sf ../../../../../../lib/gcj-$gccver-$gcjrel/classmap.db $JRE_LIB_DIR/$CPU
+}
+
diff --git a/user/libxp/APKBUILD b/user/libxp/APKBUILD
new file mode 100644
index 000000000..45cfad2bb
--- /dev/null
+++ b/user/libxp/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=libxp
+pkgver=1.0.3
+pkgrel=0
+pkgdesc="X11 print client library"
+url="https://www.X.Org/"
+arch="all"
+license="X11"
+depends=""
+makedepends="libx11-dev libxau-dev libxext-dev xorgproto-dev"
+subpackages="$pkgname-dev $pkgname-doc"
+source="https://www.x.org/releases/individual/lib/libXp-$pkgver.tar.bz2"
+builddir="$srcdir/libXp-$pkgver"
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var
+ make
+}
+
+check() {
+ cd "$builddir"
+ make check
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="502a2500ec0f519dae69ac035bf93c65c47e3bc301604aacb350e90043455f3485626194db45208e5521300b282843825e08b7f7c412a7497ffa02f5f1560c8d libXp-1.0.3.tar.bz2"
diff --git a/user/lksctp-tools/APKBUILD b/user/lksctp-tools/APKBUILD
new file mode 100644
index 000000000..adeeec587
--- /dev/null
+++ b/user/lksctp-tools/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=lksctp-tools
+pkgver=1.0.17
+pkgrel=0
+pkgdesc="Tools for using SCTP on Linux"
+url="http://lksctp.sourceforge.net/"
+arch="all"
+license="GPL-2.0-only AND LGPL-2.1-only"
+depends=""
+makedepends=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="https://downloads.sourceforge.net/lksctp/lksctp-tools-$pkgver.tar.gz"
+builddir="$srcdir/lksctp-tools-$pkgver"
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var
+ make
+}
+
+check() {
+ cd "$builddir"
+ make check
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="055719130b7dda4da9cf002dcd5f1fb3d8cf75300a99365976e087b2b6971b4ccd357f95b515a44e37874af161f7b7f9b42c60191aff938d18fada5a49aa44c4 lksctp-tools-1.0.17.tar.gz"
diff --git a/user/lzo/APKBUILD b/user/lzo/APKBUILD
deleted file mode 100644
index 1707525e0..000000000
--- a/user/lzo/APKBUILD
+++ /dev/null
@@ -1,41 +0,0 @@
-# Contributor: Valery Kartel <valery.kartel@gmail.com>
-# Contributor: Michael Mason <ms13sp@gmail.com>
-# Maintainer: Dan Theisen <djt@hxx.in>
-pkgname=lzo
-pkgver=2.10
-pkgrel=3
-pkgdesc="Portable lossless real-time data compression library"
-url="http://www.oberhumer.com/opensource/lzo"
-arch="all"
-license="GPL-2.0+"
-depends=""
-makedepends=""
-install=
-subpackages="$pkgname-dev $pkgname-doc"
-source="http://www.oberhumer.com/opensource/lzo/download/$pkgname-$pkgver.tar.gz"
-
-build() {
- cd "$builddir"
- CFLAGS="$CFLAGS -DLZO_CFG_NO_SYSCALL=1" \
- ./configure \
- --build=$CBUILD \
- --host=$CHOST \
- --prefix=/usr \
- --sysconfdir=/etc \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info \
- --enable-shared
- make
-}
-
-check() {
- cd "$builddir"
- make check
-}
-
-package() {
- cd "$builddir"
- make DESTDIR="$pkgdir" install
-}
-
-sha512sums="a3dae5e4a6b93b1f5bf7435e8ab114a9be57252e9efc5dd444947d7a2d031b0819f34bcaeb35f60b5629a01b1238d738735a64db8f672be9690d3c80094511a4 lzo-2.10.tar.gz"
diff --git a/user/lzop/APKBUILD b/user/lzop/APKBUILD
deleted file mode 100644
index 030364595..000000000
--- a/user/lzop/APKBUILD
+++ /dev/null
@@ -1,38 +0,0 @@
-# Contributor: A. Wilcox <awilfox@adelielinux.org>
-# Maintainer: A. Wilcox <awilfox@adelielinux.org>
-pkgname=lzop
-pkgver=1.04
-pkgrel=0
-pkgdesc="A very fast file compressor and decompressor"
-url="http://www.lzop.org/"
-arch="all"
-license="GPL-2.0+"
-depends=""
-makedepends="lzo-dev"
-install=""
-subpackages="$pkgname-doc"
-source="http://www.lzop.org/download/lzop-$pkgver.tar.gz"
-
-build() {
- cd "$builddir"
- ./configure \
- --build=$CBUILD \
- --host=$CHOST \
- --prefix=/usr \
- --sysconfdir=/etc \
- --mandir=/usr/share/man \
- --localstatedir=/var
- make
-}
-
-check() {
- cd "$builddir"
- make check
-}
-
-package() {
- cd "$builddir"
- make DESTDIR="$pkgdir" install
-}
-
-sha512sums="5829b4495ffefab549aa697a05c536ce593c572c9eee6004460583a0090abcd317c6074c4f981dfee6be61ac8d127f02dd37053b6cb782af64db41586a8bbb6e lzop-1.04.tar.gz"
diff --git a/user/netqmail/APKBUILD b/user/netqmail/APKBUILD
index e6aa892ac..b5b50d6ad 100644
--- a/user/netqmail/APKBUILD
+++ b/user/netqmail/APKBUILD
@@ -2,11 +2,11 @@
# Maintainer: Laurent Bercot <ska-adelie@skarnet.org>
pkgname=netqmail
pkgver=1.06
-pkgrel=2
+pkgrel=4
pkgdesc="The qmail mail transfer agent (community version)"
url="http://www.qmail.org/$pkgname/"
arch="all"
-license="ISC"
+license="Public-Domain"
provides=sendmail
options="suid !check" # suid programs (qmail-queue); no test suite
depends="execline s6 s6-networking"
diff --git a/user/openjdk7/APKBUILD b/user/openjdk7/APKBUILD
new file mode 100644
index 000000000..13ffdf60f
--- /dev/null
+++ b/user/openjdk7/APKBUILD
@@ -0,0 +1,286 @@
+# Contributor: Timo Teras <timo.teras@iki.fi>
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Timo Teras <timo.teras@iki.fi>
+pkgname=openjdk7
+_icedteaver=2.6.16
+# pkgver is <JDK version>.<JDK update>
+# check icedtea JDK when updating
+pkgver=7.201.$_icedteaver
+pkgrel=0
+pkgdesc="OpenJDK 7 via IcedTea"
+url="https://icedtea.classpath.org/"
+arch="all"
+license="GPL-2.0-only WITH Classpath-exception-2.0"
+depends="$pkgname-jre java-cacerts"
+options="sover-namecheck"
+makedepends="bash findutils zip file mawk util-linux libxslt
+ autoconf automake linux-headers coreutils cmd:which
+ ca-certificates
+ nss-dev cups-dev libjpeg-turbo-dev giflib-dev libpng-dev libxt-dev
+ lcms2-dev libxp-dev libxtst-dev libxinerama-dev zlib-dev
+ libxrender-dev alsa-lib-dev freetype-dev fontconfig-dev
+ gtk+2.0-dev krb5-dev attr-dev pcsc-lite-dev lksctp-tools-dev
+ libxcomposite-dev nss-static"
+install=""
+
+# upstream binary versions
+RHINO_VER=1.7.7.2
+ANT_VER=1.9.11
+
+case $CARCH in
+x86) _jarch=i386;;
+x86_64) _jarch=amd64;;
+aarch64) _jarch=aarch64;;
+arm*) _jarch=arm
+ # openjdk has quite a bit of arm assembly producing textrels
+ # and it's non trivial to fix. allow it for now.
+ options="$options textrels";;
+s390x) _jarch=s390x;;
+ppc64le) _jarch=ppc64le;;
+ppc64) _jarch=ppc64
+ export CFLAGS="$CFLAGS -DABI_ELFv2";;
+ppc) _jarch=ppc;;
+esac
+
+INSTALL_BASE=/usr/lib/jvm/java-1.7-openjdk
+_jrelib="$INSTALL_BASE/jre/lib/$_jarch"
+
+# exclude xawt from ldpath to avoid duplicate provides for libmawt.so
+# (also in headless). in future this should be a virtual provides.
+ldpath="$_jrelib:$_jrelib/native_threads:$_jrelib/headless:$_jrelib/server:$_jrelib/jli"
+sonameprefix="$pkgname:"
+
+subpackages="$pkgname-jre-lib:jrelib:noarch $pkgname-jre $pkgname-jre-base:jrebase
+ $pkgname-doc:doc"
+
+if [ "$BOOTSTRAP" != "no" ]; then
+ makedepends="$makedepends java-gcj-compat"
+ BOOTSTRAP_JAVA_HOME=/usr/lib/jvm/java-1.5-gcj/
+else
+ makedepends="$makedepends $pkgname"
+ BOOTSTRAP_JAVA_HOME="$INSTALL_BASE"
+fi
+
+_dropsver=$_icedteaver
+_dropsurl=https://icedtea.classpath.org/download/drops/icedtea7/$_dropsver
+
+source="https://icedtea.classpath.org/download/source/icedtea-$_icedteaver.tar.gz
+ openjdk-$_dropsver.tar.bz2::$_dropsurl/openjdk.tar.bz2
+ corba-$_dropsver.tar.bz2::$_dropsurl/corba.tar.bz2
+ jaxp-$_dropsver.tar.bz2::$_dropsurl/jaxp.tar.bz2
+ jaxws-$_dropsver.tar.bz2::$_dropsurl/jaxws.tar.bz2
+ jdk-$_dropsver.tar.bz2::$_dropsurl/jdk.tar.bz2
+ langtools-$_dropsver.tar.bz2::$_dropsurl/langtools.tar.bz2
+ hotspot-$_dropsver.tar.bz2::$_dropsurl/hotspot.tar.bz2
+ https://archive.apache.org/dist/ant/binaries/apache-ant-$ANT_VER-bin.tar.gz
+ https://github.com/mozilla/rhino/releases/download/Rhino${RHINO_VER//./_}_Release/rhino-$RHINO_VER.zip
+
+ icedtea-hotspot-musl.patch
+ icedtea-hotspot-musl-ppc.patch
+ icedtea-hotspot-noagent-musl.patch
+ icedtea-hotspot-uclibc-fixes.patch
+ icedtea-jdk-fix-build.patch
+ icedtea-jdk-execinfo.patch
+ icedtea-jdk-fix-ipv6-init.patch
+ icedtea-jdk-musl.patch
+ icedtea-jdk-no-soname.patch
+ icedtea-cpio.patch
+ icedtea-tar.patch
+ icedtea-remove-gawk.patch
+ icedtea-xattr.patch
+ remove-gawk.patch
+ xattr.patch
+ "
+
+# secfixes:
+# 7.201.2.6.16-r0:
+# - CVE-2018-3136
+# - CVE-2018-3139
+# - CVE-2018-3149
+# - CVE-2018-3169
+# - CVE-2018-3180
+# - CVE-2018-3214
+# - CVE-2018-13785
+
+builddir="$srcdir/icedtea-$_icedteaver"
+
+unpack() {
+ if [ -z "$force" ]; then
+ verify
+ initdcheck
+ fi
+ mkdir -p "$srcdir"
+ msg "Unpacking sources..."
+ tar -C "$srcdir" -zxf icedtea-$_icedteaver.tar.gz
+ tar -C "$srcdir" -zxf apache-ant-$ANT_VER-bin.tar.gz
+ unzip -o -q "rhino-$RHINO_VER.zip" -d "$srcdir"
+}
+
+prepare() {
+ cd "$builddir"
+
+ # Busybox sha256 does not support longopts
+ sed -e "s/--check/-c/g" -i Makefile.am
+
+ for patch in $source; do
+ case $patch in
+ icedtea-*.patch)
+ cp ../$patch patches
+ ;;
+ *.patch)
+ msg "Applying patch $patch"
+ patch -p1 -i "$srcdir"/$patch
+ ;;
+ esac
+ done
+
+ ./autogen.sh
+}
+
+build() {
+ [ -z "$JOBS" ] && export JOBS=$(echo $MAKEFLAGS | sed -n -e 's/.*-j\([0-9]\+\).*/\1/p')
+ export ALT_PARALLEL_COMPILE_JOBS="${JOBS:-2}"
+ export HOTSPOT_BUILD_JOBS="${JOBS:-2}"
+
+ export JAVA_HOME=$BOOTSTRAP_JAVA_HOME
+ export PATH=$JAVA_HOME/bin:$srcdir/apache-ant-$ANT_VER/bin:$PATH
+ export DISTRIBUTION_PATCHES=""
+
+ # Explicitly set the C++ standard as the default has changed on GCC 6+
+ # and disable optimizations that lead to a broken JVM. These options
+ # has been adopted from the Fedora package.
+ export EXTRA_CPP_FLAGS="$CXXFLAGS -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-strict-overflow"
+ # CXXFLAGS doesn't make it to all calls, so we set the C++ standard
+ # version for C too.
+ export EXTRA_CFLAGS="$CFLAGS -std=gnu++98 -Wno-error -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-strict-overflow"
+
+ local patch
+ for patch in $source; do
+ case $patch in
+ icedtea-*.patch)
+ export DISTRIBUTION_PATCHES="$DISTRIBUTION_PATCHES patches/$patch"
+ ;;
+ esac
+ done
+ echo "icedtea patches: $DISTRIBUTION_PATCHES"
+
+ # --disable-arm32-jit: https://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2942
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=$INSTALL_BASE \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --with-parallel-jobs=${JOBS:-2} \
+ --disable-dependency-tracking \
+ --disable-downloading \
+ --disable-arm32-jit \
+ --with-rhino=$srcdir/rhino$RHINO_VER/lib/rhino-$RHINO_VER.jar \
+ --with-openjdk-src-zip=$srcdir/openjdk-$_dropsver.tar.bz2 \
+ --with-hotspot-src-zip=$srcdir/hotspot-$_dropsver.tar.bz2 \
+ --with-corba-src-zip=$srcdir/corba-$_dropsver.tar.bz2 \
+ --with-jaxp-src-zip=$srcdir/jaxp-$_dropsver.tar.bz2 \
+ --with-jaxws-src-zip=$srcdir/jaxws-$_dropsver.tar.bz2 \
+ --with-jdk-src-zip=$srcdir/jdk-$_dropsver.tar.bz2 \
+ --with-langtools-src-zip=$srcdir/langtools-$_dropsver.tar.bz2 \
+ --with-jdk-home=$BOOTSTRAP_JAVA_HOME \
+ --with-pkgversion="Adelie ${pkgver}-r${pkgrel}"
+
+ msg "Icedtea boot"
+ make -j1 icedtea-boot SHELL=/bin/bash
+ msg "Icedtea boot done"
+ make
+}
+
+package() {
+ mkdir -p "$pkgdir"/$INSTALL_BASE
+ cp -a "$builddir"/openjdk.build/j2sdk-image/* "$pkgdir"/$INSTALL_BASE
+ rm "$pkgdir"/$INSTALL_BASE/src.zip
+
+ # symlink to shared java cacerts store
+ rm -f "$pkgdir"/$INSTALL_BASE/jre/lib/security/cacerts
+ ln -sf /etc/ssl/certs/java/cacerts \
+ "$pkgdir"/$INSTALL_BASE/jre/lib/security/cacerts
+}
+
+jrelib() {
+ pkgdesc="OpenJDK 7 Java Runtime (class libraries)"
+ depends=""
+
+ local A; for A in jre/lib/zi jre/lib/images jre/lib/*.jar \
+ jre/lib/security jre/lib/ext/*.jar jre/lib/cmm \
+ jre/ASSEMBLY_EXCEPTION jre/THIRD_PARTY_README jre/LICENSE; do
+
+ local dirname=${A%/*}
+ mkdir -p "$subpkgdir"/$INSTALL_BASE/$dirname
+ mv "$pkgdir"/$INSTALL_BASE/$A "$subpkgdir"/$INSTALL_BASE/$dirname
+ done
+}
+
+jrebase() {
+ pkgdesc="OpenJDK 7 Java Runtime (no GUI support)"
+ depends="$pkgname-jre-lib java-common java-cacerts"
+
+ mkdir -p "$subpkgdir"/$INSTALL_BASE/bin
+
+ local A; for A in java orbd rmid servertool unpack200 keytool \
+ pack200 rmiregistry tnameserv; do
+ mv "$pkgdir"/$INSTALL_BASE/bin/$A "$subpkgdir"/$INSTALL_BASE/bin
+ done
+
+ # rest of the jre subdir (which were not taken by -jre subpkg)
+ mv "$pkgdir"/$INSTALL_BASE/jre "$subpkgdir"/$INSTALL_BASE
+}
+
+jre() {
+ pkgdesc="OpenJDK 7 Java Runtime"
+ # manually depend to avoid clash with libgcj's libjvm.so
+ depends="so:openjdk7:libjvm.so=0"
+
+ mkdir -p "$subpkgdir"
+ local A; for A in jre/bin/policytool \
+ bin/appletviewer \
+ bin/policytool \
+ jre/lib/$_jarch/xawt \
+ jre/lib/$_jarch/libsplashscreen.so; do
+
+ local dirname=${A%/*}
+ mkdir -p "$subpkgdir"/$INSTALL_BASE/$dirname
+ mv "$pkgdir"/$INSTALL_BASE/$A "$subpkgdir"/$INSTALL_BASE/$dirname
+ done
+}
+
+doc() {
+ default_doc
+ mkdir -p "$subpkgdir"/$INSTALL_BASE/
+ mv "$pkgdir"/$INSTALL_BASE/man "$subpkgdir"/$INSTALL_BASE/
+}
+
+sha512sums="cc782e1c5b1ce158be315cff5be61676373870c2062eb34688583a875ab68413bbabd909ce83e79a9c46c3d0c8ec10aad3c015276ddf782ce2079cb5a7098f82 icedtea-2.6.16.tar.gz
+ee2443da63ab6b1a525d0633a577f28d28d3916cb47b312d61d71b4795ae3bde4a70478017b7639133fb65cfb63aa0fcbc397afbde18f20d605a50286163e4a2 openjdk-2.6.16.tar.bz2
+3926a1c889d0ff5386dd78e8fb1ff71b553744fe574ab9655d9e1677da9aea3306d65e631866afcbb533b8e0fefbb34ae655400c9bc7c2058aaa34f8fb0a04d8 corba-2.6.16.tar.bz2
+2b37ba6f235b684682d9590c292b6af5fb6f41d4001f92dcf4945570e13fe760f91bbc7068d071e3e935829c9719936ae96940874ee211fd32cba187e05f0255 jaxp-2.6.16.tar.bz2
+41dc2b7a610cd5f4c9155c14670bb97f1c57924af2737faf6beb7b284c0ad7c0f0b33f4276cde5674a57db3f88ba4503f94f2dff7a52db3273ee53ed0b14be64 jaxws-2.6.16.tar.bz2
+2703b7bf7455aa3997426f2ce3d4c2285ee44640a940d15c1c3434414c295d87b44e749fece5a7b966661910c8768a79774fb03b43ab5605df9dc8965b600fd7 jdk-2.6.16.tar.bz2
+192dd5fac399c52bcb547617832428b40af493089b4bb63159cd9363c78af76c7acdc051d461eb4e4692b2090e05ed769b9fec460a328973b36b57bbb28cee39 langtools-2.6.16.tar.bz2
+73b0338ec293d0d87cc7251f63ef453ec10c7de978c56d8ff455b16ee0506175aed681a9a95fbdcc8b747ba00ef6cf914f63d0c5d22268b40620d4dbc7390a98 hotspot-2.6.16.tar.bz2
+0da12cb0f761b8cb76e042449e7d93f43236e7bc948e337215470a70031f0a2dda6d1b508f9397b283808d84c4ebddb31558fe1cd8e6e6469c1dd390d69ec6e7 apache-ant-1.9.11-bin.tar.gz
+1b9e8721749e81c5420a00af1e00ee0e4f48624ccb4e9aa969032114116ad50f59b254d4d16d74feff74de64157cc8b0a2ead9b555907c84b7055b796fba9a75 rhino-1.7.7.2.zip
+f62b942f0bacda8e37d0f1876d8ba14ddb4fc55a7d5fd1019463744927f40f422a85e9ee051948d566242f5a785aa28f275eb58768611283cba89af91235f43c icedtea-hotspot-musl.patch
+e5cf4d70f96fc1e72ae8b97a887adb96092ff36584711cbb8de9d9fa9e859cb8731d638838de0d9591239fc44ffe5c74422d1842bd9f10a0c00dff1627bdeeef icedtea-hotspot-musl-ppc.patch
+e7a2c1771bb582d427041f8d22e48c0daf8f20d7c0926cbce3549d49c4e949359ee25a35682b486e82f3e390535c950c5beee3bd8d06fb5a717b50f2d9b2a6bc icedtea-hotspot-noagent-musl.patch
+822eee0dc4d3ba677a289dfeb3668b536d2d626708390a9d9702fb4144a481fd443a215a0d2041c6026113837aafa4ba0b5e9ead8589d2da6717a238bbc95a5a icedtea-hotspot-uclibc-fixes.patch
+213a537de5f011cb39d608515c3413513ac75fb93593f9a9ef4205f71d72bdd8b097c80db185f7b26021d5bb85045b866f34f3478482dc4189972d8614a13458 icedtea-jdk-fix-build.patch
+0391970e6a32946aa3cccf38fdef9c0fe2af26cd0df824b98aa2fcfa1bf661d4a68e339bffcfd16f386c565fc68bb28a29208a67d4bad8a0e847ad02bd8becbb icedtea-jdk-execinfo.patch
+48533f87fc2cf29d26b259be0df51087d2fe5b252e72d00c6ea2f4add7b0fb113141718c116279c5905e03f64a1118082e719393786811367cf4d472b5d36774 icedtea-jdk-fix-ipv6-init.patch
+44a35941c80f408d0607e32763b3b6ccee21e1d39886309327d3d74d2900117e4346ef59e77c663fd022fec10ee8f365eeb46c1260014d5765d226ce175ce3c5 icedtea-jdk-musl.patch
+bf4b184e170f7b0ff64ab30d2162784fe2bd5460d1fa31973259f7065fd4c511c46f97724fe2bd72bb94e9006cb568d0e0c87d1a9c90819e65880f8f44830bb1 icedtea-jdk-no-soname.patch
+a54c79c82afa1bc95265397b274260584c8b8c6be1651ddfb907d9523a809ea4581409e0d3fb0bbb63ef5a204e8ce29b7940e78cd640af1f490ae938c59129b6 icedtea-cpio.patch
+dc5f59068395e9501b17308c91ec80670c195117e22cb7bef78d551d118f180a11d7f0b5d47f4c7106909d9a9a8c060ddd60b78f251fd35afa6c72a1515af53e icedtea-tar.patch
+049061b97d6e744b7ad9bad4a3dbfa1d236400003175e49740830dcb78a1f164b5c67b066e76c970eb27e09707f948cac0f5b7073abe0f49bcecfdd747f0107d icedtea-remove-gawk.patch
+b9950ddf9c5ebb53d1e029a1fe8ef843860128ceb05872313b33fd2696a4acadbc8291110ca6513ce7531e0f943e42b167068e603f7ecd0e36f5b16d6bb827ab icedtea-xattr.patch
+fda1ba46276475cced16c4f380dbc0a0ac07ae2d66a8da10e88455a299bd40ff04a63dae1c5f3d3de6adbb3c6c240db5d37df0be2fc3391764cb21c9ad83eb8b remove-gawk.patch
+3dd758e04e3b852398d81356c02a89afce0c664938d3f0179ee32e358d7057f5f969379329dd1ebcbf4bc3d37bd5e0d94102cd3f023326db5175968cfbbc9c35 xattr.patch"
diff --git a/user/openjdk7/icedtea-cpio.patch b/user/openjdk7/icedtea-cpio.patch
new file mode 100644
index 000000000..c66c1ca60
--- /dev/null
+++ b/user/openjdk7/icedtea-cpio.patch
@@ -0,0 +1,11 @@
+--- openjdk/jdk/make/common/shared/Defs-utils.gmk.orig
++++ openjdk/jdk/make/common/shared/Defs-utils.gmk
+@@ -104,7 +104,7 @@
+ COMM = $(UTILS_USR_BIN_PATH)comm
+ COMPRESS = $(UTILS_USR_BIN_PATH)compress
+ CP = $(UTILS_COMMAND_PATH)cp
+-CPIO = $(UTILS_COMMAND_PATH)cpio
++CPIO = $(UTILS_USR_BIN_PATH)cpio
+ CUT = $(UTILS_USR_BIN_PATH)cut
+ DATE = $(UTILS_COMMAND_PATH)date
+ DF = $(UTILS_COMMAND_PATH)df
diff --git a/user/openjdk7/icedtea-hotspot-musl-ppc.patch b/user/openjdk7/icedtea-hotspot-musl-ppc.patch
new file mode 100644
index 000000000..eca684884
--- /dev/null
+++ b/user/openjdk7/icedtea-hotspot-musl-ppc.patch
@@ -0,0 +1,169 @@
+--- openjdk.orig/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp
++++ openjdk/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp
+@@ -110,11 +110,19 @@
+ // it because the volatile registers are not needed to make setcontext() work.
+ // Hopefully it was zero'd out beforehand.
+ guarantee(uc->uc_mcontext.regs != NULL, "only use ucontext_get_pc in sigaction context");
++#if defined(__GLIBC__) || defined(__UCLIBC__)
+ return (address)uc->uc_mcontext.regs->nip;
++#else // Musl
++ return (address)uc->uc_mcontext.gp_regs[32];
++#endif
+ }
+
+ intptr_t* os::Linux::ucontext_get_sp(ucontext_t * uc) {
++#if defined(__GLIBC__) || defined(__UCLIBC__)
+ return (intptr_t*)uc->uc_mcontext.regs->gpr[1/*REG_SP*/];
++#else // Musl
++ return (intptr_t*)uc->uc_mcontext.gp_regs[1/*REG_SP*/];
++#endif
+ }
+
+ intptr_t* os::Linux::ucontext_get_fp(ucontext_t * uc) {
+@@ -213,7 +221,11 @@
+ if (uc) {
+ address const pc = os::Linux::ucontext_get_pc(uc);
+ if (pc && StubRoutines::is_safefetch_fault(pc)) {
++#if defined(__GLIBC__) || defined(__UCLIBC__)
+ uc->uc_mcontext.regs->nip = (unsigned long)StubRoutines::continuation_for_safefetch_fault(pc);
++#else // Musl
++ uc->uc_mcontext.gp_regs[32] = (unsigned long)StubRoutines::continuation_for_safefetch_fault(pc);
++#endif
+ return true;
+ }
+ }
+@@ -364,7 +376,11 @@
+ // continue at the next instruction after the faulting read. Returning
+ // garbage from this read is ok.
+ thread->set_pending_unsafe_access_error();
++#if defined(__GLIBC__) || defined(__UCLIBC__)
+ uc->uc_mcontext.regs->nip = ((unsigned long)pc) + 4;
++#else // Musl
++ uc->uc_mcontext.gp_regs[32] = ((unsigned long)pc) + 4;
++#endif
+ return true;
+ }
+ }
+@@ -383,7 +399,11 @@
+ // continue at the next instruction after the faulting read. Returning
+ // garbage from this read is ok.
+ thread->set_pending_unsafe_access_error();
++#if defined(__GLIBC__) || defined(__UCLIBC__)
+ uc->uc_mcontext.regs->nip = ((unsigned long)pc) + 4;
++#else // Musl
++ uc->uc_mcontext.gp_regs[32] = ((unsigned long)pc) + 4;
++#endif
+ return true;
+ }
+ }
+@@ -406,7 +426,11 @@
+ if (stub != NULL) {
+ // Save all thread context in case we need to restore it.
+ if (thread != NULL) thread->set_saved_exception_pc(pc);
++#if defined(__GLIBC__) || defined(__UCLIBC__)
+ uc->uc_mcontext.regs->nip = (unsigned long)stub;
++#else
++ uc->uc_mcontext.gp_regs[32] = (unsigned long)stub;
++#endif
+ return true;
+ }
+
+@@ -564,6 +588,7 @@
+ ucontext_t* uc = (ucontext_t*)context;
+
+ st->print_cr("Registers:");
++#if defined(__GLIBC__) || defined(__UCLIBC__)
+ st->print("pc =" INTPTR_FORMAT " ", uc->uc_mcontext.regs->nip);
+ st->print("lr =" INTPTR_FORMAT " ", uc->uc_mcontext.regs->link);
+ st->print("ctr=" INTPTR_FORMAT " ", uc->uc_mcontext.regs->ctr);
+@@ -572,8 +597,18 @@
+ st->print("r%-2d=" INTPTR_FORMAT " ", i, uc->uc_mcontext.regs->gpr[i]);
+ if (i % 3 == 2) st->cr();
+ }
++#else // Musl
++ st->print("pc =" INTPTR_FORMAT " ", uc->uc_mcontext.gp_regs[32]);
++ st->print("lr =" INTPTR_FORMAT " ", uc->uc_mcontext.gp_regs[36]);
++ st->print("ctr=" INTPTR_FORMAT " ", uc->uc_mcontext.gp_regs[35]);
+ st->cr();
++ for (int i = 0; i < 32; i++) {
++ st->print("r%-2d=" INTPTR_FORMAT " ", i, uc->uc_mcontext.gp_regs[i]);
++ if (i % 3 == 2) st->cr();
++ }
++#endif
+ st->cr();
++ st->cr();
+
+ intptr_t *sp = (intptr_t *)os::Linux::ucontext_get_sp(uc);
+ st->print_cr("Top of Stack: (sp=" PTR_FORMAT ")", p2i(sp));
+@@ -600,7 +635,11 @@
+ // this is only for the "general purpose" registers
+ for (int i = 0; i < 32; i++) {
+ st->print("r%-2d=", i);
++#if defined(__GLIBC__) || defined(__UCLIBC__)
+ print_location(st, uc->uc_mcontext.regs->gpr[i]);
++#else // Musl
++ print_location(st, uc->uc_mcontext.gp_regs[i]);
++#endif
+ }
+ st->cr();
+ }
+--- openjdk.orig/hotspot.orig/src/cpu/ppc/vm/macroAssembler_ppc.cpp
++++ openjdk/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp
+@@ -1242,7 +1242,11 @@
+ // the safepoing polling page.
+ ucontext_t* uc = (ucontext_t*) ucontext;
+ // Set polling address.
++#if defined(__GLIBC__) || defined(__UCLIBC__)
+ address addr = (address)uc->uc_mcontext.regs->gpr[ra] + (ssize_t)ds;
++#else // Musl
++ address addr = (address)uc->uc_mcontext.gp_regs[ra] + (ssize_t)ds;
++#endif
+ if (polling_address_ptr != NULL) {
+ *polling_address_ptr = addr;
+ }
+@@ -1263,15 +1267,24 @@
+ int rb = inv_rb_field(instruction);
+
+ // look up content of ra and rb in ucontext
++#if defined(__GLIBC__) || defined(__UCLIBC__)
+ address ra_val=(address)uc->uc_mcontext.regs->gpr[ra];
+ long rb_val=(long)uc->uc_mcontext.regs->gpr[rb];
++#else // Musl
++ address ra_val=(address)uc->uc_mcontext.gp_regs[ra];
++ long rb_val=(long)uc->uc_mcontext.gp_regs[rb];
++#endif
+ return os::is_memory_serialize_page(thread, ra_val+rb_val);
+ } else if (is_stw(instruction) || is_stwu(instruction)) {
+ int ra = inv_ra_field(instruction);
+ int d1 = inv_d1_field(instruction);
+
+ // look up content of ra in ucontext
++#if defined(__GLIBC__) || defined(__UCLIBC__)
+ address ra_val=(address)uc->uc_mcontext.regs->gpr[ra];
++#else // Musl
++ address ra_val=(address)uc->uc_mcontext.gp_regs[ra];
++#endif
+ return os::is_memory_serialize_page(thread, ra_val+d1);
+ } else {
+ return false;
+@@ -1334,11 +1347,20 @@
+ || (is_stdu(instruction) && rs == 1)) {
+ int ds = inv_ds_field(instruction);
+ // return banged address
++#if defined(__GLIBC__) || defined(__UCLIBC__)
+ return ds+(address)uc->uc_mcontext.regs->gpr[ra];
++#else // Musl
++ return ds+(address)uc->uc_mcontext.gp_regs[ra];
++#endif
+ } else if (is_stdux(instruction) && rs == 1) {
+ int rb = inv_rb_field(instruction);
++#if defined(__GLIBC__) || defined(__UCLIBC__)
+ address sp = (address)uc->uc_mcontext.regs->gpr[1];
+ long rb_val = (long)uc->uc_mcontext.regs->gpr[rb];
++#else // Musl
++ address sp = (address)uc->uc_mcontext.gp_regs[1];
++ long rb_val = (long)uc->uc_mcontext.gp_regs[rb];
++#endif
+ return ra != 1 || rb_val >= 0 ? NULL // not a stack bang
+ : sp + rb_val; // banged address
+ }
diff --git a/user/openjdk7/icedtea-hotspot-musl.patch b/user/openjdk7/icedtea-hotspot-musl.patch
new file mode 100644
index 000000000..1da903148
--- /dev/null
+++ b/user/openjdk7/icedtea-hotspot-musl.patch
@@ -0,0 +1,79 @@
+--- openjdk.orig/hotspot/src/os/linux/vm/jvm_linux.cpp
++++ openjdk/hotspot/src/os/linux/vm/jvm_linux.cpp
+@@ -154,7 +154,9 @@
+ #ifdef SIGSTKFLT
+ "STKFLT", SIGSTKFLT, /* Stack fault. */
+ #endif
++#ifdef SIGCLD
+ "CLD", SIGCLD, /* Same as SIGCHLD (System V). */
++#endif
+ "CHLD", SIGCHLD, /* Child status has changed (POSIX). */
+ "CONT", SIGCONT, /* Continue (POSIX). */
+ "STOP", SIGSTOP, /* Stop, unblockable (POSIX). */
+--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.inline.hpp
++++ openjdk/hotspot/src/os/linux/vm/os_linux.inline.hpp
+@@ -52,7 +52,7 @@
+
+ #include <unistd.h>
+ #include <sys/socket.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <netdb.h>
+
+ inline void* os::thread_local_storage_at(int index) {
+--- openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
++++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
+@@ -73,7 +73,6 @@
+ # include <pwd.h>
+ # include <poll.h>
+ # include <ucontext.h>
+-# include <fpu_control.h>
+
+ #ifdef AMD64
+ #define REG_SP REG_RSP
+@@ -533,6 +532,9 @@
+ ShouldNotReachHere();
+ return true; // Mute compiler
+ }
++
++#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw))
++#define _FPU_SETCW(cw) __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw))
+
+ void os::Linux::init_thread_fpu_state(void) {
+ #ifndef AMD64
+--- openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/threadLS_linux_x86.hpp
++++ openjdk/hotspot/src/os_cpu/linux_x86/vm/threadLS_linux_x86.hpp
+@@ -32,7 +32,9 @@
+ // map stack pointer to thread pointer - see notes in threadLS_linux_x86.cpp
+ #define SP_BITLENGTH 32
+ #define PAGE_SHIFT 12
++ #ifndef PAGE_SIZE
+ #define PAGE_SIZE (1UL << PAGE_SHIFT)
++ #endif
+ static Thread* _sp_map[1UL << (SP_BITLENGTH - PAGE_SHIFT)];
+
+ public:
+--- openjdk/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp.orig
++++ openjdk/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp
+@@ -76,7 +76,7 @@
+ # include <pwd.h>
+ # include <poll.h>
+ # include <ucontext.h>
+-# include <fpu_control.h>
++# include <linux/types.h>
+
+ #ifdef BUILTIN_SIM
+ #define REG_SP REG_RSP
+--- openjdk/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp.orig
++++ openjdk/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp
+@@ -194,10 +194,6 @@
+ return (r->reg2stack() + SharedRuntime::out_preserve_stack_slots()) * VMRegImpl::stack_slot_size;
+ }
+
+-template <class T> static const T& min (const T& a, const T& b) {
+- return (a > b) ? b : a;
+-}
+-
+ // ---------------------------------------------------------------------------
+ // Read the array of BasicTypes from a signature, and compute where the
+ // arguments should go. Values in the VMRegPair regs array refer to 4-byte
diff --git a/user/openjdk7/icedtea-hotspot-noagent-musl.patch b/user/openjdk7/icedtea-hotspot-noagent-musl.patch
new file mode 100644
index 000000000..37604acca
--- /dev/null
+++ b/user/openjdk7/icedtea-hotspot-noagent-musl.patch
@@ -0,0 +1,54 @@
+--- openjdk.orig/hotspot/make/linux/makefiles/defs.make
++++ openjdk/hotspot/make/linux/makefiles/defs.make
+@@ -327,6 +327,9 @@
+
+ # Serviceability Binaries
+ # No SA Support for PPC, IA64, ARM or zero
++# or if thread_db.h missing (musl)
++
++ifneq ($(wildcard /usr/include/thread_db.h),)
+ ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
+ $(EXPORT_LIB_DIR)/sa-jdi.jar
+ ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
+@@ -343,6 +346,10 @@
+ endif
+ endif
+ endif
++endif
++else
++ADD_SA_BINARIES/x86 =
++ADD_SA_BINARIES/sparc =
+ endif
+ ADD_SA_BINARIES/ppc =
+ ADD_SA_BINARIES/ppc64 =
+--- openjdk.orig/hotspot/make/linux/makefiles/sa.make
++++ openjdk/hotspot/make/linux/makefiles/sa.make
+@@ -59,9 +59,11 @@
+
+ # if $(AGENT_DIR) does not exist, we don't build SA
+ # also, we don't build SA on Itanium or zero.
++# check for thread_db.h too (musl does not have it).
+
+ all:
+- if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" \
++ if [ -d $(AGENT_DIR) -a -f /usr/include/thread_db.h \
++ -a "$(SRCARCH)" != "ia64" \
+ -a "$(SRCARCH)" != "zero" \
+ -a "$(SRCARCH)" != "aarch64" ] ; then \
+ $(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \
+--- openjdk.orig/hotspot/make/linux/makefiles/saproc.make
++++ openjdk/hotspot/make/linux/makefiles/saproc.make
+@@ -65,10 +65,13 @@
+
+ # if $(AGENT_DIR) does not exist, we don't build SA
+ # also, we don't build SA on Itanium or zero.
++# check for thread_db.h too (musl does not have it).
+
++ifneq ($(wildcard /usr/include/thread_db.h),)
+ ifneq ($(wildcard $(AGENT_DIR)),)
+ ifneq ($(filter-out ia64 zero aarch64,$(SRCARCH)),)
+ BUILDLIBSAPROC = $(LIBSAPROC)
++endif
+ endif
+ endif
+
diff --git a/user/openjdk7/icedtea-hotspot-uclibc-fixes.patch b/user/openjdk7/icedtea-hotspot-uclibc-fixes.patch
new file mode 100644
index 000000000..1c1d82276
--- /dev/null
+++ b/user/openjdk7/icedtea-hotspot-uclibc-fixes.patch
@@ -0,0 +1,93 @@
+--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -112,7 +112,6 @@
+ # include <string.h>
+ # include <syscall.h>
+ # include <sys/sysinfo.h>
+-# include <gnu/libc-version.h>
+ # include <sys/ipc.h>
+ # include <sys/shm.h>
+ # include <link.h>
+@@ -632,6 +631,13 @@
+ // detecting pthread library
+
+ void os::Linux::libpthread_init() {
++#if 1
++ // Hard code Alpine Linux supported uclibc/musl compatible settings
++ os::Linux::set_glibc_version("glibc 2.9");
++ os::Linux::set_libpthread_version("NPTL");
++ os::Linux::set_is_NPTL();
++ os::Linux::set_is_floating_stack();
++#else
+ // Save glibc and pthread version strings. Note that _CS_GNU_LIBC_VERSION
+ // and _CS_GNU_LIBPTHREAD_VERSION are supported in glibc >= 2.3.2. Use a
+ // generic name for earlier versions.
+@@ -690,6 +696,7 @@
+ if (os::Linux::is_NPTL() || os::Linux::supports_variable_stack_size()) {
+ os::Linux::set_is_floating_stack();
+ }
++#endif
+ }
+
+ /////////////////////////////////////////////////////////////////////////////
+@@ -2951,11 +2958,7 @@
+ // If we are running with earlier version, which did not have symbol versions,
+ // we should use the base version.
+ void* os::Linux::libnuma_dlsym(void* handle, const char *name) {
+- void *f = dlvsym(handle, name, "libnuma_1.1");
+- if (f == NULL) {
+- f = dlsym(handle, name);
+- }
+- return f;
++ return dlsym(handle, name);
+ }
+
+ bool os::Linux::libnuma_init() {
+@@ -5312,7 +5315,25 @@
+ // Linux doesn't yet have a (official) notion of processor sets,
+ // so just return the system wide load average.
+ int os::loadavg(double loadavg[], int nelem) {
++#ifdef __UCLIBC__
++ FILE *LOADAVG;
++ double avg[3] = { 0.0, 0.0, 0.0 };
++ int i, res = -1;;
++
++ if ((LOADAVG = fopen("/proc/loadavg", "r"))) {
++ fscanf(LOADAVG, "%lf %lf %lf", &avg[0], &avg[1], &avg[2]);
++ res = 0;
++ fclose(LOADAVG);
++ }
++
++ for (i = 0; (i < nelem) && (i < 3); i++) {
++ loadavg[i] = avg[i];
++ }
++
++ return res;
++#else
+ return ::getloadavg(loadavg, nelem);
++#endif
+ }
+
+ void os::pause() {
+--- openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
+@@ -253,7 +253,7 @@
+ #elif defined(__APPLE__)
+ inline int g_isnan(double f) { return isnan(f); }
+ #elif defined(LINUX) || defined(_ALLBSD_SOURCE)
+-inline int g_isnan(float f) { return isnanf(f); }
++inline int g_isnan(float f) { return isnan(f); }
+ inline int g_isnan(double f) { return isnan(f); }
+ #else
+ #error "missing platform-specific definition here"
+@@ -267,8 +267,8 @@
+
+ // Checking for finiteness
+
+-inline int g_isfinite(jfloat f) { return finite(f); }
+-inline int g_isfinite(jdouble f) { return finite(f); }
++inline int g_isfinite(jfloat f) { return isfinite(f); }
++inline int g_isfinite(jdouble f) { return isfinite(f); }
+
+
+ // Wide characters
diff --git a/user/openjdk7/icedtea-jdk-execinfo.patch b/user/openjdk7/icedtea-jdk-execinfo.patch
new file mode 100644
index 000000000..a6499dcb0
--- /dev/null
+++ b/user/openjdk7/icedtea-jdk-execinfo.patch
@@ -0,0 +1,40 @@
+--- openjdk.orig/jdk/src/solaris/native/sun/awt/awt_xembed_server.c
++++ openjdk/jdk/src/solaris/native/sun/awt/awt_xembed_server.c
+@@ -35,7 +35,7 @@
+ #include <X11/Xlib.h>
+ #include <X11/Xatom.h>
+ #include <Xm/MwmUtil.h>
+-#ifdef __linux__
++#if defined(__linux__) && defined(__GLIBC__) && ! defined(__UCLIBC__)
+ #include <execinfo.h>
+ #endif
+ #include <stdio.h>
+@@ -835,7 +835,7 @@
+ AWT_UNLOCK();
+ }
+
+-#ifdef __linux__
++#if defined(__linux__) && defined(__GLIBC__) && ! defined(__UCLIBC__)
+ void
+ print_stack (void)
+ {
+--- openjdk.orig/jdk/src/solaris/native/sun/xawt/XToolkit.c
++++ openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c
+@@ -27,7 +27,7 @@
+ #include <X11/Xutil.h>
+ #include <X11/Xos.h>
+ #include <X11/Xatom.h>
+-#ifdef __linux__
++#if defined(__linux__) && defined(__GLIBC__) && ! defined(__UCLIBC__)
+ #include <execinfo.h>
+ #endif
+
+@@ -689,7 +689,7 @@
+ return ret;
+ }
+
+-#ifdef __linux__
++#if defined(__linux__) && defined(__GLIBC__) && ! defined(__UCLIBC__)
+ void print_stack(void)
+ {
+ void *array[10];
diff --git a/user/openjdk7/icedtea-jdk-fix-build.patch b/user/openjdk7/icedtea-jdk-fix-build.patch
new file mode 100644
index 000000000..9fae895b6
--- /dev/null
+++ b/user/openjdk7/icedtea-jdk-fix-build.patch
@@ -0,0 +1,56 @@
+Fixes three issues:
+ - so's should not be linked to -ljvm as dlopen(/abs/name) is
+ used by the launcher to load libjvm.so; it is thus not available
+ (musl/uclibc) ld.so to satisfy NEEDED dependency inserted by
+ -ljvm. Fix to not link against -ljvm, and disable -z defs so
+ undefined symbols are allowed in sos
+ - the previous makes ldd generate errors on unresolved symbols (musl)
+ remove it altogether as it's used for informative purposes only
+ (display things - not check anything useful)
+ - Don't delete the generated directory $(GENCSEXT), this can
+ confuse make in highly parallel builds with:
+ make[6]: *** INTERNAL: readdir: No such file or directory. Stop.
+ make[6]: Leaving directory '.../openjdk-boot/jdk/make/sun/nio/cs'
+
+--- openjdk.orig/jdk/make/common/Defs-linux.gmk
++++ openjdk/jdk/make/common/Defs-linux.gmk
+@@ -350,7 +350,7 @@
+
+ EXTRA_LIBS += -lc
+
+-LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker defs
++LDFLAGS_DEFS_OPTION =
+ LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION)
+
+ #
+@@ -407,7 +407,7 @@
+ # the library itself should not.
+ #
+ VM_NAME = server
+-JVMLIB = -L$(LIBDIR)/$(LIBARCH)/$(VM_NAME) -ljvm
++JVMLIB =
+ JAVALIB = -ljava $(JVMLIB)
+
+ #
+--- openjdk.orig/jdk/make/sun/nio/cs/Makefile
++++ openjdk/jdk/make/sun/nio/cs/Makefile
+@@ -107,7 +107,7 @@
+ $(GENCSDATASRC)/DoubleByte-X.java.template \
+ $(GENCSDATASRC)/extsbcs $(GENCSDATASRC)/dbcs
+ @$(prep-target)
+- $(RM) -r $(GENCSEXT)
++ $(RM) -f "$(GENCSEXT)"/*
+ $(MKDIR) -p $(GENCSEXT)
+ $(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) extsbcs
+ $(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) euctw \
+--- openjdk.orig/jdk/make/common/shared/Defs-linux.gmk
++++ openjdk/jdk/make/common/shared/Defs-linux.gmk
+@@ -207,8 +207,6 @@
+ if [ "`$(NM) -D -g --defined-only $1 | $(EGREP) 'SUNWprivate'`" = "" ] ; then \
+ $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \
+ fi && \
+- $(ECHO) "Library loads for: $1" && \
+- $(LDD) $1 && \
+ $(ECHO) "RUNPATH for: $1" && \
+ ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \
+ )
diff --git a/user/openjdk7/icedtea-jdk-fix-ipv6-init.patch b/user/openjdk7/icedtea-jdk-fix-ipv6-init.patch
new file mode 100644
index 000000000..11f3bf6dd
--- /dev/null
+++ b/user/openjdk7/icedtea-jdk-fix-ipv6-init.patch
@@ -0,0 +1,42 @@
+--- openjdk/jdk/src/solaris/native/java/net/net_util_md.c.orig
++++ openjdk/jdk/src/solaris/native/java/net/net_util_md.c
+@@ -561,7 +561,7 @@
+
+ static struct localinterface *localifs = 0;
+ static int localifsSize = 0; /* size of array */
+-static int nifs = 0; /* number of entries used in array */
++static int nifs = -1; /* number of entries used in array */
+
+ /* not thread safe: make sure called once from one thread */
+
+@@ -573,6 +573,10 @@
+ int index, x1, x2, x3;
+ unsigned int u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,ua,ub,uc,ud,ue,uf;
+
++ if (nifs >= 0)
++ return ;
++ nifs = 0;
++
+ if ((f = fopen("/proc/net/if_inet6", "r")) == NULL) {
+ return ;
+ }
+@@ -601,7 +605,7 @@
+ localifs = (struct localinterface *) realloc (
+ localifs, sizeof (struct localinterface)* (localifsSize+5));
+ if (localifs == 0) {
+- nifs = 0;
++ nifs = -1;
+ fclose (f);
+ return;
+ }
+@@ -624,9 +628,7 @@
+ static int getLocalScopeID (char *addr) {
+ struct localinterface *lif;
+ int i;
+- if (localifs == 0) {
+- initLocalIfs();
+- }
++ initLocalIfs();
+ for (i=0, lif=localifs; i<nifs; i++, lif++) {
+ if (memcmp (addr, lif->localaddr, 16) == 0) {
+ return lif->index;
diff --git a/user/openjdk7/icedtea-jdk-musl.patch b/user/openjdk7/icedtea-jdk-musl.patch
new file mode 100644
index 000000000..49c16d73a
--- /dev/null
+++ b/user/openjdk7/icedtea-jdk-musl.patch
@@ -0,0 +1,116 @@
+diff -ru openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp
+--- openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp 2014-06-12 20:14:44.000000000 +0000
++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp 2014-07-15 07:19:52.186682096 +0000
+@@ -46,6 +46,8 @@
+
+ #include "zip.h"
+
++#define uchar unsigned char
++
+ #ifdef NO_ZLIB
+
+ inline bool jar::deflate_bytes(bytes& head, bytes& tail) {
+diff -ru openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h
+--- openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h 2014-06-12 20:14:44.000000000 +0000
++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h 2014-07-15 07:19:52.186682096 +0000
+@@ -23,9 +23,7 @@
+ * questions.
+ */
+
+-#define ushort unsigned short
+-#define uint unsigned int
+-#define uchar unsigned char
++#include <sys/types.h>
+
+ struct unpacker;
+
+diff -ru openjdk.orig/jdk/src/share/native/sun/awt/medialib/mlib_types.h openjdk/jdk/src/share/native/sun/awt/medialib/mlib_types.h
+--- openjdk.orig/jdk/src/share/native/sun/awt/medialib/mlib_types.h 2014-06-12 20:14:44.000000000 +0000
++++ openjdk/jdk/src/share/native/sun/awt/medialib/mlib_types.h 2014-07-15 07:19:52.186682096 +0000
+@@ -27,6 +27,7 @@
+ #ifndef MLIB_TYPES_H
+ #define MLIB_TYPES_H
+
++#include <stddef.h> /* for NULL */
+ #include <limits.h>
+ #if defined(_MSC_VER)
+ #include <float.h> /* for FLT_MAX and DBL_MAX */
+diff -ru openjdk.orig/jdk/src/solaris/native/java/net/Inet4AddressImpl.c openjdk/jdk/src/solaris/native/java/net/Inet4AddressImpl.c
+--- openjdk.orig/jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2014-06-12 20:14:44.000000000 +0000
++++ openjdk/jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2014-07-15 07:19:52.186682096 +0000
+@@ -47,7 +47,7 @@
+
+ #include "java_net_Inet4AddressImpl.h"
+
+-#if defined(__GLIBC__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 601104))
++#if defined(__linux__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 601104))
+ #define HAS_GLIBC_GETHOSTBY_R 1
+ #endif
+
+diff -ru openjdk.orig/jdk/src/solaris/native/java/net/NetworkInterface.c openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c
+--- openjdk.orig/jdk/src/solaris/native/java/net/NetworkInterface.c 2014-06-12 20:14:44.000000000 +0000
++++ openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c 2014-07-15 07:19:52.186682096 +0000
+@@ -47,7 +47,6 @@
+
+ #ifdef __linux__
+ #include <sys/ioctl.h>
+-#include <bits/ioctls.h>
+ #include <sys/utsname.h>
+ #include <stdio.h>
+ #endif
+diff -ru openjdk.orig/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
+--- openjdk.orig/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2014-06-12 20:14:44.000000000 +0000
++++ openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2014-07-15 07:19:52.190015524 +0000
+@@ -35,7 +35,6 @@
+ #endif
+ #ifdef __linux__
+ #include <unistd.h>
+-#include <sys/sysctl.h>
+ #include <sys/utsname.h>
+ #include <netinet/ip.h>
+
+diff -ru openjdk.orig/jdk/src/solaris/native/java/net/PlainSocketImpl.c openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c
+--- openjdk.orig/jdk/src/solaris/native/java/net/PlainSocketImpl.c 2014-06-12 20:14:44.000000000 +0000
++++ openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c 2014-07-15 07:19:52.190015524 +0000
+@@ -43,7 +43,6 @@
+ #endif
+ #ifdef __linux__
+ #include <unistd.h>
+-#include <sys/sysctl.h>
+ #endif
+
+ #include "jvm.h"
+diff -ru openjdk.orig/jdk/src/solaris/native/java/net/linux_close.c openjdk/jdk/src/solaris/native/java/net/linux_close.c
+--- openjdk.orig/jdk/src/solaris/native/java/net/linux_close.c 2014-06-12 20:14:44.000000000 +0000
++++ openjdk/jdk/src/solaris/native/java/net/linux_close.c 2014-07-15 07:22:17.609355950 +0000
+@@ -75,7 +75,7 @@
+ #ifdef _AIX
+ static int sigWakeup = (SIGRTMAX - 1);
+ #else
+-static int sigWakeup = (__SIGRTMAX - 2);
++static int sigWakeup;
+ #endif
+
+ /*
+@@ -148,6 +148,9 @@
+ /*
+ * Setup the signal handler
+ */
++#ifndef __AIX
++ sigWakeup = SIGRTMAX - 2;
++#endif
+ sa.sa_handler = sig_wakeup;
+ sa.sa_flags = 0;
+ sigemptyset(&sa.sa_mask);
+diff -ru openjdk.orig/jdk/src/solaris/native/sun/nio/ch/NativeThread.c openjdk/jdk/src/solaris/native/sun/nio/ch/NativeThread.c
+--- openjdk.orig/jdk/src/solaris/native/sun/nio/ch/NativeThread.c 2014-06-12 20:14:44.000000000 +0000
++++ openjdk/jdk/src/solaris/native/sun/nio/ch/NativeThread.c 2014-07-15 07:19:52.190015524 +0000
+@@ -38,7 +38,7 @@
+ #include <sys/signal.h>
+
+ /* Also defined in src/solaris/native/java/net/linux_close.c */
+-#define INTERRUPT_SIGNAL (__SIGRTMAX - 2)
++#define INTERRUPT_SIGNAL (SIGRTMAX - 2)
+
+ static void
+ nullHandler(int sig)
diff --git a/user/openjdk7/icedtea-jdk-no-lib-nsl-uclibc.patch b/user/openjdk7/icedtea-jdk-no-lib-nsl-uclibc.patch
new file mode 100644
index 000000000..26f89bb54
--- /dev/null
+++ b/user/openjdk7/icedtea-jdk-no-lib-nsl-uclibc.patch
@@ -0,0 +1,84 @@
+--- openjdk.orig/hotspot/agent/src/os/solaris/dbx/Makefile
++++ openjdk/hotspot/agent/src/os/solaris/dbx/Makefile
+@@ -50,7 +50,7 @@
+ CFLAGS_32bit := -xarch=v8
+ CFLAGS_64bit := -xarch=v9
+ CFLAGS := -PIC -xO3 $(INCLUDES)
+-LIBS := -lsocket -lnsl -lrtld_db
++LIBS := -lsocket -lrtld_db
+ LDFLAGS := -G
+
+ ifneq "$(ARCH)" "i486"
+--- openjdk.orig/jdk/make/java/hpi/hpi_common.gmk
++++ openjdk/jdk/make/java/hpi/hpi_common.gmk
+@@ -86,5 +86,5 @@
+ # Things that must be linked in.
+ #
+ ifneq ($(PLATFORM), windows)
+-OTHER_LDLIBS += $(LIBSOCKET) -lnsl $(LIBM) -ldl
++OTHER_LDLIBS += $(LIBSOCKET) $(LIBM) -ldl
+ endif
+--- openjdk.orig/jdk/make/java/java/Makefile
++++ openjdk/jdk/make/java/java/Makefile
+@@ -205,7 +205,7 @@
+ OTHER_LDLIBS += $(JVMLIB) -libpath:$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) fdlibm.lib \
+ -libpath:$(OBJDIR)/../../../verify/$(OBJDIRNAME) verify.lib
+ else
+-OTHER_LDLIBS += $(JVMLIB) -lverify $(LIBSOCKET) -lnsl -ldl \
++OTHER_LDLIBS += $(JVMLIB) -lverify $(LIBSOCKET) -ldl \
+ -L$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) -lfdlibm.$(ARCH)
+ endif
+
+--- openjdk.orig/jdk/make/java/java_hprof_demo/Makefile
++++ openjdk/jdk/make/java/java_hprof_demo/Makefile
+@@ -83,7 +83,7 @@
+ ifeq ($(PLATFORM), windows)
+ OTHER_LDLIBS += wsock32.lib winmm.lib
+ else
+- OTHER_LDLIBS += $(LIBSOCKET) -lnsl -ldl
++ OTHER_LDLIBS += $(LIBSOCKET) -ldl
+ endif
+
+ #
+--- openjdk.orig/jdk/make/java/net/Makefile
++++ openjdk/jdk/make/java/net/Makefile
+@@ -97,7 +97,7 @@
+ # Will not compile at warning level 3 if warnings are fatal
+ COMPILER_WARNINGS_FATAL=false
+ else
+- OTHER_LDLIBS = $(LIBSOCKET) -lnsl -ldl $(JVMLIB)
++ OTHER_LDLIBS = $(LIBSOCKET) -ldl $(JVMLIB)
+ endif
+ ifeq ($(PLATFORM), linux)
+ OTHER_LDLIBS += -lpthread
+--- openjdk.orig/jdk/make/jpda/transport/socket/Makefile
++++ openjdk/jdk/make/jpda/transport/socket/Makefile
+@@ -42,11 +42,11 @@
+ endif
+
+ ifeq ($(PLATFORM), linux)
+- OTHER_LDLIBS += -lnsl $(LIBSOCKET) -lpthread
++ OTHER_LDLIBS += $(LIBSOCKET) -lpthread
+ endif
+
+ ifeq ($(PLATFORM), solaris)
+- OTHER_LDLIBS += -lnsl $(LIBSOCKET)
++ OTHER_LDLIBS += $(LIBSOCKET)
+ endif
+
+ ifeq ($(PLATFORM), windows)
+--- openjdk.orig/jdk/make/mkdemo/jvmti/hprof/Makefile
++++ openjdk/jdk/make/mkdemo/jvmti/hprof/Makefile
+@@ -39,10 +39,10 @@
+ EXTRA_LIBS += wsock32.lib winmm.lib
+ endif
+ ifeq ($(PLATFORM), solaris)
+- OTHER_LDLIBS += $(LIBSOCKET) -lnsl -ldl
++ OTHER_LDLIBS += $(LIBSOCKET) -ldl
+ endif
+ ifeq ($(PLATFORM), linux)
+- OTHER_LDLIBS += $(LIBSOCKET) -lnsl -ldl -lpthread
++ OTHER_LDLIBS += $(LIBSOCKET) -ldl -lpthread
+ endif
+
+ #
diff --git a/user/openjdk7/icedtea-jdk-no-soname.patch b/user/openjdk7/icedtea-jdk-no-soname.patch
new file mode 100644
index 000000000..fe6bbb732
--- /dev/null
+++ b/user/openjdk7/icedtea-jdk-no-soname.patch
@@ -0,0 +1,12 @@
+--- ./openjdk/jdk/make/common/Defs-linux.gmk.orig
++++ ./openjdk/jdk/make/common/Defs-linux.gmk
+@@ -248,7 +248,9 @@
+ #
+ LDFLAGS_OPT = -Xlinker -O1
+ LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH)
++ifdef LIBRARY
+ LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX)
++endif
+
+ #
+ # -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always
diff --git a/user/openjdk7/icedtea-remove-gawk.patch b/user/openjdk7/icedtea-remove-gawk.patch
new file mode 100644
index 000000000..98e9878b7
--- /dev/null
+++ b/user/openjdk7/icedtea-remove-gawk.patch
@@ -0,0 +1,22 @@
+--- openjdk/corba/make/common/shared/Defs-utils.gmk.old 2018-10-22 05:22:47.000000000 +0000
++++ openjdk/corba/make/common/shared/Defs-utils.gmk 2019-02-27 00:44:26.900000000 +0000
+@@ -182,7 +182,7 @@
+ # others have it in /usr/bin.
+ SORT=$(firstword $(wildcard $(UTILS_COMMAND_PATH)sort) \
+ $(wildcard $(UTILS_USR_BIN_PATH)sort))
+- NAWK = $(USRBIN_PATH)gawk
++ NAWK = $(USRBIN_PATH)mawk
+ # Intrinsic unix command, with backslash-escaped character interpretation
+ ECHO = /bin/echo -e
+ # These are really in UTILS_USR_BIN_PATH on Linux (only sccs is not)
+--- openjdk/jdk/make/common/shared/Defs-utils.gmk.old 2019-02-27 00:40:12.430000000 +0000
++++ openjdk/jdk/make/common/shared/Defs-utils.gmk 2019-02-27 00:43:49.520000000 +0000
+@@ -207,7 +207,7 @@
+ # others have it in /usr/bin.
+ SORT=$(firstword $(wildcard $(UTILS_COMMAND_PATH)sort) \
+ $(wildcard $(UTILS_USR_BIN_PATH)sort))
+- NAWK = $(USRBIN_PATH)gawk
++ NAWK = $(USRBIN_PATH)mawk
+ # Intrinsic unix command, with backslash-escaped character interpretation
+ ECHO = /bin/echo -e
+ # These are really in UTILS_USR_BIN_PATH on Linux
diff --git a/user/openjdk7/icedtea-tar.patch b/user/openjdk7/icedtea-tar.patch
new file mode 100644
index 000000000..98c280184
--- /dev/null
+++ b/user/openjdk7/icedtea-tar.patch
@@ -0,0 +1,22 @@
+--- openjdk/jdk/make/common/shared/Defs-utils.gmk.old 2019-02-27 01:45:10.950000000 +0000
++++ openjdk/jdk/make/common/shared/Defs-utils.gmk 2019-02-27 02:26:55.870000000 +0000
+@@ -150,7 +150,7 @@
+ SHOWREV = $(UTILS_USR_BIN_PATH)showrev
+ SORT = $(UTILS_COMMAND_PATH)sort
+ TAIL = $(UTILS_USR_BIN_PATH)tail
+-TAR = $(UTILS_COMMAND_PATH)tar
++TAR = $(UTILS_USR_BIN_PATH)tar
+ TEST = $(UTILS_USR_BIN_PATH)test
+ TOUCH = $(UTILS_COMMAND_PATH)touch
+ TR = $(UTILS_USR_BIN_PATH)tr
+--- openjdk/corba/make/common/shared/Defs-utils.gmk.old 2019-02-27 02:27:38.910000000 +0000
++++ openjdk/corba/make/common/shared/Defs-utils.gmk 2019-02-27 02:28:00.210000000 +0000
+@@ -129,7 +129,7 @@
+ SORT = $(UTILS_COMMAND_PATH)sort
+ STRIP = $(UTILS_CCS_BIN_PATH)strip
+ TAIL = $(UTILS_USR_BIN_PATH)tail
+-TAR = $(UTILS_COMMAND_PATH)tar
++TAR = $(UTILS_USR_BIN_PATH)tar
+ TEST = $(UTILS_USR_BIN_PATH)test
+ TOUCH = $(UTILS_COMMAND_PATH)touch
+ TR = $(UTILS_USR_BIN_PATH)tr
diff --git a/user/openjdk7/icedtea-xattr.patch b/user/openjdk7/icedtea-xattr.patch
new file mode 100644
index 000000000..51aee48c4
--- /dev/null
+++ b/user/openjdk7/icedtea-xattr.patch
@@ -0,0 +1,11 @@
+--- openjdk/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c.old 2018-10-22 05:32:13.000000000 +0000
++++ openjdk/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c 2019-02-27 01:37:00.950000000 +0000
+@@ -38,7 +38,7 @@
+
+ #ifdef COMPILE_AGAINST_SYSCALLS
+ #include <sys/types.h>
+-#include <attr/xattr.h>
++#include <sys/xattr.h>
+ #else
+ #include <syscalls_fp.h>
+ #endif
diff --git a/user/openjdk7/remove-gawk.patch b/user/openjdk7/remove-gawk.patch
new file mode 100644
index 000000000..dccddbab9
--- /dev/null
+++ b/user/openjdk7/remove-gawk.patch
@@ -0,0 +1,125 @@
+--- icedtea-2.6.16/configure.old 2019-01-01 20:11:07.846602426 +0000
++++ icedtea-2.6.16/configure 2019-02-27 00:23:41.230000000 +0000
+@@ -6881,108 +6881,7 @@
+ LDD="$ac_cv_prog_LDD"
+ fi
+
+-if test -n "$ac_tool_prefix"; then
+- # Extract the first word of "${ac_tool_prefix}gawk", so it can be a program name with args.
+-set dummy ${ac_tool_prefix}gawk; ac_word=$2
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+-$as_echo_n "checking for $ac_word... " >&6; }
+-if ${ac_cv_path_GAWK+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+- case $GAWK in
+- [\\/]* | ?:[\\/]*)
+- ac_cv_path_GAWK="$GAWK" # Let the user override the test with a path.
+- ;;
+- *)
+- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+- IFS=$as_save_IFS
+- test -z "$as_dir" && as_dir=.
+- for ac_exec_ext in '' $ac_executable_extensions; do
+- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+- ac_cv_path_GAWK="$as_dir/$ac_word$ac_exec_ext"
+- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+- break 2
+- fi
+-done
+- done
+-IFS=$as_save_IFS
+-
+- ;;
+-esac
+-fi
+-GAWK=$ac_cv_path_GAWK
+-if test -n "$GAWK"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GAWK" >&5
+-$as_echo "$GAWK" >&6; }
+-else
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+-$as_echo "no" >&6; }
+-fi
+-
+-
+-fi
+-if test -z "$ac_cv_path_GAWK"; then
+- ac_pt_GAWK=$GAWK
+- # Extract the first word of "gawk", so it can be a program name with args.
+-set dummy gawk; ac_word=$2
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+-$as_echo_n "checking for $ac_word... " >&6; }
+-if ${ac_cv_path_ac_pt_GAWK+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+- case $ac_pt_GAWK in
+- [\\/]* | ?:[\\/]*)
+- ac_cv_path_ac_pt_GAWK="$ac_pt_GAWK" # Let the user override the test with a path.
+- ;;
+- *)
+- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+- IFS=$as_save_IFS
+- test -z "$as_dir" && as_dir=.
+- for ac_exec_ext in '' $ac_executable_extensions; do
+- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+- ac_cv_path_ac_pt_GAWK="$as_dir/$ac_word$ac_exec_ext"
+- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+- break 2
+- fi
+-done
+- done
+-IFS=$as_save_IFS
+-
+- ;;
+-esac
+-fi
+-ac_pt_GAWK=$ac_cv_path_ac_pt_GAWK
+-if test -n "$ac_pt_GAWK"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_GAWK" >&5
+-$as_echo "$ac_pt_GAWK" >&6; }
+-else
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+-$as_echo "no" >&6; }
+-fi
+-
+- if test "x$ac_pt_GAWK" = x; then
+- GAWK=""
+- else
+- case $cross_compiling:$ac_tool_warned in
+-yes:)
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+-ac_tool_warned=yes ;;
+-esac
+- GAWK=$ac_pt_GAWK
+- fi
+-else
+- GAWK="$ac_cv_path_GAWK"
+-fi
+-
+- if test x"$GAWK" = x ; then
+- as_fn_error $? "The following program was not found on the PATH: gawk" "$LINENO" 5
+- fi
+-
++GAWK="$AWK"
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}perl", so it can be a program name with args.
+--- icedtea-2.6.16/configure.ac.old 2019-01-01 20:09:39.139994680 +0000
++++ icedtea-2.6.16/configure.ac 2019-02-27 00:25:01.960000000 +0000
+@@ -39,9 +39,7 @@
+ IT_FIND_TOOLS([FASTJAR], [fastjar jar])
+ IT_FIND_TOOLS([SED],[gsed sed])
+ AC_CHECK_TOOL([LDD], [ldd])
+-dnl OpenJDK's README-builds.html lists gawk as a build dependency so we
+-dnl check for it explicitly rather than using AC_PROG_AWK.
+-IT_FIND_TOOL([GAWK], [gawk])
++IT_FIND_TOOL([GAWK], [awk])
+ IT_FIND_TOOL([PERL], [perl])
+ IT_CHECK_FOR_MERCURIAL
+ IT_OBTAIN_HG_REVISIONS
diff --git a/user/openjdk7/xattr.patch b/user/openjdk7/xattr.patch
new file mode 100644
index 000000000..258f9f12d
--- /dev/null
+++ b/user/openjdk7/xattr.patch
@@ -0,0 +1,11 @@
+--- icedtea-2.6.16/acinclude.m4.old 2019-01-01 20:09:39.127994868 +0000
++++ icedtea-2.6.16/acinclude.m4 2019-02-27 00:35:33.320000000 +0000
+@@ -2271,7 +2271,7 @@
+ dnl Check for syscalls
+ AC_CHECK_FUNCS([openat64 fstatat64 fgetxattr fsetxattr fremovexattr flistxattr unlinkat renameat futimesat fdopendir epoll_create epoll_ctl epoll_wait],,
+ [AC_MSG_ERROR([Could not find required syscalls; check config.log and use --disable-compile-against-syscalls if necessary.])])
+- AC_CHECK_HEADERS([sys/epoll.h attr/xattr.h],
++ AC_CHECK_HEADERS([sys/epoll.h sys/xattr.h],
+ , [AC_MSG_ERROR([Could not find required system headers; install the appropriate files from glibc-headers, libc6-dev and/or libattr-devel, libattr1-dev or use --disable-compile-against-syscalls if necessary.])])
+ ENABLE_SYSCALL_COMPILATION=true
+ fi
diff --git a/user/perl-test-differences/APKBUILD b/user/perl-test-differences/APKBUILD
index 64a93147b..56d34bce8 100644
--- a/user/perl-test-differences/APKBUILD
+++ b/user/perl-test-differences/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Dan Theisen <djt@hxx.in>
# Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org>
pkgname=perl-test-differences
-pkgver=0.64
+pkgver=0.65
pkgrel=0
pkgdesc="Test strings and data structures and show differences if not ok"
url="https://metacpan.org/pod/Test::Differences"
@@ -31,4 +31,4 @@ package() {
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}
-sha512sums="118a4b8e3f61f64d6676c82913bb605a843a408f3fc5d960b40cc86f10423380a203b2a5604e15ba8d4e0cff96af88b551fba1c7aa2ada3c0ef408a27ee5f069 Test-Differences-0.64.tar.gz"
+sha512sums="298058b0ca94b865ac84bbed86275e1d2c3f9eadafc70c017d471d39a78a1370112aa63c09ff072621b12b1e6a84e9b456fe05e17d0d2893e2f5fc9946f81b87 Test-Differences-0.65.tar.gz"
diff --git a/user/s6-dns/APKBUILD b/user/s6-dns/APKBUILD
index a0fa13696..aa1473ba5 100644
--- a/user/s6-dns/APKBUILD
+++ b/user/s6-dns/APKBUILD
@@ -1,16 +1,17 @@
# Contributor: Laurent Bercot <ska-adelie@skarnet.org>
# Maintainer: Laurent Bercot <ska-adelie@skarnet.org>
pkgname=s6-dns
-pkgver=2.3.0.1
+pkgver=2.3.0.2
pkgrel=0
pkgdesc="skarnet.org's DNS client libraries and command-line DNS client utilities"
url="https://skarnet.org/software/s6-dns/"
arch="all"
-license="ISC"
-makedepends="skalibs-dev"
options="!check"
-makedepends="skalibs-dev"
-subpackages="$pkgname-dev $pkgname-doc"
+license="ISC"
+_skalibs_version=2.8
+depends=
+makedepends="skalibs-dev>=$_skalibs_version skalibs-libs-dev>=$_skalibs_version"
+subpackages="$pkgname-libs $pkgname-dev $pkgname-libs-dev:libsdev $pkgname-doc"
source="https://skarnet.org/software/$pkgname/$pkgname-$pkgver.tar.gz"
build() {
@@ -20,6 +21,7 @@ build() {
--enable-static \
--disable-allstatic \
--prefix=/usr \
+ --libdir=/usr/lib \
--libexecdir="/usr/lib/$package" \
--with-dynlib=/lib
make
@@ -30,10 +32,38 @@ package() {
make DESTDIR="$pkgdir" install
}
+
+libs() {
+ pkgdesc="$pkgdesc (shared libraries)"
+ depends="skalibs-libs>=$_skalibs_version"
+ mkdir -p "$subpkgdir/usr/lib"
+ mv "$pkgdir"/usr/lib/*.so.* "$subpkgdir/usr/lib/"
+}
+
+
+dev() {
+ pkgdesc="$pkgdesc (development files)"
+ depends="skalibs-dev>=$_skalibs_version"
+ mkdir -p "$subpkgdir/usr/include" "$subpkgdir/usr/lib"
+ mv "$pkgdir/usr/include" "$subpkgdir/usr/"
+ mv "$pkgdir"/usr/lib/*.a "$subpkgdir/usr/lib/"
+}
+
+
+libsdev() {
+ pkgdesc="$pkgdesc (development files for dynamic linking)"
+ depends="$pkgname-dev"
+ mkdir -p "$subpkgdir/usr/lib"
+ mv "$pkgdir"/usr/lib/*.so "$subpkgdir/usr/lib/"
+}
+
+
doc() {
- default_doc
- mkdir -p "$subpkgdir"/usr/share/doc
- cp -a "$builddir"/doc "$subpkgdir"/usr/share/doc/$pkgname
+ pkgdesc="$pkgdesc (documentation)"
+ depends=
+ install_if="docs $pkgname=$pkgver-r$pkgrel"
+ mkdir -p "$subpkgdir/usr/share/doc"
+ cp -a "$builddir/doc" "$subpkgdir/usr/share/doc/$pkgname"
}
-sha512sums="69ae32f9b4ff22a5d38e3a2c950357d8c8032a649c1d81e4a4e5f474ae5c1bb1072555baa1a34f955293aa0f66a93f51f2cc8efd8aa56704b906e0b0979f8157 s6-dns-2.3.0.1.tar.gz"
+sha512sums="fec0edf852423bf8f717fcdc3c00c8f38e7bab4d9a03d14e6e81ad3f175b5db57be44409761bbd990f56f81c3ae8e0aa76ab8c5b65fec823a0ce392bf41cdf33 s6-dns-2.3.0.2.tar.gz"
diff --git a/user/s6-networking/APKBUILD b/user/s6-networking/APKBUILD
index 39b08026f..09ba89702 100644
--- a/user/s6-networking/APKBUILD
+++ b/user/s6-networking/APKBUILD
@@ -1,16 +1,17 @@
# Contributor: Laurent Bercot <ska-adelie@skarnet.org>
# Maintainer: Laurent Bercot <ska-adelie@skarnet.org>
pkgname=s6-networking
-pkgver=2.3.0.3
+pkgver=2.3.0.4
pkgrel=0
-pkgdesc="skarnet.org's UCSPI Unix and TCP tools, access control tools, and network time management utilities."
+pkgdesc="skarnet.org's UCSPI TCP tools, access control tools, and network time management utilities."
url="https://skarnet.org/software/$pkgname/"
arch="all"
-license="ISC"
options="!check" # No test suite.
-depends_dev="skalibs-dev bearssl-dev"
-makedepends="skalibs-dev execline-dev s6-dev s6-dns-dev bearssl-dev"
-subpackages="$pkgname-dev $pkgname-doc"
+license="ISC"
+_skalibs_version=2.8
+depends="execline"
+makedepends="skalibs-dev>=$_skalibs_version skalibs-libs-dev>=$_skalibs_version execline-dev s6-dev s6-libs-dev s6-dns-dev s6-dns-libs-dev bearssl-dev"
+subpackages="$pkgname-libs $pkgname-dev $pkgname-libs-dev:libsdev $pkgname-doc"
source="https://skarnet.org/software/$pkgname/$pkgname-$pkgver.tar.gz"
build() {
@@ -20,6 +21,7 @@ build() {
--enable-static \
--disable-allstatic \
--prefix=/usr \
+ --libdir=/usr/lib \
--libexecdir="/usr/lib/$pkgname" \
--with-dynlib=/lib \
--enable-ssl=bearssl
@@ -31,10 +33,38 @@ package() {
make DESTDIR="$pkgdir" install
}
+
+libs() {
+ pkgdesc="$pkgdesc (shared libraries)"
+ depends="skalibs-libs>=$_skalibs_version"
+ mkdir -p "$subpkgdir/usr/lib"
+ mv "$pkgdir"/usr/lib/*.so.* "$subpkgdir/usr/lib/"
+}
+
+
+dev() {
+ pkgdesc="$pkgdesc (development files)"
+ depends="skalibs-dev>=$_skalibs_version"
+ mkdir -p "$subpkgdir/usr/include" "$subpkgdir/usr/lib"
+ mv "$pkgdir/usr/include" "$subpkgdir/usr/"
+ mv "$pkgdir"/usr/lib/*.a "$subpkgdir/usr/lib/"
+}
+
+
+libsdev() {
+ pkgdesc="$pkgdesc (development files for dynamic linking)"
+ depends="$pkgname-dev"
+ mkdir -p "$subpkgdir/usr/lib"
+ mv "$pkgdir"/usr/lib/*.so "$subpkgdir/usr/lib/"
+}
+
+
doc() {
- default_doc
+ pkgdesc="$pkgdesc (documentation)"
+ depends=
+ install_if="docs $pkgname=$pkgver-r$pkgrel"
mkdir -p "$subpkgdir/usr/share/doc"
cp -a "$builddir/doc" "$subpkgdir/usr/share/doc/$pkgname"
}
-sha512sums="f710c8c67b88523d4d461ab775ad3a56ca148e0e5ee4c02fe40d0783ff43af8779e598548db5048cc32852be6659f2feb7ac29ba07a953daa0039cec0fc14762 s6-networking-2.3.0.3.tar.gz"
+sha512sums="e0a6dbaf3420beae5b6bab1cedeaeb5d58dea36c9a6e1c3f7140515c83eaf3e872f896d90e43771d74669edcc0a3f25ba8135cc3a21d378a297d92ba2abc62d3 s6-networking-2.3.0.4.tar.gz"
diff --git a/user/xorgproto/APKBUILD b/user/xorgproto/APKBUILD
index 0cbde9cbc..f1f802e13 100644
--- a/user/xorgproto/APKBUILD
+++ b/user/xorgproto/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=xorgproto
pkgver=2018.4
-pkgrel=0
+pkgrel=1
pkgdesc="X11 protocol headers (combination)"
url="https://www.X.Org/"
arch="noarch"
@@ -49,7 +49,9 @@ replaces="bigreqsproto compositeproto damageproto dri2proto dri3proto
randrproto recordproto renderproto resourceproto scrnsaverproto
videoproto xcmiscproto xextproto xf86bigfontproto xf86dgaproto
xf86driproto xf86miscproto xf86vidmodeproto xineramaproto xproto"
-source="https://xorg.freedesktop.org/archive/individual/proto/xorgproto-$pkgver.tar.bz2"
+source="https://xorg.freedesktop.org/archive/individual/proto/xorgproto-$pkgver.tar.bz2
+ xprint.patch
+ "
build() {
cd "$builddir"
@@ -60,7 +62,8 @@ build() {
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
- --datadir=/usr/lib
+ --datadir=/usr/lib \
+ --enable-legacy
make
}
@@ -74,4 +77,5 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="2db682d10280ca58cdc04d8eb9fef30c111d4cd379de9fec86cff317865b859a576de5426447be9231d24be9762cc1d684c57383a99ad499398e8b7d62b1c03c xorgproto-2018.4.tar.bz2"
+sha512sums="2db682d10280ca58cdc04d8eb9fef30c111d4cd379de9fec86cff317865b859a576de5426447be9231d24be9762cc1d684c57383a99ad499398e8b7d62b1c03c xorgproto-2018.4.tar.bz2
+18fc5228bb53eb15cfa0018f718e06faba0384a41e3aa0006fbf63e2a98779fdab527ea9eb8e22bb6a6f1ca02340ad8dad1260ee16e75f0416461ccefaa6df73 xprint.patch"
diff --git a/user/xorgproto/xprint.patch b/user/xorgproto/xprint.patch
new file mode 100644
index 000000000..5b713de0a
--- /dev/null
+++ b/user/xorgproto/xprint.patch
@@ -0,0 +1,424 @@
+--- a/man/Xprint.man.orig 2018-07-24 10:46:56 UTC
++++ b/man/Xprint.man
+@@ -0,0 +1,421 @@
++.\" -*- coding: us-ascii -*-
++.TH Xprint __miscmansuffix__ "8 October 2004"
++.SH NAME
++Xprint \- The "X print service" - a portable, network-transparent printing system based on the X11 protocol
++.SH SYNOPSIS
++Xprint is a very flexible, extensible, scaleable, client/server
++print system based on ISO 10175 (and some other specs) and the X11
++rendering protocol.
++Using Xprint an application can search, query and use devices like
++printers, FAX machines or create documents in formats like PDF.
++In particular, an application can seek a printer, query supported
++attributes (like paper size, trays, fonts etc.), configure the printer
++device to match it\(cqs needs and print on it like on any other X device
++reusing parts of the code which is used for the video card Xserver.
++.SH OVERVIEW
++The "X Print Service" technology allows X rendering to devices such as
++printers and fax. Most of the service is available in the X11
++technology stack as Xp, with the remainder in single toolkit stacks (e.g. DtPrint for CDE).
++Modifications have also been made to the LessTif/Motif/Qt technology
++stacks to support Xprint.
++.PP
++The Xp portion consists of:
++.TP 0.2i
++\(bu
++Xp Extension for the X-Server (included in the X-Server Xprt)
++.TP 0.2i
++\(bu
++Xp Extension API for the client side (libXp/libXprintUtils)
++.TP 0.2i
++\(bu
++PCL ddx driver that converts core X to native PCL
++.TP 0.2i
++\(bu
++PDF ddx driver that converts core X to native PDF
++.TP 0.2i
++\(bu
++PostScript ddx driver that converts core X to native PostScript
++.TP 0.2i
++\(bu
++Raster ddx driver that generates xwd rasters which can be converted to PCL, PDF or PostScript rasters
++.PP
++.PP
++From an X clients perspective, it can attach to one of two nearly
++identical X-Servers, a "Video" X-Server, and a "Print" X-Server
++which has the additional Xp capability but otherwise looks and
++behaves the same.
++.SH "HOW THE X PRINT SERVICE WORKS"
++The X Print Service expands on the traditional X-Server and Xlib world
++in four ways.
++.TP 0.4i
++1.
++Most obvious is the use of "print ddx drivers" instead of
++"video ddx drivers". While a video ddx driver modifies pixels
++in a video frame buffer, a print ddx driver generates "page
++description language (PDL)" output (such as PCL, PDF or PostScript)
++or sends the print rendering instructions to a platform-specific
++print API (like Win32/GDI).
++
++Once a print ddx driver generates PDL output, it can be sent to
++a spooler such as \fBlp\fR(1)
++or retrieved by the client (to implement functionality like "print-to-file").
++
++Though not currently done, a single X-Server can support both
++print and video ddx drivers.
++.TP 0.4i
++2.
++Since printers support "paged" output, unlike video, a portion
++of the Xp Extension supports APIs to delineate printed output.
++For example, XpStartPage and XpEndPage tell the X-Server where
++a physical page starts and ends in an otherwise continuous
++stream of X rendering primitives. Likewise, XpStartJob and
++XpEndJob determine when a collection of pages starts and ends.
++XpEndJob typically causes the generated PDL to be submitted to
++a spooler, such as \fBlp\fR(1).
++.TP 0.4i
++3.
++Since printers have extensive capabilities, another portion of
++the Xp Extension supports APIs to manipulate "print contexts".
++
++Once a printer is selected using the Xp Extension API, a print
++context to represent it can be created. A print context
++embodies the printer selected - it contains the printer's
++default capabilities, selectable range of capabilities,
++printer state, and generated output. Some "attributes" within
++the print context can be modified by the user, and the
++X-Server and print ddx driver will react accordingly. For
++example, the attribute "content-orientation" can be set to
++"landscape" or "portrait" (if the printer supports these
++values - which can be queried using the Xprint API as well).
++.TP 0.4i
++4.
++Since printers can have "built in" fonts, the Xp Extension in
++the X-Server works with the print ddx drivers to make
++available (for printing only) additional fonts on a per print
++context basis.
++
++When a print context is created and set for a given printer,
++the X font calls may be able to access additional printer
++fonts. To do this (typically), the X-Server must have access
++to "printer metric files" (.pmf) that describe at minimum the
++metrics of the built in fonts.
++.PP
++.SH USAGE
++There are three tasks to start the X Print Service:
++.TP 0.4i
++1.
++configuring the X Print Server,
++.TP 0.4i
++2.
++starting the X Print Service
++.TP 0.4i
++3.
++configuring the user session so that clients can find the running X Print Service
++.PP
++.PP
++The tasks are described in detail below.
++.SH "SERVER CONFIGURATION"
++The X Print Server (Xprt) can read a number of configuration files which
++control its behavior and support for printers. Each vendor platform has
++a default location for this information. Xprt can also read the
++environment variable \fBXPCONFIGDIR\fR to locate alternate configuration
++directories. Common settings include:
++
++export XPCONFIGDIR=/X11/lib/X11/XpConfig/
++.PP
++export XPCONFIGDIR=/proj/x11/xc/programs/Xserver/XpConfig/
++
++.PP
++Xprt has many built-in defaults, and lacking any configuration files,
++will immediately try to support all printers visible via \fBlpstat\fR(1).
++.PP
++In order of importance for configuration by a system administrator, the
++configuration files for a "C" locale are as follows (see \fBXprt\fR(__appmansuffix__) for more
++details (including support for non-"C" locales)):
++.TP
++\fB${XPCONFIGDIR}/C/print/Xprinters\fR
++\&'Xprinters' is the top most configuration file. It tells
++Xprt which specific printer names (e.g. mylaser) should
++be supported, and whether \fBlpstat\fR(1) or other commands
++should be used to automatically supplement the list of
++printers.
++.TP
++\fB${XPCONFIGDIR}/C/print/attributes/printer\fR
++The 'printer' file maps printer names to model
++configurations (see 'model-config' below). For example,
++"mylaser" could be mapped to a "HPDJ1600C", and all other
++arbitrary printers could be mapped to a default, such as
++"HPLJ4SI". When depending on \fBlpstat\fR(1) in the Xprinters
++file, setting up defaults in 'printer' becomes all the
++more important.
++.TP
++\fB${XPCONFIGDIR}/C/print/attributes/document\fR
++The 'document' file specifies the initial document values
++for any print jobs. For example, which paper tray to
++use, what default resolution, etc.
++.TP
++\fB${XPCONFIGDIR}/C/print/attributes/job\fR
++The 'job' file specifies the initial job values for any
++print jobs. For example, "notification-profile" can be
++set so that when a print job is successfully sent to a
++printer, e-mail is sent to the user.
++.TP
++\fB${XPCONFIGDIR}/C/print/models/PSdefault/model\-config\fR, \fB${XPCONFIGDIR}/C/print/models/PSdefault/fonts/fonts.dir\fR, \fB${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00051.pmf\fR, \fB${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00093.pmf\fR
++The 'model-config' file has attributes that describe the
++printer model\(cqs capabilities and default settings.
++Printer model fonts may also be present. The model-config
++file also identifies the print ddx driver to be used.
++For each printer model supported, a complete hierarchy of
++files should exist. In most cases, these files do not
++need to be modified.
++.TP
++\fB${XPCONFIGDIR}/C/print/ddx\-config/raster/pcl\fR, \fB${XPCONFIGDIR}/C/print/ddx\-config/raster/pdf\fR, \fB${XPCONFIGDIR}/C/print/ddx\-config/raster/postscript\fR
++The print ddx drivers can have highly specific
++configuration files to control their behavior. In most
++cases, these files do not need to be modified.
++.PP
++More information in how to configure and customize the X print server can be found in the
++\fBXprt\fR(__appmansuffix__)
++manual page.
++.SH "STARTING UP"
++The summary checklist for starting the X Print Service is as follows:
++.TP 0.4i
++1.
++Choose an execution model for the X Print Service. The X
++Print Service can be run on a per-user session basis, per
++machine basis, or can be run on a few machines globally
++available to a number of users.
++.TP 0.4i
++2.
++If print jobs are to be submitted to a spooler (almost always
++the case), make sure all needed printers are available to the
++spooler subsystem (most often \fBlp\fR(1))
++on the same machine running the X Print Service.
++.TP 0.4i
++3.
++Configure the X Print Server. See ``X Print Server
++Configuration''.
++.TP 0.4i
++4.
++Depending on #1, start the X Print Server process "Xprt", and
++then the toolkit-specific Print Dialog Manager Daemon process
++(such as CDEnext's "dtpdmd") at the appropriate times.
++Note that libXprintUtils-based applications/toolkits do not need
++a Print Dialog Manager Daemon process to use Xprint.
++.PP
++The details are described below.
++.PP
++Because the X Print Service is based on X, it can be easily distributed.
++The most significant factors in which execution model to choose will be
++driven by:
++.TP 0.2i
++\(bu
++how many printers will be accessable through the printer
++subsystem on any given machine. A system administrator may
++choose to cluster printers on a few given machines, or
++scatter them across an organization and possibly make
++extensive use of remote spoolers to make them globally
++available.
++.TP 0.2i
++\(bu
++how many machines will need a copy of the X Print Server
++configuration files. The files have been architected so
++that one super-set version of them can be maintained and
++distributed (e.g. via NFS), and a per-machine or per-user
++version of the `Xprinters' is all that is needed to have the
++appropriate information in them utilized or ignored.
++.TP 0.2i
++\(bu
++how many users can demand services from a given X Print
++Service.
++.PP
++With the above in mind, some obvious execution models include:
++.TP 0.2i
++\(bu
++Global - in this model, the system administrator is choosing
++to run the X Print Service on a *few* select machines with
++appropriate printers configured, and allow clients access to
++the global resource. This can centralize the administration
++of printers and configuration files, but may have to be
++monitored for performance loading.
++
++Startup would likely be done by boot-up scripts (such as \fB/etc/init.d/xprint\fR).
++.TP 0.2i
++\(bu
++Per-machine - every machine with potential X Print Service
++users would run the service. Printer and configuration file
++administration is decentralized, and usage would be limited
++to the users on the machine.
++
++Startup would likely be done by boot-up scripts (such as \fB/etc/init.d/xprint\fR).
++.TP 0.2i
++\(bu
++Per-user session - every user would run an entire X Print
++Service for themselves. In the future, the Video X Server
++normally started may contain Print X Server capability, so
++this model becomes very natural.
++
++Startup would likely be done at session login or by
++launching actions or processes manually once the user
++logs in. Note: Deamons like "dtpdmd" must be started after Xprt.
++.PP
++.PP
++Starting of the processes is straight forward. In strict order (example is for manually starting the X print server for CDEnext usage):
++.TP 0.4i
++1.
++
++.nf
++[machineA] % Xprt [\-XpFile <Xprinters file>] [:dispNum] &
++.fi
++
++
++Note that Xprt will look for configuration files in either
++a default location or where \fBXPCONFIGDIR\fR points.
++
++\fB\-XpFile\fR specifies an alternate `Xprinters' file, rather
++than the default one or `\fB${XPCONFIGDIR}/C/print/Xprinters\fR'.
++.TP 0.4i
++2.
++
++.nf
++[machineA] % dtpdmd \-d machineA[:dispNum] [\-l /tmp/dtpdmd.log] &
++.fi
++
++
++The dtpdmd will maintain an X-Selection on the X-Server,
++and will start dtpdm's as required to service requests.
++.PP
++.PP
++In all but the per-user session model, the machine running the dtpdmd
++(thus dtpdm's) will need display authorization to the users video
++display.
++.SH "CLIENT CONFIGURATION"
++Once a X Print Server and dtpdmd have been started -- many of them
++in some cases -- clients will need to find and use them. There are
++two mechanisms that allow clients to discover X Print Servers and
++printers.
++.TP 0.2i
++\(bu
++"X Print Specifier" - assuming usage of the DtPrint/XprintUtils-based print
++applications, the following notation is understood:
++
++
++.nf
++printer_name@machine[:dispNum]
++.fi
++
++
++For example:
++
++
++.nf
++colorlj7@printhub:2
++.fi
++
++
++In the above example, the X Print Server running at `printhub:2'
++is assumed to support the printer named `colorlj7'.
++.TP 0.2i
++\(bu
++\fB${XPSERVERLIST}\fR - assuming usage of the DtPrint print dialogs,
++the environment variable \fB${XPSERVERLIST}\fR can contain a list
++of X Print Servers. For example:
++
++
++.nf
++XPSERVERLIST="printhub:2 printhub:3 otherdept:0"
++.fi
++
++
++Then in the dialogs, only a printer name needs to be entered.
++The dialog will then search the X Print Servers in \fB${XPSERVERLIST}\fR
++for a server than supports the printer, and then establish
++contact.
++.PP
++.SH "END-USER SEQUENCE"
++From most CDEnext applications, printing is accomplished by bringing
++down the <File> menu and selecting <Print...>. This will result in
++the DtPrintSetupBox dialog, which will request the name of a printer,
++and offer limited capability to configure print options (e.g. number
++of copies). If the user wishes, they can select <Setup...>, which
++will start a dtpdm capable of modifying additional print options.
++Finally, the user should select <Print>.
++.SH ENVIRONMENT
++.TP
++\fB${XPCONFIGDIR}\fR
++This environment variable points to the root
++of the Xprint server configuration directory hierarchy.
++If the variable is not defined, the default
++path is be assumed. The default path may be
++\fB/usr/X11R6/lib/X11/xserver/\fR,
++\fB/usr/lib/X11/xserver/\fR,
++\fB/usr/share/Xprint/xserver/\fR or
++\fB/usr/openwin/server/etc/XpConfig\fR, depending on the
++system, and may be configured in \fB/etc/init.d/xprint\fR.
++.TP
++\fB${LANG}\fR
++This environment variable selects the locale settings used by the Xprint server.
++Xprt allows language-specific settings (stored in \fB${XPCONFIGDIR}/${LANG}/print/\fR)
++which will override the default settings (stored in \fB${XPCONFIGDIR}/C/print/\fR).
++If \fB${LANG}\fR is not set "C" is assumed.
++.TP
++\fB${XPSERVERLIST}\fR
++The environment variable \fB${XPSERVERLIST}\fR contains a list
++of display identifiers (separated by whitespace) which tell an
++application where it can find the Xprint servers. Usually
++\fB${XPSERVERLIST}\fR is set by the profile startup scripts (e.g.
++\fB/etc/profile\fR or \fB/etc/profile.d/xprint.sh\fR) using the output of
++\fB/etc/init.d/xprint get_xpserverlist\fR.
++
++Example:
++
++.nf
++
++ export XPSERVERLIST="`/etc/init.d/xprint get_xpserverlist`"
++.fi
++
++
++Alternatively \fB${XPSERVERLIST}\fR can be set
++manually. Example:
++
++.nf
++
++ export XPSERVERLIST="littlecat:80 bitdog:72"
++.fi
++
++instructs an application to find an Xprint server at display
++80 on the machine "littlecat" and at display 72 on the
++machine bigdog.
++.TP
++\fB${XPRINTER}\fR
++The environment variable \fB${XPRINTER}\fR
++defines the default printer used by print
++applications. The syntax is either
++\fIprintername\fR or
++\fIprintername\fR@\fIdisplay\fR.
++
++Examples:
++.RS
++.TP
++\fBXPRINTER=ps003\fR
++tells an application to look for the
++first printer named "ps003" on all Xprint
++servers.
++.TP
++\fBXPRINTER=hplaser19@littlecat:80\fR
++tells an application to use the printer "hplaser19"
++on the Xprint server at display
++"littlecat:80".
++.RE
++
++
++If \fB${XPRINTER}\fR is not set the applications
++will examine the values of the \fB${PDPRINTER}\fR,
++\fB${LPDEST}\fR, and
++\fB${PRINTER}\fR environment variables (in that order).
++.SH "SEE ALSO"
++\fBX11\fR(__miscmansuffix__), \fBxplsprinters\fR(__appmansuffix__), \fBxprehashprinterlist\fR(__appmansuffix__), \fBxphelloworld\fR(__appmansuffix__), \fBxpxmhelloworld\fR(__appmansuffix__), \fBxpawhelloworld\fR(__appmansuffix__), \fBxpxthelloworld\fR(__appmansuffix__), \fBxpsimplehelloworld\fR(__appmansuffix__), \fBXserver\fR(__appmansuffix__), \fBXprt\fR(__appmansuffix__), \fBlibXp\fR(__libmansuffix__), \fBlibXprintUtils\fR(__libmansuffix__), \fBlibXprintAppUtils\fR(__libmansuffix__), \fBXmPrintShell\fR(__libmansuffix__), \fBXawPrintShell\fR(__libmansuffix__), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html), Xprint main site (http://xprint.mozdev.org/)
++.SH AUTHORS
++This manual page was written by
++Roland Mainz <roland.mainz@nrubsig.org> based on the original X11R6.6
++\fBxc/programs/Xserver/XpConfig/README\fR.