Skip to content

Instantly share code, notes, and snippets.

View miniupnp's full-sized avatar
💭
coding

Thomas BERNARD miniupnp

💭
coding
View GitHub Profile
@miniupnp
miniupnp / SDL2-2.0.4_OSX_105.patch
Last active September 30, 2022 02:33
SDL2 patches for OS X 10.5.8
Only in SDL2-2.0.4: Makefile
Only in SDL2-2.0.4: Makefile.rules
Only in SDL2-2.0.4: build
Only in SDL2-2.0.4: config.log
Only in SDL2-2.0.4: config.status
diff -ru SDL2-2.0.4-orig/include/SDL_config.h SDL2-2.0.4/include/SDL_config.h
--- SDL2-2.0.4-orig/include/SDL_config.h 2016-01-02 20:56:31.000000000 +0100
+++ SDL2-2.0.4/include/SDL_config.h 2018-05-15 15:32:56.000000000 +0200
@@ -1,3 +1,4 @@
+/* include/SDL_config.h. Generated from SDL_config.h.in by configure. */
@miniupnp
miniupnp / spectre.c
Last active September 1, 2018 05:11 — forked from jedisct1/spectre.c
Spectre example code - x86 / x86_64 and PowerPC
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#if defined(__POWERPC__)
#include <ppc_intrinsics.h>
#else
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
@miniupnp
miniupnp / torsocks2.1.0_strndup.patch
Created May 29, 2017 12:23
patch for compiling torsocks under OS X 10.5.8
diff --git a/configure.ac b/configure.ac
index 7e442f7..80ad9a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,6 +55,9 @@ AC_CHECK_FUNCS(strcspn strdup strerror strcasecmp strncasecmp mmap munmap \
[AC_MSG_ERROR("Required function not found")]
)
+dnl Check for strndup
+AC_CHECK_FUNC(strndup, AC_DEFINE([HAVE_STRNDUP],[],[Description]), [])
@miniupnp
miniupnp / 01.configure
Created June 16, 2016 09:36
failing to build sdl2_image on G4/10.5
Thu Jun 16 10:20:56 +0200 2016
./configure
--disable-dependency-tracking
--prefix=/usr/local/Cellar/sdl2_image/2.0.0_1
--enable-imageio=no
checking build system type... powerpc-apple-darwin9.8.0
checking host system type... powerpc-apple-darwin9.8.0
checking for gcc... gcc-4.2
@miniupnp
miniupnp / icd_bootsectorz.s
Last active April 19, 2016 08:52
ICD boot sectors
icd_bootsectorz.img: file format binary
; d7 = acsi_id << 5 ??
Disassembly of section .data:
00000000 <.data>:
0: 2f0b movel %a3,%sp@-
2: 2f3c 000b ffff movel #786431,%sp@- ; BIOS 0x0b = Kbshift(0xffff)
@miniupnp
miniupnp / upnp-router-control-igd2.patch
Created December 18, 2015 10:07
upnp-router-control patch for supporting IGD v2
=== modified file 'src/urc-upnp.c'
--- src/urc-upnp.c 2013-06-02 12:33:23 +0000
+++ src/urc-upnp.c 2015-12-18 10:01:03 +0000
@@ -19,6 +19,7 @@
#include "config.h"
+#include <string.h>
#include <glib.h>
#include <libgupnp/gupnp.h>
@miniupnp
miniupnp / SDL2-2.0.3_OSX_104.patch
Created October 29, 2015 18:54
SDL2-2.0.3_OSX_104.patch
Only in SDL2-2.0.3: Makefile
Only in SDL2-2.0.3: Makefile.rules
Only in SDL2-2.0.3: build
Only in SDL2-2.0.3: config.log
Only in SDL2-2.0.3: config.status
diff -ru SDL2-2.0.3-orig/include/SDL_config.h SDL2-2.0.3/include/SDL_config.h
--- SDL2-2.0.3-orig/include/SDL_config.h 2014-03-16 03:31:42.000000000 +0100
+++ SDL2-2.0.3/include/SDL_config.h 2015-10-29 00:17:23.000000000 +0100
@@ -1,3 +1,4 @@
+/* include/SDL_config.h. Generated from SDL_config.h.in by configure. */
@miniupnp
miniupnp / SDL2-2.0.3_OSX_105.patch
Created October 28, 2015 15:58
patch to compile SDL2 on Mac OS X 10.5 Leopard
Only in SDL2-2.0.3: Makefile
Only in SDL2-2.0.3: Makefile.rules
Only in SDL2-2.0.3: build
Only in SDL2-2.0.3: config.log
Only in SDL2-2.0.3: config.status
diff -ru SDL2-2.0.3-orig/include/SDL_config.h SDL2-2.0.3/include/SDL_config.h
--- SDL2-2.0.3-orig/include/SDL_config.h 2014-03-16 03:31:42.000000000 +0100
+++ SDL2-2.0.3/include/SDL_config.h 2015-10-28 16:11:01.000000000 +0100
@@ -1,3 +1,4 @@
+/* include/SDL_config.h. Generated from SDL_config.h.in by configure. */
@miniupnp
miniupnp / 02.make
Last active October 23, 2015 19:36
Fri Oct 23 20:56:30 +0200 2015
make
install
Warning, configure.in is out of date
#(cd /private/tmp/sdl220151023-26912-1xnjvtd/SDL2-2.0.3 && sh autogen.sh && sh configure)
/bin/sh build-scripts/mkinstalldirs build
mkdir -p -- build
/bin/sh build-scripts/updaterev.sh
power-mac-g4-de-thomas-bernard:~ nanard$ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/mistydemeo/tigerbrew.git
HEAD: 1e626a0bf635b945aecd74794790edf35d2ef59c
Last commit: 7 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://ia902307.us.archive.org/31/items/tigerbrew
CPU: single-core 32-bit g4e