Index: branches/2017Q4/x11-fonts/alfont/Makefile =================================================================== --- branches/2017Q4/x11-fonts/alfont/Makefile (revision 455754) +++ branches/2017Q4/x11-fonts/alfont/Makefile (revision 455755) @@ -1,92 +1,83 @@ # Created by: Rusmir Dusko # $FreeBSD$ PORTNAME= alfont PORTVERSION= 209 PORTREVISION= 3 CATEGORIES= x11-fonts -MASTER_SITES= http://opensnc.sourceforge.net/alfont/mirror/ \ - SF/nemysisfreebsdp/${CATEGORIES}/${PORTNAME}/:nemysis -# http://opensnc.sourceforge.net/alfont/:opensnc -DISTFILES= AlFont${DISTVERSION}.rar \ - alfont.c:nemysis +MASTER_SITES= http://opensnc.sourceforge.net/alfont/mirror/ +DISTNAME= AlFont${DISTVERSION} +EXTRACT_SUFX= .rar DIST_SUBDIR= ${PORTNAME} -EXTRACT_ONLY= AlFont${DISTVERSION}.rar MAINTAINER= nemysis@FreeBSD.org COMMENT= Wrapper around the freetype2 library LICENSE= FTL LICENSE_NAME= The FreeType Project LICENSE (FTL) LICENSE_FILE= ${WRKSRC}/docs/FTL.txt LICENSE_PERMS= auto-accept -BROKEN= unfetchable -DEPRECATED= Broken for more than 6 months -EXPIRATION_DATE= 2017-08-23 - EXTRACT_DEPENDS= unrar:archivers/unrar LIB_DEPENDS= liballeg.so.4:devel/allegro \ libfreetype.so:print/freetype2 WRKSRC= ${WRKDIR}/${PORTNAME} USES= dos2unix gmake iconv USE_LDCONFIG= yes CPPFLAGS+= -Iinclude -I${LOCALBASE}/include \ -I${LOCALBASE}/include/freetype2 $$(freetype-config --cflags) LDFLAGS+= -L${LOCALBASE}/lib -lalleg $$(freetype-config --libs) PLIST_FILES= include/alfont.h \ include/alfontdll.h \ lib/libalfont.so.${MAJORVER} \ lib/libalfont.so PORTDOCS= * DOCSRCDIR1= ${WRKSRC} DOC_FILES1= CHANGES.txt README.txt DOCSRCDIR2= ${WRKSRC}/docs DOCSDIR2= ${DOCSDIR}/docs DOC_FILES2= ALFONT.txt AUTHORS.txt OPTIONS_DEFINE= DOCS MAJORVER= ${PORTVERSION:S/209/2.0.9/} do-extract: @${MKDIR} ${WRKDIR} @cd ${WRKDIR} && ${LOCALBASE}/bin/unrar x -y -idq \ ${_DISTDIR}/AlFont${DISTVERSION}.rar post-patch: - @${CP} -af ${_DISTDIR}/alfont.c ${WRKSRC}/src - @${REINPLACE_CMD} -e \ 's|#define ALFONT_WINDOWS|//#define ALFONT_WINDOWS|; \ s|//#define ALFONT_LINUX|#define ALFONT_LINUX|; \ s|^ALFONT_DLL_DECLSPEC void alfont_get_string.*||' \ ${WRKSRC}/include/alfont.h do-build: cd ${WRKSRC} ; ${CC} ${CPPFLAGS} -fPIC -DPIC -c src/alfont.c -o \ src/alfont.o cd ${WRKSRC} ; ${CC} -shared ${LDFLAGS} src/alfont.o -o \ libalfont.so.${MAJORVER} do-install: ${INSTALL_DATA} ${WRKSRC}/libalfont.so.${MAJORVER} \ ${STAGEDIR}${PREFIX}/lib ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libalfont.so.${MAJORVER} @(cd ${STAGEDIR}${PREFIX}/lib ; ${LN} -sf libalfont.so.${MAJORVER} \ libalfont.so) ${INSTALL_DATA} ${WRKSRC}/include/alfont*.h ${STAGEDIR}${PREFIX}/include @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${STAGEDIR}${DOCSDIR} @${MKDIR} ${STAGEDIR}${DOCSDIR2} ${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${STAGEDIR}${DOCSDIR2} .include Index: branches/2017Q4/x11-fonts/alfont/files/patch-src_alfont.c =================================================================== --- branches/2017Q4/x11-fonts/alfont/files/patch-src_alfont.c (nonexistent) +++ branches/2017Q4/x11-fonts/alfont/files/patch-src_alfont.c (revision 455755) @@ -0,0 +1,120 @@ +--- src/alfont.c.orig 2016-10-18 20:04:21 UTC ++++ src/alfont.c +@@ -1,3 +1,28 @@ ++/* ++ * Modified Alfont 2.0.9 ++ * ++ * The original AllegroFont v2.0.9 has a few problems. ++ * This modification solves them. ++ * ++ * Modification by: Alexandre Martins (thanks to http://allegro.cc forums) ++ * Modification date: 2010-10-30 ++ * ++ * Modification by: Rusmir Dusko ++ * (thanks to http://allegro.cc forums and Hans de Goede [alfont] Fix undefined reference to _msize) ++ * Modification date: 2014-03-10 ++ * ++ * Original Alfont website: http://chernsha.sitesled.com/ ++ * AllegroFont (c) 2001, 2002 Javier Gonzalez ++ * Enhanced by Chernsha since 2004 year ++ */ ++ ++//#define malloc_usable_size malloc_size ++ ++#ifdef __GNUC__ ++#define _msize malloc_usable_size ++#include ++#endif ++ + /* AllegroFont - a wrapper for FreeType 2 */ + /* to render TTF and other font formats with Allegro */ + +@@ -336,7 +361,7 @@ int alfont_set_font_size(ALFONT_FONT *f, + break; + + /* compare real height with asked height */ +- real_height = abs(f->face->size->metrics.ascender >> 6) + abs(f->face->size->metrics.descender >> 6); ++ real_height = labs(f->face->size->metrics.ascender >> 6) + labs(f->face->size->metrics.descender >> 6); + if (real_height == h) { + /* we found the wanted height */ + break; +@@ -468,7 +493,7 @@ ALFONT_FONT *alfont_load_font(const char + alfont_set_char_extra_spacing(font, 0); + + //Initial Font attribute +- font->language=""; /* Initial Language */ ++ font->language=NULL; /* Initial Language */ + font->type=0; /* Initial Code Convert */ + font->outline_top=0; /* Initial Font top outline width */ + font->outline_bottom=0; /* Initial Font bottom outline width */ +@@ -515,7 +540,7 @@ ALFONT_FONT *alfont_load_font_from_mem(c + memcpy((void *)font->data, (void *)data, data_len); + + /* load the font */ +- error = FT_New_Memory_Face(ft_library, font->data, font->data_size, 0, &font->face); ++ error = FT_New_Memory_Face(ft_library, (unsigned char*)font->data, font->data_size, 0, &font->face); + + if (error) { + free(font->data); +@@ -548,7 +573,7 @@ ALFONT_FONT *alfont_load_font_from_mem(c + alfont_set_char_extra_spacing(font, 0); + + //Initial Font attribute +- font->language=""; /* Initial Language */ ++ font->language=NULL; /* Initial Language */ + font->type=0; /* Initial Code Convert */ + font->outline_top=0; /* Initial Font top outline width */ + font->outline_bottom=0; /* Initial Font bottom outline width */ +@@ -3761,15 +3786,15 @@ int alfont_ugetx(ALFONT_FONT *f, char ** + //advances the *s pointer to the next character + + if (f->type==1) { +- ugetxc((char**)s); ++ ugetxc((const char**)s); + #ifdef ALFONT_LINUX +- ugetxc((char**)s); ++ ugetxc((const char**)s); + #endif + } + else if(f->type==2) { +- ugetxc(&lpszWS); ++ ugetxc((const char**)&lpszWS); + #ifdef ALFONT_LINUX +- ugetxc(&lpszWS); ++ ugetxc((const char**)&lpszWS); + #endif + #ifdef ALFONT_DOS + if ((c_pt = iconv_open(f->language, "UTF-16LE")) == (iconv_t)-1) { +@@ -3814,9 +3839,9 @@ int alfont_ugetx(ALFONT_FONT *f, char ** + #ifdef ALFONT_LINUX + set_uformat(U_UTF8); + #endif +- ugetxc((char**)s); ++ ugetxc((const char**)s); + #ifdef ALFONT_LINUX +- ugetxc((char**)s); ++ ugetxc((const char**)s); + #endif + } + +@@ -4083,9 +4108,9 @@ int alfont_ugetxc(ALFONT_FONT *f, const + #endif + } + else if(f->type==2) { +- ugetxc(&lpszWS); ++ ugetxc((const char**)&lpszWS); + #ifdef ALFONT_LINUX +- ugetxc(&lpszWS); ++ ugetxc((const char**)&lpszWS); + #endif + #ifdef ALFONT_DOS + if ((c_pt = iconv_open(f->language, "UTF-16LE")) == (iconv_t)-1) { +@@ -4828,7 +4853,7 @@ void alfont_set_language(ALFONT_FONT *f, + } + else + { +- f->language=(char *)malloc(strlen(language)*sizeof(char)); ++ f->language=(char *)malloc((strlen(language)+1)*sizeof(char)); + strcpy(f->language,language); + } + } Property changes on: branches/2017Q4/x11-fonts/alfont/files/patch-src_alfont.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2017Q4 =================================================================== --- branches/2017Q4 (revision 455754) +++ branches/2017Q4 (revision 455755) Property changes on: branches/2017Q4 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r454035