diff --git a/community/fnc/APKBUILD b/community/fnc/APKBUILD index d030ffb323c47d5a5262b3182dfbcd406af0bb15..834dfbb00976da548157d8fd38298f10da0e7e35 100644 --- a/community/fnc/APKBUILD +++ b/community/fnc/APKBUILD @@ -1,35 +1,31 @@ # Contributor: rubicon <rubicon@mailo.com> # Maintainer: Celeste <cielesti@protonmail.com> pkgname=fnc -pkgver=0.15 -pkgrel=1 +pkgver=0.16 +pkgrel=0 pkgdesc="Interactive ncurses browser for Fossil repositories" url="https://fnc.bsdbox.org/" -# ppc64le: 'reader.term.a' may be used uninitialized -arch="all !ppc64le" +arch="all" license="ISC" makedepends="bsd-compat-headers ncurses-dev zlib-dev" -options="!check" +checkdepends="expect" subpackages="$pkgname-doc" -source="https://fnc.bsdbox.org/uv/dl/fnc-$pkgver.tar.gz - fix-name-clash.patch - maybe-uninit.patch - " +source="https://fnc.bsdbox.org/uv/dl/fnc-$pkgver.tar.gz" build() { - # todo: actually fix the uninit - export CFLAGS="${CFLAGS/-Os/-O2}" make } check() { - ./src/fnc -v + # workaround stdin not being a tty on the CI + expect -f - <<-'END' + spawn ./src/fnc -v + expect eof + exit [lindex [wait] 3] + END } package() { - # workaround for Makefile not calling - # install with option to create dirs - mkdir -vp "$pkgdir"/usr/bin make PREFIX="$pkgdir"/usr install install -Dvm644 README.md CHANGES.md LICENSE \ @@ -37,7 +33,5 @@ package() { } sha512sums=" -7d566c47f51c7ff1f09afbea7540971f25f00f68a6ac591259b52c7288824b26b6dacf3e93af72a0f8103fde4bb6a280384b012126005bf19a6b17c58d600c81 fnc-0.15.tar.gz -28f8630bdb0fabd076b179dd5d3e7972c8b31f5b44a45bdeb3c995a84a14cca8e55ffd9b86084ad6b61fbff011ca5c556b3282df9cf3871b4f495f778edefeb2 fix-name-clash.patch -e5bcfe0972a3f27c68146315eb6856804d825ce40b5a053d7b7cfdfe113fdeda655acb2f3f6b8a527f356da225ec30f0ee7c951f92a9ab767859c0bb01ace362 maybe-uninit.patch +aeb951d44cb9d96606450484c744eda0371d057d14c696405a8dc6cc37564f4fc1379470250ec730aaa48e15da80023501b17bde8d072595b721e84cc60c9124 fnc-0.16.tar.gz " diff --git a/community/fnc/fix-name-clash.patch b/community/fnc/fix-name-clash.patch deleted file mode 100644 index 43a110724acc6d2f029850c659b744fb857d281a..0000000000000000000000000000000000000000 --- a/community/fnc/fix-name-clash.patch +++ /dev/null @@ -1,220 +0,0 @@ ---- a/lib/libfossil.c -+++ b/lib/libfossil.c -@@ -989,7 +989,7 @@ - #undef FLCA - } - --void * fsl_realloc_f_stdalloc(void * state __unused, void * mem, fsl_size_t n){ -+void * fsl_realloc_f_stdalloc(void * state __libfossil_unused, void * mem, fsl_size_t n){ - if(!mem){ - return malloc(n); - }else if(!n){ -@@ -2895,7 +2895,7 @@ - string. - */ - static int spech_urlencode( fsl_output_f pf, void * pfArg, -- unsigned int pfLen __unused, void * varg ){ -+ unsigned int pfLen __libfossil_unused, void * varg ){ - char const * str = (char const *) varg; - int rc = 0; - char ch = 0; -@@ -5154,7 +5154,7 @@ - return fsl_buffer_append((fsl_buffer*)state, src, n); - } - --int fsl_finalizer_f_buffer( void * state __unused, void * mem ){ -+int fsl_finalizer_f_buffer( void * state __libfossil_unused, void * mem ){ - fsl_buffer * b = (fsl_buffer*)mem; - fsl_buffer_reserve(b, 0); - *b = fsl_buffer_empty; -@@ -10723,7 +10723,7 @@ - /** - Proxies fslAllocOrig.f() and abort()s on OOM conditions. - */ --static void * fsl_realloc_f_failing(void * state __unused, void * mem, fsl_size_t n){ -+static void * fsl_realloc_f_failing(void * state __libfossil_unused, void * mem, fsl_size_t n){ - void * rv = fslAllocOrig.f(fslAllocOrig.state, mem, n); - if(n && !rv){ - fsl__fatal(FSL_RC_OOM, NULL)/*does not return*/; -@@ -18731,17 +18731,17 @@ - fsl_list_visitor_f() impl which requires that obj be-a (fsl_card_T*), - which this function passes to fsl_card_T_free(). - */ --static int fsl_list_v_card_T_free(void * obj, void * visitorState __unused){ -+static int fsl_list_v_card_T_free(void * obj, void * visitorState __libfossil_unused){ - if(obj) fsl_card_T_free( (fsl_card_T*)obj ); - return 0; - } - --static int fsl_list_v_card_Q_free(void * obj, void * visitorState __unused ){ -+static int fsl_list_v_card_Q_free(void * obj, void * visitorState __libfossil_unused ){ - if(obj) fsl_card_Q_free( (fsl_card_Q*)obj ); - return 0; - } - --static int fsl_list_v_card_J_free(void * obj, void * visitorState __unused){ -+static int fsl_list_v_card_J_free(void * obj, void * visitorState __libfossil_unused){ - if(obj) fsl_card_J_free( (fsl_card_J*)obj ); - return 0; - } -@@ -22016,7 +22016,7 @@ - Overrideable crosslink listener which updates the timeline for - attachment records. - */ --static int fsl_deck_xlink_f_attachment(fsl_deck * const d, void * state __unused){ -+static int fsl_deck_xlink_f_attachment(fsl_deck * const d, void * state __libfossil_unused){ - if(FSL_SATYPE_ATTACHMENT!=d->type) return 0; - int rc; - fsl_db * const db = fsl_cx_db_repo(d->f); -@@ -22094,7 +22094,7 @@ - Overrideable crosslink listener which updates the timeline for - checkin records. - */ --static int fsl_deck_xlink_f_checkin(fsl_deck * const d, void * state __unused){ -+static int fsl_deck_xlink_f_checkin(fsl_deck * const d, void * state __libfossil_unused){ - if(FSL_SATYPE_CHECKIN!=d->type) return 0; - int rc; - fsl_db * db; -@@ -22142,7 +22142,7 @@ - return fsl_cx_uplift_db_error2(d->f, db, rc); - } - --static int fsl_deck_xlink_f_control(fsl_deck * const d, void * state __unused){ -+static int fsl_deck_xlink_f_control(fsl_deck * const d, void * state __libfossil_unused){ - if(FSL_SATYPE_CONTROL!=d->type) return 0; - /* - Create timeline event entry for all tags in this control -@@ -22289,7 +22289,7 @@ - - } - --static int fsl_deck_xlink_f_forum(fsl_deck * const d, void * state __unused){ -+static int fsl_deck_xlink_f_forum(fsl_deck * const d, void * state __libfossil_unused){ - if(FSL_SATYPE_FORUMPOST!=d->type) return 0; - int rc = 0; - fsl_db * const db = fsl_cx_db_repo(d->f); -@@ -22375,7 +22375,7 @@ - } - - --static int fsl_deck_xlink_f_technote(fsl_deck * const d, void * state __unused){ -+static int fsl_deck_xlink_f_technote(fsl_deck * const d, void * state __libfossil_unused){ - if(FSL_SATYPE_TECHNOTE!=d->type) return 0; - char buf[FSL_STRLEN_K256 + 7 /* event-UUID\0 */] = {0}; - fsl_id_t tagid; -@@ -22424,7 +22424,7 @@ - return rc; - } - --static int fsl_deck_xlink_f_wiki(fsl_deck * const d, void * state __unused){ -+static int fsl_deck_xlink_f_wiki(fsl_deck * const d, void * state __libfossil_unused){ - if(FSL_SATYPE_WIKI!=d->type) return 0; - int rc; - char const * zWiki; -@@ -26176,7 +26176,7 @@ - return rc; - } - --static int fdb__tcl_finish(fsl_dibu * const b __unused){ -+static int fdb__tcl_finish(fsl_dibu * const b __libfossil_unused){ - int rc = 0; - #if 0 - BR_CLOSE; -@@ -28947,10 +28947,10 @@ - static int fociConnect( - sqlite3 *db, - void *pAux /*a (fsl_cx*) */, -- int argc __unused, -- const char * const * argv __unused, -+ int argc __libfossil_unused, -+ const char * const * argv __libfossil_unused, - sqlite3_vtab **ppVtab, -- char **pzErr __unused -+ char **pzErr __libfossil_unused - ){ - FociTable *pTab; - int rc = SQLITE_OK; -@@ -28983,7 +28983,7 @@ - * (1) checkinID=?. visit only the single manifest specified. - * (2) symName=? visit only the single manifest specified. - */ --static int fociBestIndex(sqlite3_vtab *tab __unused, sqlite3_index_info *pIdxInfo){ -+static int fociBestIndex(sqlite3_vtab *tab __libfossil_unused, sqlite3_index_info *pIdxInfo){ - int i; - pIdxInfo->estimatedCost = 1000000000.0; - for( i=0; i<pIdxInfo->nConstraint; i++ ){ -@@ -29056,8 +29056,8 @@ - - static int fociFilter( - sqlite3_vtab_cursor *pCursor, -- int idxNum, const char *idxStr __unused, -- int argc __unused, sqlite3_value **argv -+ int idxNum, const char *idxStr __libfossil_unused, -+ int argc __libfossil_unused, sqlite3_value **argv - ){ - int rc = SQLITE_OK; - FociCursor *const pCur = (FociCursor *)pCursor; -@@ -31062,7 +31062,7 @@ - : (feof(f) ? 0 : FSL_RC_IO); - } - --void fsl_finalizer_f_FILE( void * state __unused, void * mem ){ -+void fsl_finalizer_f_FILE( void * state __libfossil_unused, void * mem ){ - if(mem){ - fsl_fclose((FILE*)mem); - } -@@ -31546,7 +31546,7 @@ - return 0; - } - --int fsl_list_v_fsl_free(void * obj, void * visitorState __unused){ -+int fsl_list_v_fsl_free(void * obj, void * visitorState __libfossil_unused){ - if(obj) fsl_free( obj ); - return 0; - } -@@ -41353,8 +41353,8 @@ - */ - static void fsl_db_now_udf( - sqlite3_context *context, -- int argc __unused, -- sqlite3_value **argv __unused -+ int argc __libfossil_unused, -+ sqlite3_value **argv __libfossil_unused - ){ - sqlite3_result_int64(context, (sqlite3_int64)time(0)); - } -@@ -41364,8 +41364,8 @@ - */ - static void fsl_db_j2u_udf( - sqlite3_context *context, -- int argc __unused, -- sqlite3_value **argv __unused -+ int argc __libfossil_unused, -+ sqlite3_value **argv __libfossil_unused - ){ - double const jd = (double)sqlite3_value_double(argv[0]); - sqlite3_result_int64(context, (sqlite3_int64)fsl_julian_to_unix(jd)); -@@ -41578,8 +41578,8 @@ - */ - static void fsl_db_user_udf( - sqlite3_context *context, -- int argc __unused, -- sqlite3_value **argv __unused -+ int argc __libfossil_unused, -+ sqlite3_value **argv __libfossil_unused - ){ - fsl_cx * f = (fsl_cx*)sqlite3_user_data(context); - assert(f); ---- a/lib/libfossil.h -+++ b/lib/libfossil.h -@@ -272,8 +272,8 @@ - TODO: add support for the C++ attributes for doing this. - */ - --#if !defined(__unused) --#define __unused -+#if !defined(__libfossil_unused) -+#define __libfossil_unused - #endif - - diff --git a/community/fnc/maybe-uninit.patch b/community/fnc/maybe-uninit.patch deleted file mode 100644 index a66fa2508b69f9114c878c10aecf8c4d84c722f4..0000000000000000000000000000000000000000 --- a/community/fnc/maybe-uninit.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- a/lib/libfossil.c -+++ b/lib/libfossil.c -@@ -29404,7 +29404,7 @@ - } - - fsl_int_t fsl_file_size(const char *zFilename){ -- fsl_fstat fst; -+ fsl_fstat fst = {0}; - return ( 0 != fsl_stat(zFilename, &fst, 1) ) - ? -1 - : (fsl_int_t)fst.size; -@@ -29421,7 +29421,7 @@ - */ - - fsl_time_t fsl_file_mtime(const char *zFilename){ -- fsl_fstat fst; -+ fsl_fstat fst = {0}; - return ( 0 != fsl_stat(zFilename, &fst, 1) ) - ? -1 - : (fsl_time_t)fst.mtime; -@@ -29429,7 +29429,7 @@ - - - bool fsl_is_file(const char *zFilename){ -- fsl_fstat fst; -+ fsl_fstat fst = {0}; - return ( 0 != fsl_stat(zFilename, &fst, 1) ) - ? false - : (FSL_FSTAT_TYPE_FILE == fst.type); -@@ -29440,7 +29440,7 @@ - if(zFilename){/*unused var*/} - return false; - #else -- fsl_fstat fst; -+ fsl_fstat fst = {0}; - return (0 == fsl_stat(zFilename, &fst, 0)) - ? (FSL_FSTAT_TYPE_LINK == fst.type) - : false; -@@ -29990,7 +29990,7 @@ - } - - int fsl_dir_check(const char *zFilename){ -- fsl_fstat fst; -+ fsl_fstat fst = {0}; - int rc; - if( zFilename ){ - #if 1 -@@ -33445,7 +33445,7 @@ - if(0==rc) rc = fsl_stmt_get_text(&q, 1, &zName, NULL); - if(0==rc) rc = fsl_buffer_appendf(bFullName, "%s%s", f->ckout.dir, zName); - if(rc) goto merge_add_end; -- fsl_merge_fchange_e fchange; -+ fsl_merge_fchange_e fchange = 0; - if( fsl_is_file_or_link(fsl_buffer_cstr(bFullName)) - && !fsl_db_exists(db, "SELECT 1 FROM fv WHERE fn=%Q", zName) ){ - if(opt->debug){ ---- a/src/fnc.c -+++ b/src/fnc.c -@@ -5085,7 +5085,7 @@ - char *pp, *pp0, *tmppath; - size_t idx, lineno; - int i, rc = FSL_RC_OK; -- bool drop; -+ bool drop = 0; - - if ((tmpd = getenv("TMPDIR")) == NULL || *tmpd == '\0') - tmpd = P_tmpdir;