Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163399088
D15098.id41533.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D15098.id41533.diff
View Options
Index: head/sysutils/Makefile
===================================================================
--- head/sysutils/Makefile
+++ head/sysutils/Makefile
@@ -323,6 +323,7 @@
SUBDIR += fileprune
SUBDIR += fileschanged
SUBDIR += filetype
+ SUBDIR += filevercmp
SUBDIR += filewatcherd
SUBDIR += finfo
SUBDIR += firstboot-freebsd-update
Index: head/sysutils/filevercmp/Makefile
===================================================================
--- head/sysutils/filevercmp/Makefile
+++ head/sysutils/filevercmp/Makefile
@@ -0,0 +1,20 @@
+# $FreeBSD$
+
+PORTNAME= filevercmp
+DISTVERSION= g20151117
+CATEGORIES= sysutils
+
+MAINTAINER= jwb@FreeBSD.org
+COMMENT= Compare version strings as in sort --version-sort
+
+LICENSE= GPLv3
+
+USE_GITHUB= yes
+GH_ACCOUNT= ekg
+GH_TAGNAME= cccb6ba1fffa2898718b0a96c63279e0979e002b
+
+MAKEFILE= ${FILESDIR}/Makefile
+INSTALL_TARGET= install-strip
+PLIST_FILES= bin/filevercmp include/filevercmp.h lib/libfilevercmp.a
+
+.include <bsd.port.mk>
Index: head/sysutils/filevercmp/distinfo
===================================================================
--- head/sysutils/filevercmp/distinfo
+++ head/sysutils/filevercmp/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1523600860
+SHA256 (ekg-filevercmp-g20151117-cccb6ba1fffa2898718b0a96c63279e0979e002b_GH0.tar.gz) = de0b23cd95bb121a6ec774cdbd54e1fbabe4e1cc00211997d7ecc2b5a9d102c5
+SIZE (ekg-filevercmp-g20151117-cccb6ba1fffa2898718b0a96c63279e0979e002b_GH0.tar.gz) = 3105
Index: head/sysutils/filevercmp/files/Makefile
===================================================================
--- head/sysutils/filevercmp/files/Makefile
+++ head/sysutils/filevercmp/files/Makefile
@@ -0,0 +1,52 @@
+
+# Use ?= to allow overriding from the env or command-line, e.g.
+#
+# make CXXFLAGS="-O3 -fPIC" install
+#
+# Package managers will override many of these variables automatically, so
+# this is aimed at making it easy to create packages (Debian packages,
+# FreeBSD ports, MacPorts, pkgsrc, etc.)
+
+CC ?= cc
+CFLAGS ?= -O -g
+AR ?= ar
+MKDIR ?= mkdir
+INSTALL ?= install -c
+STRIP ?= strip
+DESTDIR ?= stage
+PREFIX ?= /usr/local
+
+OBJS= filevercmp.o
+MAIN = main.o
+BIN = filevercmp
+LIB = libfilevercmp.a
+
+all: ${BIN} ${LIB}
+
+${BIN}: ${OBJS} ${MAIN}
+ ${CC} ${CFLAGS} -o ${BIN} ${OBJS} ${MAIN}
+
+${LIB}: ${OBJS}
+ ${AR} -rs ${LIB} ${OBJS}
+
+install: all
+ ${MKDIR} -p ${DESTDIR}${PREFIX}/bin
+ ${MKDIR} -p ${DESTDIR}${PREFIX}/include
+ ${MKDIR} -p ${DESTDIR}${PREFIX}/lib
+ ${INSTALL} ${BIN} ${DESTDIR}${PREFIX}/bin
+ ${INSTALL} *.h ${DESTDIR}${PREFIX}/include
+ ${INSTALL} ${LIB} ${DESTDIR}${PREFIX}/lib
+
+install-strip: install
+ ${STRIP} ${DESTDIR}${PREFIX}/bin/${BIN}
+
+clean:
+ rm -rf ${BIN} ${LIB} ${OBJS} ${MAIN} ${DESTDIR}
+
+.PHONY: all clean
+
+filevercmp.o: filevercmp.c filevercmp.h
+ ${CC} ${CFLAGS} -c filevercmp.c
+
+main.o: main.c filevercmp.h
+ ${CC} ${CFLAGS} -c main.c
Index: head/sysutils/filevercmp/pkg-descr
===================================================================
--- head/sysutils/filevercmp/pkg-descr
+++ head/sysutils/filevercmp/pkg-descr
@@ -0,0 +1,16 @@
+Compare version strings:
+
+This function compares strings S1 and S2:
+
+ By PREFIX in the same way as strcmp.
+
+ Then by VERSION (most similarly to version compare of Debian's dpkg).
+ Leading zeros in version numbers are ignored.
+
+ If both (PREFIX and VERSION) are equal, strcmp function is used for
+ comparison. So this function can return 0 if (and only if) strings S1 and
+ S2 are identical.
+
+It returns number >0 for S1 > S2, 0 for S1 == S2 and number <0 for S1 < S2.
+
+WWW: https://github.com/ekg/filevercmp
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 23, 8:56 PM (5 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35395144
Default Alt Text
D15098.id41533.diff (3 KB)
Attached To
Mode
D15098: sysutils/filevercmp: Compare version strings as in sort --version-sort
Attached
Detach File
Event Timeline
Log In to Comment