[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[126] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2010-01-25 17:01:33
|
Revision: 126 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=126&view=rev Author: nickols_k Date: 2010-01-25 17:01:27 +0000 (Mon, 25 Jan 2010) Log Message: ----------- final fixes before release Modified Paths: -------------- TOOLS/subfont-c/Makefile TOOLS/subfont-c/fontgen TOOLS/subfont-c/runme TOOLS/subfont-c/subfont.c distrib/mplayerxp.spec mplayerxp/configure Modified: TOOLS/subfont-c/Makefile =================================================================== --- TOOLS/subfont-c/Makefile 2010-01-24 18:56:10 UTC (rev 125) +++ TOOLS/subfont-c/Makefile 2010-01-25 17:01:27 UTC (rev 126) @@ -1,7 +1,5 @@ -include ../../mplayerxp/config.mak - LDLIBS=-lm $(shell freetype-config --libs) -CFLAGS=$(OPTFLAGS) $(shell freetype-config --cflags) +CFLAGS=-O2 $(shell freetype-config --cflags) #CFLAGS+=-O0 # for RedHat's gcc-2.96-95 #CFLAGS+=-DOLD_FREETYPE2 # for FreeType 2.0.1 @@ -11,6 +9,7 @@ subfont: subfont.o + $(CC) $(CFLAGS) $< $(LDLIBS) -o $@ subfont.o: subfont.c Makefile ../../mplayerxp/bswap.h Modified: TOOLS/subfont-c/fontgen =================================================================== --- TOOLS/subfont-c/fontgen 2010-01-24 18:56:10 UTC (rev 125) +++ TOOLS/subfont-c/fontgen 2010-01-25 17:01:27 UTC (rev 126) @@ -24,9 +24,9 @@ mkdir $2 fi #font=verdana.ttf -encoding=iso-8859-2 -fontsize=12 -symbolssize=10 +encoding=koi8-r +fontsize=24 +symbolssize=35 blur=2 outline=1.5 Modified: TOOLS/subfont-c/runme =================================================================== --- TOOLS/subfont-c/runme 2010-01-24 18:56:10 UTC (rev 125) +++ TOOLS/subfont-c/runme 2010-01-25 17:01:27 UTC (rev 126) @@ -1,9 +1,10 @@ #!/bin/bash -#unicode="--unicode" -font=arial.ttf +unicode="--unicode" +font=./EuroStyle.ttf +#font=/usr/share/fonts/TTF/FreeMono.ttf #font=verdana.ttf -encoding=iso-8859-2 +encoding=koi8-r fontsize=24 symbolssize=35 blur=2 Modified: TOOLS/subfont-c/subfont.c =================================================================== --- TOOLS/subfont-c/subfont.c 2010-01-24 18:56:10 UTC (rev 125) +++ TOOLS/subfont-c/subfont.c 2010-01-25 17:01:27 UTC (rev 126) @@ -36,7 +36,7 @@ //// default values char *encoding = "iso-8859-1"; /* target encoding */ -char *charmap = "ucs-4"; /* font charmap encoding, I hope ucs-4 is always big endian */ +char *charmap = "utf-32"/*"ucs-4"*/; /* font charmap encoding, I hope ucs-4 is always big endian */ /* gcc 2.1.3 doesn't support ucs-4le, but supports ucs-4 (==ucs-4be) */ float ppem = 22; /* font size in pixels */ @@ -68,8 +68,8 @@ unsigned char *bbuffer, *abuffer; int width, height; int padding; -static FT_ULong charset[max_charset_size]; /* characters we want to render; Unicode */ -static FT_ULong charcodes[max_charset_size]; /* character codes in 'encoding' */ +static uint32_t charset[max_charset_size]; /* characters we want to render; Unicode */ +static uint32_t charcodes[max_charset_size]; /* character codes in 'encoding' */ iconv_t cd; // iconv conversion descriptor @@ -143,7 +143,7 @@ int const load_flags = FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING; int pen_x = 0, pen_xa; int ymin = INT_MAX, ymax = INT_MIN; - int i, uni_charmap = 1; + int i, uni_charmap = 0; int baseline, space_advance = 20; int glyphs_count = 0; @@ -282,7 +282,7 @@ glyphs = (FT_Glyph*)malloc(charset_size*sizeof(FT_Glyph*)); for (i= 0; i<charset_size; ++i) { FT_GlyphSlot slot; - FT_ULong character, code; + uint32_t character, code; FT_UInt glyph_index; FT_BBox bbox; @@ -293,7 +293,7 @@ if (character==0) glyph_index = 0; else { - glyph_index = FT_Get_Char_Index(face, uni_charmap ? character:code); + glyph_index = FT_Get_Char_Index(face, uni_charmap ? character: code); if (glyph_index==0) { WARNING("Glyph for char 0x%02x|U+%04X|%c not found.", code, character, code<' '||code>255 ? '.':code); @@ -418,13 +418,15 @@ /* decode from 'encoding' to unicode */ -FT_ULong decode_char(char c) { - FT_ULong o; +uint32_t decode_char(char c) { + uint32_t o; char *inbuf = &c; char *outbuf = (char*)&o; - int inbytesleft = 1; - int outbytesleft = sizeof(FT_ULong); + size_t inbytesleft = 1; + size_t outbytesleft = sizeof(uint32_t); + inbuf[1]=0; + printf("converting %c character\n",c); size_t count = iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft); /* convert unicode BigEndian -> MachineEndian */ @@ -441,7 +443,7 @@ void prepare_charset() { FILE *f; - FT_ULong i; + unsigned i; f = fopen(encoding, "r"); // try to read custom encoding if (f==NULL) { @@ -453,6 +455,7 @@ cd = iconv_open(charmap, encoding); if (cd==(iconv_t)-1) ERROR("Unsupported encoding `%s', use iconv --list to list character sets known on your system.", encoding); + else printf("Successfully open iconv from %s to %s\n",encoding,charmap); charset_size = 256 - first_char; for (i = 0; i<charset_size; ++i) { Modified: distrib/mplayerxp.spec =================================================================== --- distrib/mplayerxp.spec 2010-01-24 18:56:10 UTC (rev 125) +++ distrib/mplayerxp.spec 2010-01-25 17:01:27 UTC (rev 126) @@ -1,8 +1,18 @@ ######################################################################################################## # This is a .spec file for building mplayerxp.rpm packages. -# Usage: rpm -bb mplayerxp.spec +# +# Usage: +# rpmbuild -bb --target i686-linux mplayerxp.spec +# or: +# rpmbuild -bb --target x86_64-linux mplayerxp.spec +# +# For fast linkage: +# rpmbuild -bb --target CPU-linux --short-circuit mplayerxp.spec +# +# For testing package.rpm: +# rpm -qp --queryformat "%{arch}\n" mplayerxp-*.rpm +# rpm -qp --queryformat "%{os}\n" mplayerxp-*.rpm ######################################################################################################## -%define x86_64 0 %define name mplayerxp %define version 0.7.95 %define release 1 @@ -13,9 +23,9 @@ Name: %{name} Version: %{version} -Release: %{release} +Release: %{release}_%_target_os Prefix: %{prefix} -Summary: Media Player for *nix systems with eXtra Performance. +Summary: Media Player for *nix systems with eXtra Performance License: GPL Group: Applications/Multimedia Packager: Nickols_K <nic...@ma...> @@ -30,20 +40,23 @@ core. The new core provides better CPU utilization and excellently improves performance of video decoding. Main goal of this project is to achieve smoothness of video playback due monotonous CPU loading. -%if %{x86_64} +%if %_target_cpu==x86_64 %define bitness 64 %define lib lib64 %define gcc "gcc -m64" -%define host x86_64-unknown-linux-gnu +%define host "x86_64-unknown-linux-gnu" %define ld_library_path "$LD_LIBRARY_PATH:usr/%{lib}:/usr/%{lib}/xorg" %define pkg_config_path "$PKG_CONFIG_PATH:$PKG64_CONFIG_PATH:/usr/local/%{lib}" -%else +%elseif %_target_cpu==i686 %define bitness 32 %define lib lib %define gcc "gcc -m32" -%define host i686-unknown-linux-gnu +%define host "i686-unknown-linux-gnu" %define ld_library_path "$LD_LIBRARY_PATH:usr/%{lib}:/usr/%{lib}/xorg" %define pkg_config_path "$PKG_CONFIG_PATH:$PKG32_CONFIG_PATH:/usr/local/%{lib}" +%else +# generic or unknown arch-os +%define gcc "gcc" %endif %prep Modified: mplayerxp/configure =================================================================== --- mplayerxp/configure 2010-01-24 18:56:10 UTC (rev 125) +++ mplayerxp/configure 2010-01-25 17:01:27 UTC (rev 126) @@ -626,12 +626,11 @@ x86_32 || disable vesa _vesa=$vesa enabled vesa && require3 vesa "asm/vm86.h string.h" VIF_MASK memset -print_config HAVE_ mp_config.h mp_config.mak vesa - -disabled vesa && vesa=$_vesa +if disabled vesa ; then +vesa=$_vesa enabled vesa && require3 vesa "asm/vm86.h string.h" X86_EFLAGS_VIF memset +fi print_config HAVE_ mp_config.h mp_config.mak vesa - enabled vesa && vomodules="vesa $vomodules" || novomodules="vesa $novomodules" ################# This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |