From fd4e47087abba36df5e9b6d3edffed777b40a9a8 Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Mon, 13 Feb 2012 11:03:07 -0600 Subject: [PATCH] Hopefully portshaker-compatible --- ports/Makefile.local => Makefile.local | 0 Mk/bsd.local.mk | 63 +++++++++ {ports/misc-cdn => misc-cdn}/Makefile | 0 .../bash-config/Makefile | 0 .../bash-config/distinfo | 0 .../bash-config/pkg-descr | 0 .../misc-cdn => misc-cdn}/crc32sum/Makefile | 0 .../misc-cdn => misc-cdn}/crc32sum/distinfo | 0 .../misc-cdn => misc-cdn}/crc32sum/pkg-descr | 0 {ports/misc-cdn => misc-cdn}/flag/Makefile | 0 {ports/misc-cdn => misc-cdn}/flag/distinfo | 0 {ports/misc-cdn => misc-cdn}/flag/pkg-descr | 0 .../misc-cdn => misc-cdn}/freebsd-rc/Makefile | 0 .../misc-cdn => misc-cdn}/freebsd-rc/distinfo | 0 .../freebsd-rc/pkg-descr | 0 {ports/misc-cdn => misc-cdn}/shlib/Makefile | 0 {ports/misc-cdn => misc-cdn}/shlib/distinfo | 0 {ports/misc-cdn => misc-cdn}/shlib/pkg-descr | 0 .../rsync/files/patch-server_pause.patch | 0 .../Mk_bsd.local.mk-strip-perl5-python.patch | 41 ------ .../Mk_bsd.local.mk-strip-perl5-python.patch | 43 ------- patch/deprecated/devel_glib20_Makefile.patch | 14 -- patch/deprecated/refactor | 1 - patch/deprecated/www_squid_Makefile.patch | 12 -- update | 121 ------------------ 25 files changed, 63 insertions(+), 232 deletions(-) rename ports/Makefile.local => Makefile.local (100%) create mode 100644 Mk/bsd.local.mk rename {ports/misc-cdn => misc-cdn}/Makefile (100%) rename {ports/misc-cdn => misc-cdn}/bash-config/Makefile (100%) rename {ports/misc-cdn => misc-cdn}/bash-config/distinfo (100%) rename {ports/misc-cdn => misc-cdn}/bash-config/pkg-descr (100%) rename {ports/misc-cdn => misc-cdn}/crc32sum/Makefile (100%) rename {ports/misc-cdn => misc-cdn}/crc32sum/distinfo (100%) rename {ports/misc-cdn => misc-cdn}/crc32sum/pkg-descr (100%) rename {ports/misc-cdn => misc-cdn}/flag/Makefile (100%) rename {ports/misc-cdn => misc-cdn}/flag/distinfo (100%) rename {ports/misc-cdn => misc-cdn}/flag/pkg-descr (100%) rename {ports/misc-cdn => misc-cdn}/freebsd-rc/Makefile (100%) rename {ports/misc-cdn => misc-cdn}/freebsd-rc/distinfo (100%) rename {ports/misc-cdn => misc-cdn}/freebsd-rc/pkg-descr (100%) rename {ports/misc-cdn => misc-cdn}/shlib/Makefile (100%) rename {ports/misc-cdn => misc-cdn}/shlib/distinfo (100%) rename {ports/misc-cdn => misc-cdn}/shlib/pkg-descr (100%) rename {ports/net => net}/rsync/files/patch-server_pause.patch (100%) delete mode 100644 patch/Mk_bsd.local.mk-strip-perl5-python.patch delete mode 100644 patch/deprecated/Mk_bsd.local.mk-strip-perl5-python.patch delete mode 100755 patch/deprecated/devel_glib20_Makefile.patch delete mode 100755 patch/deprecated/refactor delete mode 100755 patch/deprecated/www_squid_Makefile.patch delete mode 100755 update diff --git a/ports/Makefile.local b/Makefile.local similarity index 100% rename from ports/Makefile.local rename to Makefile.local diff --git a/Mk/bsd.local.mk b/Mk/bsd.local.mk new file mode 100644 index 0000000..16c0a5b --- /dev/null +++ b/Mk/bsd.local.mk @@ -0,0 +1,63 @@ +# -*- mode: Makefile; tab-width: 4; -*- +# ex: ts=4 +# +# bsd.local.mk - Sandbox for local modification to ports framework. +# +# Created by: Mark Linimon +# +# $FreeBSD: ports/Mk/bsd.local.mk,v 1.2 2006/12/10 18:15:33 linimon Exp $ +# + +.if !defined(_POSTMKINCLUDED) && !defined(Local_Pre_Include) + +Local_Pre_Include= bsd.local.mk + +.if defined(STRIP_PERL5) + PKGNAMESUFFIX := $(PKGNAMESUFFIX)+noperl +. undef USE_PERL5 +. undef USE_PERL5_BUILD +. undef USE_PERL5_RUN +.elif defined(STRIP_PERL5_BUILD) + USE_PERL5_RUN := ${USE_PERL5} +. undef USE_PERL5 +. undef USE_PERL5_BUILD +.elif defined(STRIP_PERL5_RUN) + PKGNAMESUFFIX := $(PKGNAMESUFFIX)+noperl + USE_PERL5_BUILD := ${USE_PERL5} +. undef USE_PERL5 +. undef USE_PERL5_RUN +.endif + +.if defined(STRIP_PYTHON) + PKGNAMESUFFIX := $(PKGNAMESUFFIX)+nopython +. undef USE_PYTHON +. undef USE_PYTHON_BUILD +. undef USE_PYTHON_RUN +.elif defined(STRIP_PYTHON_BUILD) + USE_PYTHON_RUN := ${USE_PYTHON} +. undef USE_PYTHON +. undef USE_PYTHON_BUILD +.elif defined(STRIP_PYTHON_RUN) + PKGNAMESUFFIX := $(PKGNAMESUFFIX)+nopython + USE_PYTHON_BUILD := ${USE_PYTHON} +. undef USE_PYTHON +. undef USE_PYTHON_RUN +.endif + +# +# Here is where any code that needs to run at bsd.port.pre.mk inclusion +# time should live. +# + +.endif # !defined(_POSTMKINCLUDED) && !defined(Local_Pre_Include) + +.if defined(_POSTMKINCLUDED) && !defined(Local_Post_Include) + +Local_Post_Include= bsd.local.mk + +# +# here is where any code that needs to run at bsd.port.post.mk inclusion +# time should live. +# + +.endif # defined(_POSTMKINCLUDED) && !defined(Local_Post_Include) diff --git a/ports/misc-cdn/Makefile b/misc-cdn/Makefile similarity index 100% rename from ports/misc-cdn/Makefile rename to misc-cdn/Makefile diff --git a/ports/misc-cdn/bash-config/Makefile b/misc-cdn/bash-config/Makefile similarity index 100% rename from ports/misc-cdn/bash-config/Makefile rename to misc-cdn/bash-config/Makefile diff --git a/ports/misc-cdn/bash-config/distinfo b/misc-cdn/bash-config/distinfo similarity index 100% rename from ports/misc-cdn/bash-config/distinfo rename to misc-cdn/bash-config/distinfo diff --git a/ports/misc-cdn/bash-config/pkg-descr b/misc-cdn/bash-config/pkg-descr similarity index 100% rename from ports/misc-cdn/bash-config/pkg-descr rename to misc-cdn/bash-config/pkg-descr diff --git a/ports/misc-cdn/crc32sum/Makefile b/misc-cdn/crc32sum/Makefile similarity index 100% rename from ports/misc-cdn/crc32sum/Makefile rename to misc-cdn/crc32sum/Makefile diff --git a/ports/misc-cdn/crc32sum/distinfo b/misc-cdn/crc32sum/distinfo similarity index 100% rename from ports/misc-cdn/crc32sum/distinfo rename to misc-cdn/crc32sum/distinfo diff --git a/ports/misc-cdn/crc32sum/pkg-descr b/misc-cdn/crc32sum/pkg-descr similarity index 100% rename from ports/misc-cdn/crc32sum/pkg-descr rename to misc-cdn/crc32sum/pkg-descr diff --git a/ports/misc-cdn/flag/Makefile b/misc-cdn/flag/Makefile similarity index 100% rename from ports/misc-cdn/flag/Makefile rename to misc-cdn/flag/Makefile diff --git a/ports/misc-cdn/flag/distinfo b/misc-cdn/flag/distinfo similarity index 100% rename from ports/misc-cdn/flag/distinfo rename to misc-cdn/flag/distinfo diff --git a/ports/misc-cdn/flag/pkg-descr b/misc-cdn/flag/pkg-descr similarity index 100% rename from ports/misc-cdn/flag/pkg-descr rename to misc-cdn/flag/pkg-descr diff --git a/ports/misc-cdn/freebsd-rc/Makefile b/misc-cdn/freebsd-rc/Makefile similarity index 100% rename from ports/misc-cdn/freebsd-rc/Makefile rename to misc-cdn/freebsd-rc/Makefile diff --git a/ports/misc-cdn/freebsd-rc/distinfo b/misc-cdn/freebsd-rc/distinfo similarity index 100% rename from ports/misc-cdn/freebsd-rc/distinfo rename to misc-cdn/freebsd-rc/distinfo diff --git a/ports/misc-cdn/freebsd-rc/pkg-descr b/misc-cdn/freebsd-rc/pkg-descr similarity index 100% rename from ports/misc-cdn/freebsd-rc/pkg-descr rename to misc-cdn/freebsd-rc/pkg-descr diff --git a/ports/misc-cdn/shlib/Makefile b/misc-cdn/shlib/Makefile similarity index 100% rename from ports/misc-cdn/shlib/Makefile rename to misc-cdn/shlib/Makefile diff --git a/ports/misc-cdn/shlib/distinfo b/misc-cdn/shlib/distinfo similarity index 100% rename from ports/misc-cdn/shlib/distinfo rename to misc-cdn/shlib/distinfo diff --git a/ports/misc-cdn/shlib/pkg-descr b/misc-cdn/shlib/pkg-descr similarity index 100% rename from ports/misc-cdn/shlib/pkg-descr rename to misc-cdn/shlib/pkg-descr diff --git a/ports/net/rsync/files/patch-server_pause.patch b/net/rsync/files/patch-server_pause.patch similarity index 100% rename from ports/net/rsync/files/patch-server_pause.patch rename to net/rsync/files/patch-server_pause.patch diff --git a/patch/Mk_bsd.local.mk-strip-perl5-python.patch b/patch/Mk_bsd.local.mk-strip-perl5-python.patch deleted file mode 100644 index c46d949..0000000 --- a/patch/Mk_bsd.local.mk-strip-perl5-python.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- Mk/bsd.local.mk.orig 2006-12-10 12:15:33.000000000 -0600 -+++ Mk/bsd.local.mk 2010-08-29 02:57:11.000000000 -0500 -@@ -12,6 +12,38 @@ - - Local_Pre_Include= bsd.local.mk - -+.if defined(STRIP_PERL5) -+ PKGNAMESUFFIX := $(PKGNAMESUFFIX)+noperl -+. undef USE_PERL5 -+. undef USE_PERL5_BUILD -+. undef USE_PERL5_RUN -+.elif defined(STRIP_PERL5_BUILD) -+ USE_PERL5_RUN := ${USE_PERL5} -+. undef USE_PERL5 -+. undef USE_PERL5_BUILD -+.elif defined(STRIP_PERL5_RUN) -+ PKGNAMESUFFIX := $(PKGNAMESUFFIX)+noperl -+ USE_PERL5_BUILD := ${USE_PERL5} -+. undef USE_PERL5 -+. undef USE_PERL5_RUN -+.endif -+ -+.if defined(STRIP_PYTHON) -+ PKGNAMESUFFIX := $(PKGNAMESUFFIX)+nopython -+. undef USE_PYTHON -+. undef USE_PYTHON_BUILD -+. undef USE_PYTHON_RUN -+.elif defined(STRIP_PYTHON_BUILD) -+ USE_PYTHON_RUN := ${USE_PYTHON} -+. undef USE_PYTHON -+. undef USE_PYTHON_BUILD -+.elif defined(STRIP_PYTHON_RUN) -+ PKGNAMESUFFIX := $(PKGNAMESUFFIX)+nopython -+ USE_PYTHON_BUILD := ${USE_PYTHON} -+. undef USE_PYTHON -+. undef USE_PYTHON_RUN -+.endif -+ - # - # Here is where any code that needs to run at bsd.port.pre.mk inclusion - # time should live. diff --git a/patch/deprecated/Mk_bsd.local.mk-strip-perl5-python.patch b/patch/deprecated/Mk_bsd.local.mk-strip-perl5-python.patch deleted file mode 100644 index d21163b..0000000 --- a/patch/deprecated/Mk_bsd.local.mk-strip-perl5-python.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- Mk/bsd.local.mk.orig 2006-12-10 12:15:33.000000000 -0600 -+++ Mk/bsd.local.mk 2010-08-29 02:57:11.000000000 -0500 -@@ -12,6 +12,40 @@ - - Local_Pre_Include= bsd.local.mk - -+.if defined(STRIP_PERL5) -+ PKGNAMESUFFIX := $(PKGNAMESUFFIX)-no-perl -+. undef USE_PERL5 -+. undef USE_PERL5_BUILD -+. undef USE_PERL5_RUN -+.elif defined(STRIP_PERL5_BUILD) -+ PKGNAMESUFFIX := $(PKGNAMESUFFIX)-no-perl-bld -+ USE_PERL5_RUN := ${USE_PERL5} -+. undef USE_PERL5 -+. undef USE_PERL5_BUILD -+.elif defined(STRIP_PERL5_RUN) -+ PKGNAMESUFFIX := $(PKGNAMESUFFIX)-no-perl-run -+ USE_PERL5_BUILD := ${USE_PERL5} -+. undef USE_PERL5 -+. undef USE_PERL5_RUN -+.endif -+ -+.if defined(STRIP_PYTHON) -+ PKGNAMESUFFIX := $(PKGNAMESUFFIX)-no-python -+. undef USE_PYTHON -+. undef USE_PYTHON_BUILD -+. undef USE_PYTHON_RUN -+.elif defined(STRIP_PYTHON_BUILD) -+ PKGNAMESUFFIX := $(PKGNAMESUFFIX)-no-python-bld -+ USE_PYTHON_RUN := ${USE_PYTHON} -+. undef USE_PYTHON -+. undef USE_PYTHON_BUILD -+.elif defined(STRIP_PYTHON_RUN) -+ PKGNAMESUFFIX := $(PKGNAMESUFFIX)-no-python-run -+ USE_PYTHON_BUILD := ${USE_PYTHON} -+. undef USE_PYTHON -+. undef USE_PYTHON_RUN -+.endif -+ - # - # Here is where any code that needs to run at bsd.port.pre.mk inclusion - # time should live. diff --git a/patch/deprecated/devel_glib20_Makefile.patch b/patch/deprecated/devel_glib20_Makefile.patch deleted file mode 100755 index cde3a4a..0000000 --- a/patch/deprecated/devel_glib20_Makefile.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -ur ports/devel/glib20/Makefile ports/devel/glib20/Makefile ---- ports/devel/glib20/Makefile 2010-03-06 21:13:22.000000000 -0600 -+++ ports/devel/glib20/Makefile 2010-01-23 15:08:01.000000000 -0600 -@@ -37,8 +37,8 @@ - USE_GNOME= gnomehack pkgconfig ltverhack - USE_GMAKE= yes - MAKE_JOBS_SAFE= yes --USE_PYTHON= yes --USE_PERL5= yes -+#USE_PYTHON= yes -+#USE_PERL5= yes - CONFIGURE_ARGS= --enable-static --with-libiconv=gnu \ - --disable-gtk-doc --with-html-dir=${PREFIX}/share/doc \ - --disable-man --without-xml-catalog \ diff --git a/patch/deprecated/refactor b/patch/deprecated/refactor deleted file mode 100755 index e38f625..0000000 --- a/patch/deprecated/refactor +++ /dev/null @@ -1 +0,0 @@ -Make a slave port that inherits from the master port, then nops out python/perl diff --git a/patch/deprecated/www_squid_Makefile.patch b/patch/deprecated/www_squid_Makefile.patch deleted file mode 100755 index 2cfd7c6..0000000 --- a/patch/deprecated/www_squid_Makefile.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur ports/www/squid/Makefile ports/www/squid/Makefile ---- ports/www/squid/Makefile 2010-03-06 21:13:36.000000000 -0600 -+++ ports/www/squid/Makefile 2010-02-20 07:01:49.000000000 -0600 -@@ -118,7 +118,7 @@ - CONFLICTS= squid-2.[^7]* squid-3.* cacheboy-[0-9]* lusca-head-[0-9]* - GNU_CONFIGURE= yes - USE_BZIP2= yes --USE_PERL5= yes -+USE_PERL5_BUILD=yes - USE_RC_SUBR= squid - - SQUID_UID?= squid diff --git a/update b/update deleted file mode 100755 index fd38bc3..0000000 --- a/update +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/sh - -# Run as root -[ "$(id -u)" -eq 0 ] || exec sudo "${0}" "${@}" -cd "$(dirname "${0}")" - -[ "${1}" = "-n" ] && NO_SYNC=true - -meh() { printf " \033[1;32m*\033[0m %s\n" "${*}"; } -omg() { printf " \033[1;33m*\033[0m %s\n" "${*}"; } -wtf() { printf " \033[1;31m*\033[0m %s\n" "${*}"; kill $$; exit 1; } - -sync="rsync://paka/freebsd-ports" - -sync_opts="--archive --compress --delete --hard-links --sparse --stats --verbose" - -zpool="amani" - -ports=${zpool}/ports -upstream=${zpool}/srcs/freebsd/ports/upstream -prepare=${zpool}/srcs/freebsd/ports/prepare - -today="$(date +%Y-%m-%d)" -upstream_fs="$(zfs get -H -o value mountpoint "${upstream}")" - -# Check if target ports tree actually exists; otherwise, assume it's safe to replace -if zfs list "${ports}" >&- 2>&- -then - ports_exists="YES" - ports_origin="$(zfs get -H -o value origin "${ports}")" - ports_origin="${ports_origin%%@*}" - ports_fs="$(zfs get -H -o value mountpoint "${ports}")" - - # Make sure the ports tree is a descendent of the ports upstream - [ "${ports_origin}" = "${upstream}" ] || wtf "Target ${ports} is not a child of ${upstream} - (is ${ports_origin})" -fi -ports_fs="${ports_fs:-/usr/ports}" - -if [ -z "${NO_SYNC}" ] -then - # Compute the next available snapshot - last_snapshot="$(zfs list -rHt snapshot -o name "${upstream}" | grep "@${today}_" | sort | tail -n 1 | sed -e 's/^.*_\([0-9]\{2\}\)$/\1/')" - if [ "${last_snapshot}" ] - then - snapshot="$(printf "${today}_%02u" "$(( ${last_snapshot} + 1 ))")" - echo "${today}_${last_snapshot} -> ${snapshot}" - else - snapshot="${today}_00" - echo "None -> ${snapshot}" - fi -else - # Don't bother creating a new snapshot if the tree will not be synchronized - last_snapshot="$(zfs list -rHt snapshot -o name "${upstream}" | sort | tail -n 1)" - snapshot="${last_snapshot##*@}" - echo "Using existing snapshot ${snapshot}" -fi - -# Bail out if anything is / -[ -z "${ports_fs}" ] && wtf "ports_fs is / ?!" -[ -z "${upstream_fs}" ] && wtf "upstream_fs is / ?!" -[ -z "${ports_fs}" -o -z "${upstream_fs}" ] && wtf "Writing to /? Are you nuts?" - -if [ -z "${NO_SYNC}" ] -then - meh "Update" - rsync ${sync_opts} "${sync}/" "${upstream_fs}/" || wtf "update failed" - - meh "Snapshot" - zfs snapshot "${upstream}@${snapshot}" || wtf "snapshot failed" -fi - -meh "Clone" -zfs clone "${upstream}@${snapshot}" "${prepare}" || wtf "clone failed" -zfs set atime=off "${prepare}" || wtf "atime-off failed" - -# Resolve filesystem mountpoints, now that everything should exist -prepare_fs="$(zfs get -H -o value mountpoint "${prepare}")" - -meh "Overlay" -( cd ports; find * | cpio -pR root:wheel "${prepare_fs}" ) || wtf "overlay failed" - -meh "Patch" -for patch in patch/*.patch -do - meh "... ${patch}" - ( cd "${prepare_fs}"; patch -p0 ) < "${patch}" || wtf "patch failed" -done - -meh "Install" -zfs set readonly=on "${prepare}" || wtf "readonly failed" - -# Remember and unmount any null-mounts of the filesystem that is about to be replaced -umount_and_generate_mount_lines() { - mount | grep '(nullfs, ' | grep "^/usr/ports " | while read null_src null_on null_dst null_opt - do - # Figure out if mount is read-only - mount_flags="" - case "${null_opt}" in - *read-only*) mount_flags="-r" - esac - # Craft a mount line - echo "echo '${null_dst}'; /sbin/mount -t nullfs ${mount_flags} '${null_src}' '${null_dst}';" - meh "Unmounting ${null_dst}" >&2 - /sbin/umount "${null_dst}" - done -} -remount_cmd="$(umount_and_generate_mount_lines)" - -# Half of this is conditional on the old ports tree's existence -[ -z "${ports_exists}" ] || zfs rename "${ports}" "${ports}-bak" || wtf "backup rename failed" -zfs rename "${prepare}" "${ports}" || wtf "rename prepare -> ports failed" -[ -z "${ports_exists}" ] || zfs inherit mountpoint "${ports}-bak" || wtf "inherit failed" -zfs set mountpoint="${ports_fs}" "${ports}" || wtf "mountpoint failed" -[ -z "${ports_exists}" ] || zfs destroy "${ports}-bak" || wtf "destroy failed" - -# Remount null-mounts of this filesystem -[ "${remount_cmd}" ] && meh "Remounting filesystems" -eval "${remount_cmd}" - -meh "All done" -- 2.42.0