1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

- Maintainer update: comms/fl_moxgen to latest (1.00)

- stage support

Version 1.00 - 20-JUL-2013
        * Minor updates to the documentation
        * Fixed Makefile problem with fl_moxgen_defines.h
        * Be sure Calculate was pressed before generating outputs
        * Be sure wire size input was entered prior to Calculate
        * Check legal value of AWG input

PR:		ports/188538
Submitted by:	Stephen Hurd <shurd@sasktel.net> (maintainer)
This commit is contained in:
Diane Bruce 2014-04-12 23:59:33 +00:00
parent 1aedcc9d8a
commit 71e6d8446d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=351163
4 changed files with 51 additions and 19 deletions

View File

@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= fl_moxgen
PORTVERSION= 0.05
PORTREVISION= 1
PORTVERSION= 1.00
CATEGORIES= comms hamradio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= flmoxgen
@ -17,13 +16,12 @@ LICENSE= GPLv3
LIB_DEPENDS= libfltk.so:${PORTSDIR}/x11-toolkits/fltk
DESKTOP_ENTRIES= "Fl_MoxGen" "${COMMENT}" "" "${PORTNAME}" \
"Network;HamRadio;" "false"
"Network;HamRadio;" false
OPTIONS_DEFINE= PDF
OPTIONS_DEFAULT= PDF
PDF_DESC= Enable PDF Writing (requires libharu)
NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MPDF}
@ -37,6 +35,7 @@ post-patch:
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' \
-e 's|%%LOCALBASE%%|${LOCALBASE}|' \
-e 's|%%DATADIR%%|${DATADIR}|' \
-e 's|%%STAGEDIR%%|${STAGEDIR}|' \
${WRKSRC}/Makefile
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (Fl_MoxGen-0.05.tar.gz) = 19271c51438d6762c58b498fcd8b9293295b1f7497f3c52d3635a8710818ba20
SIZE (Fl_MoxGen-0.05.tar.gz) = 37489
SHA256 (Fl_MoxGen-1.00.tar.gz) = 547b5ba7e9fa96dc8d88e62eef73eb4673de7c0e41a7485a3ff18887e355ffd2
SIZE (Fl_MoxGen-1.00.tar.gz) = 37746

View File

@ -1,45 +1,47 @@
--- Makefile.orig 2009-12-21 18:58:35.000000000 -0800
+++ Makefile 2012-05-16 00:49:03.000000000 -0700
@@ -32,10 +32,10 @@
--- Makefile.orig 2013-07-20 02:05:36.000000000 -0700
+++ Makefile 2014-04-12 16:35:40.000000000 -0700
@@ -32,10 +32,11 @@
# BINDIR directory. Files needed at run time will
# be installed in the SHAREDIR directory.
-BINDIR=/usr/local/bin
+BINDIR=%%PREFIX%%/bin
#BINDIR=/usr/bin
+INSTALLDIR=%%STAGEDIR%%
-SHAREDIR=/usr/local/share/fl_moxgen
+SHAREDIR=%%DATADIR%%
#SHAREDIR=/usr/share/fl_moxgen
# If libHaru is installed, be sure that LIBHARU_INC
@@ -44,30 +44,24 @@
@@ -44,14 +45,8 @@
# accordingly. If libHaru is not installed,
# comment out both lines.
-LIBHARU_INC = /usr/local/include
+LIBHARU_INC = %%LOCALBASE%%/include
#LIBHARU_INC = /usr/include
-#LIBHARU_INC = /usr/local/include
-LIBHARU_INC = /usr/include
-
-# Set the FLTK_INC variable to be the location of the
-# include files for FLTK.
-
-FLTK_INC = /usr/include
-#FLTK_INC = /usr/local/include
-
+LIBHARU_INC = %%LOCALBASE%%/include
+#LIBHARU_INC = /usr/include
all:
@if [ -f $(LIBHARU_INC)/hpdf.h ]; \
then $(MAKE) fl_moxgen; \
@rm -f fl_moxgen_defines.h
@@ -60,30 +55,28 @@
else $(MAKE) fl_moxgen_no_pdf; fi
write_pdf.o: write_pdf.c
- @$(CC) -c -o write_pdf.o write_pdf.c
+ @$(CC) -c -o write_pdf.o write_pdf.c -I$(LIBHARU_INC)
+ @$(CC) -c -o write_pdf.o write_pdf.c -I%%LOCALBASE%%/include
fl_moxgen: fl_moxgen.cxx fl_moxgen_defines.h write_pdf.o
@echo "Building Fl_MoxGen with PDF support"
- $(CXX) -o fl_moxgen fl_moxgen.cxx write_pdf.o -I$(FLTK_INC) -I. -lfltk -lfltk_images -lhpdf
+ $(CXX) -o fl_moxgen fl_moxgen.cxx write_pdf.o -I. `fltk-config --use-images --cxxflags --ldflags` -lhpdf
+ $(CXX) -o fl_moxgen fl_moxgen.cxx write_pdf.o -DUSING_LIB_HARU `fltk-config --use-images --cxxflags --ldflags` -I. -lhpdf
fl_moxgen_no_pdf: fl_moxgen.cxx fl_moxgen_defines.h
@echo "Building Fl_MoxGen without PDF support"
@ -48,3 +50,24 @@
fl_moxgen_defines.h:
@rm -f fl_moxgen_defines.h
@echo "#define SHAREDIR \"$(SHAREDIR)\"" > fl_moxgen_defines.h
- @if [ -f $(LIBHARU_INC)/hpdf.h ]; \
- then echo "#define USING_LIB_HARU" >> fl_moxgen_defines.h; fi
install:
- mkdir -p $(SHAREDIR)
- cp fl_moxgen $(BINDIR)
- cp moxgen.png $(SHAREDIR)
+ mkdir -p $(INSTALLDIR)$(SHAREDIR)
+ cp fl_moxgen $(INSTALLDIR)$(BINDIR)
+ cp moxgen.png $(INSTALLDIR)$(SHAREDIR)
uninstall:
- rm $(BINDIR)/fl_moxgen
- rm $(SHAREDIR)/moxgen.png
- rmdir $(SHAREDIR)
+ rm $(INSTALLDIR)$(BINDIR)/fl_moxgen
+ rm $(INSTALLDIR)$(SHAREDIR)/moxgen.png
+ rmdir $(INSTALLDIR)$(SHAREDIR)
clean:
@rm -fr *~ fl_moxgen *.o fl_moxgen_defines.h *.nec *.pdf

View File

@ -0,0 +1,10 @@
--- write_pdf.c.orig 2014-04-12 15:29:28.000000000 -0700
+++ write_pdf.c 2014-04-12 15:29:54.000000000 -0700
@@ -6,6 +6,7 @@
#include <setjmp.h>
#include <stdio.h>
#include <string.h>
+#include <unistd.h> // for getcwd()
#include <sys/stat.h> // for stat()
#include "fl_moxgen_defines.h"