Skip to content

Commit

Permalink
japanese/nkf: Update to 2.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
hrs-allbsd committed Jan 7, 2024
1 parent 80cbb68 commit 4db4289
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 21 deletions.
14 changes: 9 additions & 5 deletions japanese/nkf/Makefile
@@ -1,17 +1,21 @@
PORTNAME= nkf
PORTVERSION= 2.1.4
PORTVERSION= 2.1.5
PORTEPOCH= 1
CATEGORIES?= japanese
MASTER_SITES= OSDN/${PORTNAME}

MAINTAINER= hrs@FreeBSD.org
COMMENT= Network Kanji code conversion Filter
WWW= https://sourceforge.jp/projects/nkf/

LICENSE= ZLIB
LICENSE_FILE= ${WRKSRC}/nkf.c

MAKE_ENV= MKDIR="${MKDIR}"
PLIST_FILES= bin/nkf man/man1/nkf.1.gz man/ja/man1/nkf.1.gz
USES= iconv
USE_GITHUB= yes
GH_ACCOUNT= nurse
GH_TAGNAME= v${PORTVERSION:C/\./_/g}

MAKE_ENV= MKDIR="${MKDIR}" \
ICONV_CMD="${ICONV_CMD}"
PLIST_FILES= bin/nkf man/man1/nkf.1.gz man/ja.UTF-8/man1/nkf.1.gz

.include <bsd.port.mk>
6 changes: 3 additions & 3 deletions japanese/nkf/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1519798662
SHA256 (nkf-2.1.4.tar.gz) = b4175070825deb3e98577186502a8408c05921b0c8ff52e772219f9d2ece89cb
SIZE (nkf-2.1.4.tar.gz) = 232479
TIMESTAMP = 1704649242
SHA256 (nurse-nkf-2.1.5-v2_1_5_GH0.tar.gz) = 10cf6eb3d4d095919185ac224d5a634e9926d731e656d04bacb270e5cae0e28c
SIZE (nurse-nkf-2.1.5-v2_1_5_GH0.tar.gz) = 250895
31 changes: 18 additions & 13 deletions japanese/nkf/files/patch-Makefile
@@ -1,25 +1,26 @@
--- Makefile.orig 2015-12-12 13:51:41 UTC
--- Makefile.orig 2018-12-15 09:19:02 UTC
+++ Makefile
@@ -1,18 +1,23 @@
@@ -1,18 +1,24 @@
-CC = cc
-CFLAGS = -g -O2 -Wall -pedantic
+CC? = cc
+CFLAGS? = -g -O2 -Wall -pedantic
+CC ?= cc
+CFLAGS ?= -g -O2 -Wall -pedantic
# CFLAGS = -O3
SHAR = shar
# SHAR = shar -T
PERL = perl
RM = rm -rf
VERSION = 2.1.4
VERSION = 2.1.5
-MKDIR = mkdir
-prefix = /usr/local
+MKDIR? = mkdir
+MKDIR ?= mkdir
+prefix = $(DESTDIR)$(PREFIX)
+manprefix = $(DESTDIR)$(MANPREFIX)
PYTHON2 = python
PYTHON3 = python
+BSD_INSTALL_PROGRAM?= ${INSTALL} -s -o root -g wheel -m 555
+BSD_INSTALL_MAN?= ${INSTALL} -o root -g wheel -m 444
+BSD_INSTALL_PROGRAM?= ${INSTALL} -s -o root -g wheel -m 555
+BSD_INSTALL_MAN?= ${INSTALL} -o root -g wheel -m 444
+ICONV_CMD?= iconv

.PHONY: clean install test tar shar

Expand All @@ -28,7 +29,7 @@
nkf : nkf.o utf8tbl.o
$(CC) $(CFLAGS) $(LDFLAGS) -o nkf nkf.o utf8tbl.o

@@ -47,17 +52,17 @@ install: install-main install-man instal
@@ -47,17 +53,20 @@ install-main:

install-main:
-$(MKDIR) $(prefix)/bin
Expand All @@ -43,13 +44,17 @@
+ -$(MKDIR) $(manprefix)/man/man1
+ ${BSD_INSTALL_MAN} nkf.1 $(manprefix)/man/man1/

install-man-ja:
-install-man-ja:
- -$(MKDIR) $(prefix)/man/ja
- -$(MKDIR) $(prefix)/man/ja/man1
- cp -f nkf.1j $(prefix)/man/ja/man1/nkf.1
+ -$(MKDIR) $(manprefix)/man/ja
+ -$(MKDIR) $(manprefix)/man/ja/man1
+ ${BSD_INSTALL_MAN} nkf.1j $(manprefix)/man/ja/man1/nkf.1
+nkf.1u: nkf.1j
+ ${ICONV_CMD} -f iso-2022-jp -t utf-8 < $? > $@
+
+install-man-ja: nkf.1u
+ -$(MKDIR) $(manprefix)/man/ja.UTF-8
+ -$(MKDIR) $(manprefix)/man/ja.UTF-8/man1
+ ${BSD_INSTALL_MAN} nkf.1u $(manprefix)/man/ja.UTF-8/man1/nkf.1

shar:
-mkdir nkf-$(VERSION)

0 comments on commit 4db4289

Please sign in to comment.