Bug 165786 - [PATCH] net/libnet Honor NOPORTEXAMPLES env var
Summary: [PATCH] net/libnet Honor NOPORTEXAMPLES env var
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-06 19:40 UTC by Michael Scheidell
Modified: 2012-03-19 18:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Scheidell freebsd_committer freebsd_triage 2012-03-06 19:40:11 UTC
if an OP devines NOPORTEXAMPLES in env (cmdline, make.etc), port should not install examples.

Fix: patch for Makefile and pkg-plist.
since this isn't really broken, there is no need to force clusters to rebuild.
next upgrade for the OP, pkg-plist will automatically deinstall old examples, and (not) install new ones, so, no 
portrevision bump needed.

- Honor NOPORTEXAMPLES env var
- No PORTREVISION bump



______________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(r). 
For Information please see http://www.spammertrap.com/
______________________________________________________________________--wmatgcce1iJuyYH7XN3KgLbtfuoncfr2Nk9jWCD0i71SKOmY
Content-Type: text/plain; name="libnet.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="libnet.patch"

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/net/libnet/Makefile,v
retrieving revision 1.25
diff -u -r1.25 Makefile
--- Makefile	22 Feb 2012 04:49:08 -0000	1.25
+++ Makefile	6 Mar 2012 19:31:19 -0000
@@ -34,8 +34,10 @@
 post-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/libnet-config \
 		${PREFIX}/bin/libnet${PKGNAMESUFFIX}-config
+.if !defined(NOPORTEXAMPLES)
 	@${MKDIR} ${EXAMPLESDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${EXAMPLES} ${EXAMPLESDIR}
+.endif
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/net/libnet/pkg-plist,v
retrieving revision 1.11
diff -u -r1.11 pkg-plist
--- pkg-plist	31 Jan 2007 14:09:48 -0000	1.11
+++ pkg-plist	6 Mar 2012 19:31:19 -0000
@@ -50,51 +50,51 @@
 %%PORTDOCS%%%%DOCSDIR%%/libnet_8h.html
 %%PORTDOCS%%%%DOCSDIR%%/structlibnet__802__1q__hdr.html
 %%PORTDOCS%%%%DOCSDIR%%/structlibnet__802__1x__hdr.html
-%%EXAMPLESDIR%%/arp-new.c
-%%EXAMPLESDIR%%/arp.c
-%%EXAMPLESDIR%%/bgp4_hdr.c
-%%EXAMPLESDIR%%/bgp4_notification.c
-%%EXAMPLESDIR%%/bgp4_open.c
-%%EXAMPLESDIR%%/bgp4_update.c
-%%EXAMPLESDIR%%/cdp.c
-%%EXAMPLESDIR%%/dhcp_discover.c
-%%EXAMPLESDIR%%/dns.c
-%%EXAMPLESDIR%%/dot1x.c
-%%EXAMPLESDIR%%/fddi_tcp1.c
-%%EXAMPLESDIR%%/fddi_tcp2.c
-%%EXAMPLESDIR%%/get_addr.c
-%%EXAMPLESDIR%%/gre.c
-%%EXAMPLESDIR%%/icmp6_echoreq.c
-%%EXAMPLESDIR%%/icmp_echo_cq.c
-%%EXAMPLESDIR%%/icmp_redirect.c
-%%EXAMPLESDIR%%/icmp_timeexceed.c
-%%EXAMPLESDIR%%/icmp_timestamp.c
-%%EXAMPLESDIR%%/icmp_unreach.c
-%%EXAMPLESDIR%%/ieee.c
-%%EXAMPLESDIR%%/ip_link.c
-%%EXAMPLESDIR%%/ip_raw.c
-%%EXAMPLESDIR%%/isl.c
-%%EXAMPLESDIR%%/mpls.c
-%%EXAMPLESDIR%%/ntp.c
-%%EXAMPLESDIR%%/ospf_hello.c
-%%EXAMPLESDIR%%/ospf_lsa.c
-%%EXAMPLESDIR%%/ping_of_death.c
-%%EXAMPLESDIR%%/rpc_tcp.c
-%%EXAMPLESDIR%%/rpc_udp.c
-%%EXAMPLESDIR%%/sebek.c
-%%EXAMPLESDIR%%/smurf.c
-%%EXAMPLESDIR%%/stp.c
-%%EXAMPLESDIR%%/synflood.c
-%%EXAMPLESDIR%%/synflood6.c
-%%EXAMPLESDIR%%/synflood6_frag.c
-%%EXAMPLESDIR%%/tcp1.c
-%%EXAMPLESDIR%%/tcp2.c
-%%EXAMPLESDIR%%/tftp.c
-%%EXAMPLESDIR%%/tring_tcp1.c
-%%EXAMPLESDIR%%/tring_tcp2.c
-%%EXAMPLESDIR%%/udp1.c
-%%EXAMPLESDIR%%/udp2.c
-@dirrm %%EXAMPLESDIR%%
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/arp-new.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/arp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bgp4_hdr.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bgp4_notification.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bgp4_open.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bgp4_update.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cdp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dhcp_discover.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dns.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dot1x.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fddi_tcp1.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fddi_tcp2.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/get_addr.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/gre.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/icmp6_echoreq.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/icmp_echo_cq.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/icmp_redirect.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/icmp_timeexceed.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/icmp_timestamp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/icmp_unreach.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ieee.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ip_link.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ip_raw.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/isl.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mpls.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ntp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ospf_hello.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ospf_lsa.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ping_of_death.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/rpc_tcp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/rpc_udp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sebek.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/smurf.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/stp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/synflood.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/synflood6.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/synflood6_frag.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tcp1.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tcp2.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tftp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tring_tcp1.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tring_tcp2.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/udp1.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/udp2.c
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
 @dirrm lib/libnet11
 @dirrm include/libnet11/libnet
How-To-Repeat: 
make -DNOPORTEXAMPLES install
cd /usr/local/share/examples/libnet11
du -ch
350K	./libnet11

port installs 350K of examples.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-03-06 19:40:54 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Michael Scheidell freebsd_committer freebsd_triage 2012-03-19 09:33:08 UTC
State Changed
From-To: open->feedback

Ask for maintainer approval.
Comment 3 dfilter service freebsd_committer freebsd_triage 2012-03-19 18:25:50 UTC
dinoex      2012-03-19 18:25:39 UTC

  FreeBSD ports repository

  Modified files:
    net/libnet           Makefile pkg-plist 
  Log:
  - honor NOPORTEXAMPLES
  PR:             165786
  Submitted by:   Michael Scheidell
  Feature safe:   yes
  
  Revision  Changes    Path
  1.26      +2 -0      ports/net/libnet/Makefile
  1.12      +45 -45    ports/net/libnet/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Dirk Meyer freebsd_committer freebsd_triage 2012-03-19 18:34:27 UTC
State Changed
From-To: feedback->closed

committed, thanks.