aboutsummaryrefslogtreecommitdiff
path: root/deskutils
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2020-10-25 11:46:49 +0000
committerStefan Eßer <se@FreeBSD.org>2020-10-25 11:46:49 +0000
commitd88c4de7de1dab55a1b1604cf1a202347ca1c6bd (patch)
treec954dd46cb8aaf3283b02439f576f5fee755bcd8 /deskutils
parent137ece184887553ca1a436aaab272cd31511f1d0 (diff)
downloadports-d88c4de7de1dab55a1b1604cf1a202347ca1c6bd.tar.gz
ports-d88c4de7de1dab55a1b1604cf1a202347ca1c6bd.zip
Notes
Diffstat (limited to 'deskutils')
-rw-r--r--deskutils/calendar/Makefile31
-rw-r--r--deskutils/calendar/distinfo3
-rw-r--r--deskutils/calendar/files/patch-Makefile126
-rw-r--r--deskutils/calendar/files/patch-calendar.h11
-rw-r--r--deskutils/calendar/files/patch-io.c20
-rw-r--r--deskutils/calendar/files/patch-pathnames.h16
-rw-r--r--deskutils/calendar/pkg-descr6
7 files changed, 213 insertions, 0 deletions
diff --git a/deskutils/calendar/Makefile b/deskutils/calendar/Makefile
new file mode 100644
index 000000000000..61bf0338ebba
--- /dev/null
+++ b/deskutils/calendar/Makefile
@@ -0,0 +1,31 @@
+# $FreeBSD$
+
+PORTNAME= calendar
+DISTVERSION= 0.1
+CATEGORIES= deskutils
+
+MAINTAINER= se@FreeBSD.org
+COMMENT= Port of the FreeBSD calendar program
+
+LICENSE= BSD3CLAUSE
+
+RUN_DEPENDS= ${LOCALBASE}/share/calendar/calendar.all:deskutils/calendar-data
+
+USE_GITHUB= yes
+GH_ACCOUNT= bsdimp
+GH_TAGNAME= fcc5d31
+
+CFLAGS+= -DLOCALBASE=${LOCALBASE}
+LDFLAGS+= -lm -lutil
+
+PLIST_FILES= bin/calendar \
+ share/man/man1/calendar.1.gz
+
+OPTIONS_DEFINE= NLS
+NLS_CFLAGS= -DWITH_ICONV
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/calendar ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/calendar.1 ${STAGEDIR}${PREFIX}/share/man/man1
+
+.include <bsd.port.mk>
diff --git a/deskutils/calendar/distinfo b/deskutils/calendar/distinfo
new file mode 100644
index 000000000000..85d1c840e21d
--- /dev/null
+++ b/deskutils/calendar/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1603625001
+SHA256 (bsdimp-calendar-0.1-fcc5d31_GH0.tar.gz) = ad7d0b51c4b834241aebbf6c50d187e5720f6c46c02615b27841a923e082aebc
+SIZE (bsdimp-calendar-0.1-fcc5d31_GH0.tar.gz) = 132824
diff --git a/deskutils/calendar/files/patch-Makefile b/deskutils/calendar/files/patch-Makefile
new file mode 100644
index 000000000000..a92539de7665
--- /dev/null
+++ b/deskutils/calendar/files/patch-Makefile
@@ -0,0 +1,126 @@
+--- Makefile.orig 2020-10-18 03:01:26 UTC
++++ Makefile
+@@ -1,117 +1,14 @@
+ # @(#)Makefile 8.1 (Berkeley) 6/6/93
+ # $FreeBSD$
+
+-.include <src.opts.mk>
+-
+ PROG= calendar
+-SRCS= calendar.c locale.c events.c dates.c parsedata.c io.c day.c \
+- ostern.c paskha.c pom.c sunpos.c
+-LIBADD= m util
+-INTER= de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \
+- hr_HR.ISO8859-2 hu_HU.ISO8859-2 pt_BR.ISO8859-1 \
+- pt_BR.UTF-8 ru_RU.KOI8-R ru_RU.UTF-8 uk_UA.KOI8-U
+-DE_LINKS= de_DE.ISO8859-15
+-FR_LINKS= fr_FR.ISO8859-15
+
+-.if ${MK_ICONV} == "yes"
+-CFLAGS+= -DWITH_ICONV
+-.endif
++OBJS= calendar.o locale.o events.o dates.o parsedata.o io.o day.o \
++ ostern.o paskha.o pom.o sunpos.o
+
+-FILESGROUPS+= CALS
+-CALS= calendars/calendar.all \
+- calendars/calendar.australia \
+- calendars/calendar.birthday \
+- calendars/calendar.brazilian \
+- calendars/calendar.christian \
+- calendars/calendar.computer \
+- calendars/calendar.croatian \
+- calendars/calendar.dutch \
+- calendars/calendar.freebsd \
+- calendars/calendar.french \
+- calendars/calendar.german \
+- calendars/calendar.history \
+- calendars/calendar.holiday \
+- calendars/calendar.hungarian \
+- calendars/calendar.judaic \
+- calendars/calendar.lotr \
+- calendars/calendar.music \
+- calendars/calendar.newzealand \
+- calendars/calendar.russian \
+- calendars/calendar.southafrica \
+- calendars/calendar.ukrainian \
+- calendars/calendar.usholiday \
+- calendars/calendar.world
+-CALSDIR= ${SHAREDIR}/calendar
++LDFLAGS= -lm -lutil
+
+-CAL_de_AT.ISO_8859-15= calendar.feiertag
++all: ${PROG}
+
+-CAL_de_DE.ISO8859-1= calendar.all \
+- calendar.feiertag \
+- calendar.geschichte \
+- calendar.kirche \
+- calendar.literatur \
+- calendar.musik \
+- calendar.wissenschaft
+-
+-CAL_fr_FR.ISO8859-1= calendar.all \
+- calendar.fetes \
+- calendar.french \
+- calendar.jferies \
+- calendar.proverbes
+-
+-CAL_hr_HR.ISO8859-2= calendar.all \
+- calendar.praznici
+-
+-CAL_hu_HU.ISO8859-2= calendar.all \
+- calendar.nevnapok \
+- calendar.unnepek
+-
+-CAL_pt_BR.ISO8859-1= calendar.all \
+- calendar.commemorative \
+- calendar.holidays \
+- calendar.mcommemorative
+-
+-CAL_pt_BR.UTF-8= calendar.all \
+- calendar.commemorative \
+- calendar.holidays \
+- calendar.mcommemorative
+-
+-CAL_ru_RU.KOI8-R= calendar.all \
+- calendar.common \
+- calendar.holiday \
+- calendar.military \
+- calendar.orthodox \
+- calendar.pagan
+-
+-CAL_ru_RU.UTF-8= calendar.all \
+- calendar.common \
+- calendar.holiday \
+- calendar.military \
+- calendar.orthodox \
+- calendar.pagan
+-
+-CAL_uk_UA.KOI8-U= calendar.all \
+- calendar.holiday \
+- calendar.misc \
+- calendar.orthodox
+-
+-.for lang in ${INTER}
+-FILESGROUPS+= CALS_${lang}
+-CALS_${lang}DIR= ${SHAREDIR}/calendar/${lang}
+-.for file in ${CAL_${lang}}
+-CALS_${lang}+= ${file:S@^@calendars/${lang}/@}
+-.endfor
+-.endfor
+-
+-
+-.for link in ${DE_LINKS}
+-SYMLINKS+= de_DE.ISO8859-1 ${SHAREDIR}/calendar/${link}
+-.endfor
+-.for link in ${FR_LINKS}
+-SYMLINKS+= fr_FR.ISO8859-1 ${SHAREDIR}/calendar/${link}
+-.endfor
+-
+-HAS_TESTS=
+-SUBDIR.${MK_TESTS}+= tests
+-
+-.include <bsd.prog.mk>
++${PROG}: ${OBJS}
++ ${CC} ${OBJS} ${LDFLAGS} -o ${PROG}
diff --git a/deskutils/calendar/files/patch-calendar.h b/deskutils/calendar/files/patch-calendar.h
new file mode 100644
index 000000000000..3e95c74e8bc2
--- /dev/null
+++ b/deskutils/calendar/files/patch-calendar.h
@@ -0,0 +1,11 @@
+--- calendar.h.orig 2020-10-18 03:01:26 UTC
++++ calendar.h
+@@ -28,7 +28,7 @@
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+- * $FreeBSD$
++ * $FreeBSD: head/usr.bin/calendar/calendar.h 358562 2020-03-03 00:20:08Z cem $
+ */
+
+ #include <sys/types.h>
diff --git a/deskutils/calendar/files/patch-io.c b/deskutils/calendar/files/patch-io.c
new file mode 100644
index 000000000000..e037a2d3efc3
--- /dev/null
+++ b/deskutils/calendar/files/patch-io.c
@@ -0,0 +1,20 @@
+--- io.c.orig 2020-10-18 03:01:26 UTC
++++ io.c
+@@ -42,7 +42,7 @@ static char sccsid[] = "@(#)calendar.c 8.3 (Berkeley)
+ #endif
+
+ #include <sys/cdefs.h>
+-__FBSDID("$FreeBSD$");
++__FBSDID("$FreeBSD: head/usr.bin/calendar/io.c 366962 2020-10-23 09:22:23Z se $");
+
+ #include <sys/param.h>
+ #include <sys/stat.h>
+@@ -71,7 +71,7 @@ enum {
+ };
+
+ const char *calendarFile = "calendar"; /* default calendar file */
+-static const char *calendarHomes[] = {".calendar", _PATH_INCLUDE}; /* HOME */
++static const char *calendarHomes[] = {".calendar", _PATH_INCLUDE_LOCAL, _PATH_INCLUDE}; /* HOME */
+ static const char *calendarNoMail = "nomail";/* don't sent mail if file exist */
+
+ static char path[MAXPATHLEN];
diff --git a/deskutils/calendar/files/patch-pathnames.h b/deskutils/calendar/files/patch-pathnames.h
new file mode 100644
index 000000000000..53d72d887f78
--- /dev/null
+++ b/deskutils/calendar/files/patch-pathnames.h
@@ -0,0 +1,16 @@
+--- pathnames.h.orig 2020-10-18 03:01:26 UTC
++++ pathnames.h
+@@ -29,9 +29,12 @@
+ * SUCH DAMAGE.
+ *
+ * @(#)pathnames.h 8.1 (Berkeley) 6/6/93
+- * $FreeBSD$
++ * $FreeBSD: head/usr.bin/calendar/pathnames.h 366962 2020-10-23 09:22:23Z se $
+ */
+
+ #include <paths.h>
+
++#define s1(s) #s
++#define s2(s) s1(s)
+ #define _PATH_INCLUDE "/usr/share/calendar"
++#define _PATH_INCLUDE_LOCAL s2(LOCALBASE) "/share/calendar"
diff --git a/deskutils/calendar/pkg-descr b/deskutils/calendar/pkg-descr
new file mode 100644
index 000000000000..00502404b672
--- /dev/null
+++ b/deskutils/calendar/pkg-descr
@@ -0,0 +1,6 @@
+This is the calendar program from FreeBSD converted into a port.
+
+The purpose of this port is to make upgrades to the calendar program
+available independently of the FreeBSD release cycle.
+
+WWW: http://freebsd.org