On 11/26/16 10:18, Rafael Sadowski wrote:
[...]
> Hi everybody,
> 
> new diff with input from Daniel Dickman and more diff fixes from me.
> 
> Summery:
> 
> - Removed whole "if" block and the comment about bug 73162
> - Use `sysctl -n hw.usermem` instead of tr kung-fu
> - Remove PKGNAME and use EXTRACT_SUFX for filename.
> - Enable netbeans.desktop and run update-desktop-database (lost in the
>   last diff)
> 
> You can see the head of the new diff below inline. The whole diff with
> plist you can find as tarball attachment.
> 
I am using it daily, ok giovanni@ if Daniel want to commit it.
 Cheers
  Giovanni


> Kind regrads,
> 
> Rafael
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/devel/netbeans/Makefile,v
> retrieving revision 1.29
> diff -u -p -u -p -r1.29 Makefile
> --- Makefile  18 Mar 2016 23:12:16 -0000      1.29
> +++ Makefile  26 Nov 2016 08:56:14 -0000
> @@ -2,24 +2,25 @@
>  
>  COMMENT=             NetBeans Java IDE
>  
> -V=                   6.9.1
> +V=                   8.2
>  DISTNAME=            netbeans-${V}
>  CATEGORIES=          devel
> -REVISION=            5
>  
> -HOMEPAGE=            http://www.netbeans.org/
> +HOMEPAGE=            https://www.netbeans.org/
> +
> +MAINTAINER=          Rafael Sadowski <[email protected]>
>  
>  # CDDL and GPLv2 dual-licensed
>  #
> -# For external components see:
> -#   http://www.netbeans.info/downloads/licence/netbeans-3rd-party.txt
> +# See:
> +# https://netbeans.org/about/legal/index.html
>  PERMIT_PACKAGE_CDROM=        Yes
>  
>  MASTER_SITES=                
> http://download.netbeans.org/netbeans/${V}/final/zip/
> -EXTRACT_SUFX=                -201007282301-ml.zip
> +EXTRACT_SUFX=                -201609300101.zip
>  
>  MODULES=             java
> -MODJAVA_VER=         1.6+
> +MODJAVA_VER=         1.8+
>  
>  RUN_DEPENDS=         java/javaPathHelper \
>                       devel/desktop-file-utils
> @@ -31,18 +32,22 @@ WRKDIST=          ${WRKDIR}/netbEANs
>  
>  NB=                  ${PREFIX}/netbeans
>  
> -pre-configure:
> -     @${SUBST_CMD} ${WRKSRC}/platform/lib/nbexec
> -
>  do-install:
>       ${INSTALL_DATA_DIR} ${NB}
>       @tar -czf - -C ${WRKDIR}/netbeans . | tar xzf - -C ${NB}
> +     @rm -rf ${NB}/profiler ${NB}/{ide,cnd,dlight}/bin \
> +             ${NB}/platform/modules/lib/{i386,amd64,x86}
>       @find ${NB} -name "*.dll" -o -name "*.exe" -o -name "*.cmd" \
> -             -o -name "*.bat" -o -name "*.orig" | xargs rm
> -     @${SUBST_PROGRAM} ${FILESDIR}/netbeans \
> -             ${PREFIX}/bin/netbeans
> +             -o -name "*.bat" -o -name ".lastModified" \
> +             -o -name "*.orig" | xargs rm
> +     @${SUBST_PROGRAM} ${FILESDIR}/netbeans ${PREFIX}/bin/netbeans
> +     @${INSTALL_DATA_DIR} ${PREFIX}/netbeans/cnd/bin
> +     @${INSTALL_SCRIPT} ${WRKDIR}/netbeans/cnd/bin/dorun.sh ${NB}/cnd/bin/
> +     @${INSTALL_DATA_DIR} ${PREFIX}/netbeans/ide/bin/nativeexecution
> +     @${INSTALL_SCRIPT} 
> ${WRKDIR}/netbeans/ide/bin/nativeexecution/hostinfo.sh \
> +     ${NB}/ide/bin/nativeexecution/
>       @${INSTALL_DATA_DIR} ${PREFIX}/share/applications
> -     @${SUBST_DATA} ${FILESDIR}/netbeans.desktop \
> +     @${INSTALL_DATA} ${FILESDIR}/netbeans.desktop \
>               ${PREFIX}/share/applications/netbeans.desktop
>  
>  .include <bsd.port.mk>
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/devel/netbeans/distinfo,v
> retrieving revision 1.6
> diff -u -p -u -p -r1.6 distinfo
> --- distinfo  18 Jan 2015 03:13:19 -0000      1.6
> +++ distinfo  26 Nov 2016 08:56:14 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (netbeans-6.9.1-201007282301-ml.zip) = 
> NxfYxhyDqgyExDQxtrN8VvJzmd2JZRqn4CRYDOlqZow=
> -SIZE (netbeans-6.9.1-201007282301-ml.zip) = 261676411
> +SHA256 (netbeans-8.2-201609300101.zip) = 
> rZiIM0uabB8RONyy7MyM5JIUY+hx5G3vTsxhdTgWCUg=
> +SIZE (netbeans-8.2-201609300101.zip) = 351110790
> Index: patches/patch-bin_netbeans
> ===================================================================
> RCS file: patches/patch-bin_netbeans
> diff -N patches/patch-bin_netbeans
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-bin_netbeans        26 Nov 2016 08:56:14 -0000
> @@ -0,0 +1,41 @@
> +$OpenBSD$
> +
> +- remove hidden bash dependency
> +- add OpenBSD mem size calculation
> +
> +--- bin/netbeans.orig        Fri Sep 30 01:33:04 2016
> ++++ bin/netbeans     Fri Nov 25 23:42:31 2016
> +@@ -161,8 +161,12 @@ heap_size () {
> +         mem=`/usr/sbin/sysctl hw.memsize | tr -d [:alpha:][:space:].:`
> +         mem=`expr $mem / 1048576`
> +         ;;
> +-        *) 
> ++    OpenBSD*)
> ++        mem=`/sbin/sysctl -n hw.usermem`
> ++        mem=`expr $mem / 1048576`
> +         ;;
> ++        *)
> ++        ;;
> +     esac
> +     if [ -z "$mem" ] ; then
> +         mem=640
> +@@ -194,11 +198,6 @@ launchNbexec() {
> +         fi
> +     done | head -n 1`
> +     sh=sh
> +-    # #73162: Ubuntu uses the ancient Bourne shell, which does not 
> implement trap well.
> +-    if [ -x /bin/bash ]
> +-    then
> +-        sh=/bin/bash
> +-    fi
> +     if [ "${founduserdir}" = "yes" ]; then
> +         exec $sh "$nbexec" "$@"
> +     else
> +@@ -230,6 +229,7 @@ case "`uname`" in
> +             --jdkhome '"$netbeans_jdkhome"' \
> +             --branding nb \
> +             --clusters '"$netbeans_clusters"' \
> ++            -J-Dawt.useSystemAAFontSettings=lcd \
> +             -J-Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade \
> +             
> -J-Dnetbeans.accept_license_class=org.netbeans.license.AcceptLicense \
> +             ${netbeans_default_options} \
> Index: patches/patch-etc_netbeans_conf
> ===================================================================
> RCS file: /cvs/ports/devel/netbeans/patches/patch-etc_netbeans_conf,v
> retrieving revision 1.3
> diff -u -p -u -p -r1.3 patch-etc_netbeans_conf
> --- patches/patch-etc_netbeans_conf   12 Nov 2010 12:26:16 -0000      1.3
> +++ patches/patch-etc_netbeans_conf   26 Nov 2016 08:56:14 -0000
> @@ -3,14 +3,14 @@ $OpenBSD: patch-etc_netbeans_conf,v 1.3 
>  Turn autoupdate off by default. The relevant options are documented here:
>       http://wiki.netbeans.org/FaqPluginManagerCustomization
>  
> ---- etc/netbeans.conf.orig   Thu Jul 29 02:06:10 2010
> -+++ etc/netbeans.conf        Tue Nov  9 21:48:58 2010
> -@@ -3,7 +3,7 @@ netbeans_default_userdir="${HOME}/.netbeans/6.9"
> +--- etc/netbeans.conf.orig   Fri Sep 30 01:33:04 2016
> ++++ etc/netbeans.conf        Wed Nov 23 21:17:08 2016
> +@@ -43,7 +43,7 @@ netbeans_default_cachedir="${DEFAULT_CACHEDIR_ROOT}/8.
> + # Concurrent Mark & Sweep garbage collector.
> + # (see http://wiki.netbeans.org/FaqGCPauses)
> + #
> +-netbeans_default_options="-J-client -J-Xss2m -J-Xms32m 
> -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true 
> -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true 
> -J-Dsun.zip.disableMemoryMapping=true"
> ++netbeans_default_options="-J-client -J-Xss2m -J-Xms32m 
> -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true 
> -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true 
> -J-Dsun.zip.disableMemoryMapping=true -J-Dplugin.manager.check.updates=false 
> -J-Dplugin.manager.check.interval=NEVER"
>   
> - # Options used by NetBeans launcher by default, can be overridden by 
> explicit
> - # command line switches:
> --netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m 
> -J-XX:MaxPermSize=200m -J-Dapple.laf.useScreenMenuBar=true 
> -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true"
> -+netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m 
> -J-XX:MaxPermSize=200m -J-Dapple.laf.useScreenMenuBar=true 
> -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true 
> -J-Dplugin.manager.check.updates=false 
> -J-Dplugin.manager.check.interval=NEVER"
> - # Note that a default -Xmx is selected for you automatically.
> - # You can find this value in var/log/messages.log file in your userdir.
> - # The automatically selected value can be overridden by specifying -J-Xmx 
> here
> + # Default location of JDK:
> + # (set by installer or commented out if launcher should decide)
> Index: patches/patch-platform_lib_nbexec
> ===================================================================
> RCS file: /cvs/ports/devel/netbeans/patches/patch-platform_lib_nbexec,v
> retrieving revision 1.1
> diff -u -p -u -p -r1.1 patch-platform_lib_nbexec
> --- patches/patch-platform_lib_nbexec 9 Jul 2010 07:35:04 -0000       1.1
> +++ patches/patch-platform_lib_nbexec 26 Nov 2016 08:56:14 -0000
> @@ -1,46 +0,0 @@
> -$OpenBSD: patch-platform_lib_nbexec,v 1.1 2010/07/09 07:35:04 landry Exp $
> ---- platform/lib/nbexec.orig Thu Jun 10 19:59:48 2010
> -+++ platform/lib/nbexec      Sun Jun 20 02:16:30 2010
> -@@ -357,7 +357,7 @@ detect_system_proxy () {
> - }
> - 
> - detect_gnome_proxy () {
> --    gconftool=/usr/bin/gconftool-2
> -+    gconftool=${LOCALBASE}/bin/gconftool-2
> -     if [ -x  $gconftool ] ; then
> -         proxy_mode=`$gconftool --get /system/proxy/mode 2>/dev/null`
> -         if [ "$proxy_mode" = "manual" ] ; then
> -@@ -366,7 +366,7 @@ detect_gnome_proxy () {
> -             http_proxy_tmp=$http_proxy_host:$http_proxy_port
> -             http_non_proxy_hosts=`$gconftool --get 
> /system/http_proxy/ignore_hosts 2>/dev/null`
> -             if [ $? ] ; then
> --                http_non_proxy_hosts=`echo $http_non_proxy_hosts | /bin/sed 
> 's/\]//'`
> -+                http_non_proxy_hosts=`echo $http_non_proxy_hosts | 
> /usr/bin/sed 's/\]//'`
> -             fi
> -             socks_proxy_host=`$gconftool --get /system/proxy/socks_host 
> 2>/dev/null`
> -             socks_proxy_port=`$gconftool --get /system/proxy/socks_port 
> 2>/dev/null`
> -@@ -389,18 +389,18 @@ detect_gnome_proxy () {
> - detect_kde_proxy () {
> -     kioslaverc="${HOME}/.kde/share/config/kioslaverc"
> -     if [ -f $kioslaverc ] ; then
> --        if /bin/grep 'ProxyType=1' "$kioslaverc" >/dev/null 2>&1; then
> --            http_proxy_tmp=`/bin/grep 'httpProxy=http://' "$kioslaverc"`
> -+        if /usr/bin/grep 'ProxyType=1' "$kioslaverc" >/dev/null 2>&1; then
> -+            http_proxy_tmp=`/usr/bin/grep 'httpProxy=http://' "$kioslaverc"`
> -             if [ $? ] ; then
> --                http_proxy_tmp=`echo $http_proxy_tmp | /bin/sed 
> 's/httpProxy=http:\/\///'`
> -+                http_proxy_tmp=`echo $http_proxy_tmp | /usr/bin/sed 
> 's/httpProxy=http:\/\///'`
> -                 return 0
> -             fi
> --            http_non_proxy_hosts=`/bin/grep 'NoProxyFor=' "$kioslaverc"`
> -+            http_non_proxy_hosts=`/usr/bin/grep 'NoProxyFor=' "$kioslaverc"`
> -             if [ $? ] ; then
> --                http_non_proxy_hosts=`echo $http_non_proxy_hosts | /bin/sed 
> 's/NoProxyFor=//'`
> -+                http_non_proxy_hosts=`echo $http_non_proxy_hosts | 
> /usr/bin/sed 's/NoProxyFor=//'`
> -             fi
> -         else
> --            if /bin/grep 'ProxyType=0' "$kioslaverc" >/dev/null 2>&1; then
> -+            if /usr/bin/grep 'ProxyType=0' "$kioslaverc" >/dev/null 2>&1; 
> then
> -                 detect_system_proxy
> -                 if [ -z "$http_proxy_tmp" ]; then
> -                     http_proxy_tmp="DIRECT"
> 

Reply via email to