commit
ead9e5ae69
@ -0,0 +1,16 @@
|
||||
This file is part of MXE.
|
||||
See index.html for further information.
|
||||
|
||||
Only advertise -lz for static builds.
|
||||
|
||||
--- a/libzip.pc.in 2012-03-15 10:28:05.000000000 +0100
|
||||
+++ b/libzip.pc.in 2012-12-18 22:48:27.807773881 +0100
|
||||
@@ -9,6 +9,7 @@
|
||||
Name: libzip
|
||||
Description: library for handling zip archives
|
||||
Version: @VERSION@
|
||||
-Libs: -L${libdir} -lzip @LIBS@
|
||||
+Libs: -L${libdir} -lzip
|
||||
Cflags: -I${includedir} -I${libincludedir}
|
||||
+Requires.private: zlib
|
||||
|
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* This file is part of MXE.
|
||||
* See index.html for further information.
|
||||
*/
|
||||
|
||||
#include <zip.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Adapted from freedink/src/SDL_rwops_libzip.c */
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
struct zip* zarchive;
|
||||
int errorp = 0;
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
zarchive = zip_open("idontexist.zip", ZIP_CHECKCONS, &errorp);
|
||||
if (errorp != 0)
|
||||
{
|
||||
char *errorbuf = NULL;
|
||||
int len = 1;
|
||||
errorbuf = malloc(len);
|
||||
len = zip_error_to_str(errorbuf, len, errorp, errno);
|
||||
errorbuf = realloc(errorbuf, len + 1);
|
||||
len = zip_error_to_str(errorbuf, len, errorp, errno);
|
||||
fprintf(stderr, "zip_open: %s\n", errorbuf);
|
||||
free(errorbuf);
|
||||
}
|
||||
else
|
||||
{
|
||||
struct zip_file* zfile;
|
||||
zfile = zip_fopen(zarchive, "fichier.txt", 0);
|
||||
if (zfile == NULL)
|
||||
{
|
||||
fprintf(stderr, "zip_open: %s\n", zip_strerror(zarchive));
|
||||
zip_close(zarchive);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
# This file is part of MXE.
|
||||
# See index.html for further information.
|
||||
|
||||
PKG := libzip
|
||||
$(PKG)_IGNORE :=
|
||||
$(PKG)_CHECKSUM := 04be811a1919e1063a1f5210671181b7b5416d45
|
||||
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
|
||||
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2
|
||||
$(PKG)_URL := http://www.nih.at/libzip/$($(PKG)_FILE)
|
||||
$(PKG)_DEPS := gcc zlib
|
||||
|
||||
define $(PKG)_UPDATE
|
||||
wget -q -O- 'http://www.nih.at/libzip/' | \
|
||||
$(SED) -n 's,.*libzip-\([0-9][^>]*\)\.tar.*,\1,p' | \
|
||||
head -1
|
||||
endef
|
||||
|
||||
define $(PKG)_BUILD
|
||||
cd '$(1)' && ./configure \
|
||||
--host='$(TARGET)' \
|
||||
--prefix='$(PREFIX)/$(TARGET)' \
|
||||
--disable-shared
|
||||
$(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
|
||||
|
||||
'$(TARGET)-gcc' \
|
||||
-W -Wall -Werror -ansi -pedantic \
|
||||
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libzip.exe' \
|
||||
`'$(TARGET)-pkg-config' libzip --cflags --libs`
|
||||
endef
|
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* This file is part of MXE.
|
||||
* See index.html for further information.
|
||||
*/
|
||||
|
||||
#include <SDL.h>
|
||||
#include "SDL_rotozoom.h"
|
||||
#include "SDL_framerate.h"
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
FPSmanager framerate_manager;
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
if (SDL_Init(SDL_INIT_EVERYTHING) < 0) return 1;
|
||||
|
||||
SDL_initFramerate(&framerate_manager);
|
||||
SDL_setFramerate(&framerate_manager, 60);
|
||||
SDL_framerateDelay(&framerate_manager);
|
||||
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
# This file is part of MXE.
|
||||
# See index.html for further information.
|
||||
|
||||
PKG := sdl_gfx
|
||||
$(PKG)_IGNORE :=
|
||||
$(PKG)_CHECKSUM := 34e8963188e4845557468a496066a8fa60d5f563
|
||||
$(PKG)_SUBDIR := SDL_gfx-$($(PKG)_VERSION)
|
||||
$(PKG)_FILE := SDL_gfx-$($(PKG)_VERSION).tar.gz
|
||||
$(PKG)_URL := http://www.ferzkopp.net/Software/SDL_gfx-2.0/$($(PKG)_FILE)
|
||||
$(PKG)_DEPS := gcc sdl
|
||||
|
||||
define $(PKG)_UPDATE
|
||||
# thanks debian/watch for the inspiration!
|
||||
wget -q -O- 'http://www.ferzkopp.net/joomla/content/view/19/14/' | \
|
||||
$(SED) -n 's,.*/joomla/\.\./Software/SDL_gfx\-2\.0/SDL_gfx-\([0-9][^"]*\)\.tar.*,\1,p'
|
||||
head -1
|
||||
endef
|
||||
|
||||
define $(PKG)_BUILD
|
||||
cd '$(1)' && ./configure \
|
||||
--host='$(TARGET)' \
|
||||
--disable-shared \
|
||||
--prefix='$(PREFIX)/$(TARGET)' \
|
||||
--with-sdl-prefix='$(PREFIX)/$(TARGET)'
|
||||
$(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
|
||||
|
||||
'$(TARGET)-gcc' \
|
||||
-W -Wall -Werror -ansi -pedantic \
|
||||
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl_gfx.exe' \
|
||||
`'$(TARGET)-pkg-config' SDL_gfx --cflags --libs`
|
||||
endef
|
Loading…
Reference in new issue