mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
[MAINTAINER] ports-mgmt/portfind: Update from 1.6.1 to 1.6.3
Update MAINTAINER email minor modernizations. PR: 202063 Submitted by: Thorsten Geppert (Maintainer) Approved by: adamw (mentor) Differential Revision: https://reviews.freebsd.org/D9194
This commit is contained in:
parent
572e943f74
commit
39b1447eb4
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=431610
5 changed files with 9 additions and 89 deletions
|
@ -1,12 +1,11 @@
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
PORTNAME= portfind
|
PORTNAME= portfind
|
||||||
PORTVERSION= 1.6.1
|
PORTVERSION= 1.6.3
|
||||||
PORTREVISION= 1
|
|
||||||
CATEGORIES= ports-mgmt perl5
|
CATEGORIES= ports-mgmt perl5
|
||||||
MASTER_SITES= http://dynsoft.com/files/
|
MASTER_SITES= http://gug-it.de/files/
|
||||||
|
|
||||||
MAINTAINER= thorsten@dynsoft.com
|
MAINTAINER= thorsten@gug-it.de
|
||||||
COMMENT= Search the ports tree
|
COMMENT= Search the ports tree
|
||||||
|
|
||||||
LICENSE= BSD3CLAUSE
|
LICENSE= BSD3CLAUSE
|
||||||
|
@ -17,6 +16,8 @@ RUN_DEPENDS= sqlite3:databases/sqlite3
|
||||||
USES= perl5
|
USES= perl5
|
||||||
USE_PERL5= build
|
USE_PERL5= build
|
||||||
|
|
||||||
|
PLIST_FILES= bin/portfind man/man1/portfind.1.gz
|
||||||
|
|
||||||
do-install:
|
do-install:
|
||||||
${INSTALL_PROGRAM} ${WRKSRC}/portfind ${STAGEDIR}${PREFIX}/bin
|
${INSTALL_PROGRAM} ${WRKSRC}/portfind ${STAGEDIR}${PREFIX}/bin
|
||||||
${INSTALL_MAN} ${WRKSRC}/portfind.1 ${STAGEDIR}${MANPREFIX}/man/man1
|
${INSTALL_MAN} ${WRKSRC}/portfind.1 ${STAGEDIR}${MANPREFIX}/man/man1
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
SHA256 (portfind-1.6.1.tar.gz) = 18b80f94b62e6979d495ea428972f41549a0eaf634655388b8d7d2bb0772ecbe
|
TIMESTAMP = 1465665383
|
||||||
SIZE (portfind-1.6.1.tar.gz) = 5334
|
SHA256 (portfind-1.6.3.tar.gz) = 7587e024ab748e4d8e53ce29c364e5e9db08d83fef8f2ca62b23acc05bafde84
|
||||||
|
SIZE (portfind-1.6.3.tar.gz) = 5504
|
||||||
|
|
|
@ -1,80 +0,0 @@
|
||||||
--- portfind.c.orig 2014-08-24 15:54:28 UTC
|
|
||||||
+++ portfind.c
|
|
||||||
@@ -103,20 +103,25 @@ int main(int argc, char **argv) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ char *filename;
|
|
||||||
char *release = get_release();
|
|
||||||
+
|
|
||||||
if(!release) {
|
|
||||||
fprintf(stderr, "Could not determine release\n");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
- char *filename = calloc(strlen(release) + strlen(INDEX_FILE) + 1, sizeof(char));
|
|
||||||
- sprintf(filename, "%s%s", INDEX_FILE, release);
|
|
||||||
+ asprintf(&filename, INDEX_FILE "%s", release);
|
|
||||||
+ if (filename == NULL) {
|
|
||||||
+ fprintf(stderr, "Could not allocate memory for `filename`\n");
|
|
||||||
+ return 1;
|
|
||||||
+ }
|
|
||||||
free(release);
|
|
||||||
|
|
||||||
FILE *file = fopen(filename, "r");
|
|
||||||
free(filename);
|
|
||||||
if(!file) {
|
|
||||||
- fprintf(stderr, "Could not open %s\n", INDEX_FILE);
|
|
||||||
+ fprintf(stderr, "Could not open %s\n", filename);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -435,25 +440,32 @@ char *get_installed_version(const char *
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
|
|
||||||
-char *get_release() {
|
|
||||||
- size_t length = 0;
|
|
||||||
- sysctlbyname("kern.osrelease", NULL, &length, NULL, 0);
|
|
||||||
- if(length == 0)
|
|
||||||
- return NULL;
|
|
||||||
-
|
|
||||||
- char *release = calloc(length, sizeof(char));
|
|
||||||
- char *version = calloc(length, sizeof(char));
|
|
||||||
- char *tmp = version;
|
|
||||||
- sysctlbyname("kern.osrelease", release, &length, NULL, 0);
|
|
||||||
- char c = *release;
|
|
||||||
- while(c != '.' && c != '\0') {
|
|
||||||
- *tmp++ = c;
|
|
||||||
- c = *(++release);
|
|
||||||
- }
|
|
||||||
+char *get_release(void) {
|
|
||||||
+ char *first_dot, *release;
|
|
||||||
+ size_t length;
|
|
||||||
|
|
||||||
+ release = NULL;
|
|
||||||
+
|
|
||||||
+ if (sysctlbyname("kern.osrelease", NULL, &length, NULL, 0) == -1)
|
|
||||||
+ goto fail;
|
|
||||||
+
|
|
||||||
+ if ((release = malloc(sizeof(char) * length)) == NULL)
|
|
||||||
+ goto fail;
|
|
||||||
+
|
|
||||||
+ if (sysctlbyname("kern.osrelease", release, &length, NULL, 0) == -1)
|
|
||||||
+ goto fail;
|
|
||||||
+
|
|
||||||
+ if ((first_dot = strchr(release, '.')) == NULL)
|
|
||||||
+ goto fail;
|
|
||||||
+
|
|
||||||
+ *first_dot = '\0';
|
|
||||||
+
|
|
||||||
+ return release;
|
|
||||||
+
|
|
||||||
+fail:
|
|
||||||
free(release);
|
|
||||||
|
|
||||||
- return version;
|
|
||||||
+ return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void help(const char *program) {
|
|
|
@ -1,3 +1,3 @@
|
||||||
Use portfind to search in the ports tree.
|
Use portfind to search in the ports tree.
|
||||||
|
|
||||||
WWW: http://www.dynsoft.com
|
WWW: http://www.gug-it.de
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
bin/portfind
|
|
||||||
man/man1/portfind.1.gz
|
|
Loading…
Add table
Reference in a new issue