mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
40 lines
1.7 KiB
Diff
40 lines
1.7 KiB
Diff
# Undefined symbols: "_hs_GLUT_getProcAddress", referenced from: _hugsprim_hs_GLUT_getProcAddress_0 in ccZecAVF.o
|
|
# Fix from: https://mail.haskell.org/pipermail/haskell-cafe/2007-September.txt
|
|
|
|
--- packages/GLUT/Graphics/UI/GLUT/Extensions.hs.orig 2006-09-21 04:15:16.000000000 +0545
|
|
+++ packages/GLUT/Graphics/UI/GLUT/Extensions.hs 2022-08-08 00:43:36.000000000 +0545
|
|
@@ -42,5 +42,5 @@
|
|
getProcAddressInternal :: String -> IO (FunPtr a)
|
|
getProcAddressInternal call = withCString call hs_GLUT_getProcAddress
|
|
|
|
-foreign import CALLCONV unsafe "hs_GLUT_getProcAddress" hs_GLUT_getProcAddress
|
|
+foreign import CALLCONV unsafe "glutGetProcAddress" hs_GLUT_getProcAddress
|
|
:: CString -> IO (FunPtr a)
|
|
|
|
|
|
--- packages/GLUT/cbits/HsGLUT.c.orig 2006-09-21 04:15:16.000000000 +0545
|
|
+++ packages/GLUT/cbits/HsGLUT.c 2022-08-08 00:46:25.000000000 +0545
|
|
@@ -43,22 +43,3 @@
|
|
}
|
|
return (void*)0;
|
|
}
|
|
-
|
|
-/* procName is really a const char*, but currently we can't specify this in
|
|
- Haskell's FFI and consequently get a warning from the C compiler. */
|
|
-void*
|
|
-hs_GLUT_getProcAddress(char *procName)
|
|
-{
|
|
-#if (FREEGLUT || GLUT_API_VERSION >= 5)
|
|
-#if GLUT_GET_PROC_ADDRESS_IS_BROKEN
|
|
- /* There are a few typos/omissions in freeglut 2.20 */
|
|
- if (strcmp(procName, "glutWireCylinder" ) == 0) return (void*)glutWireCylinder;
|
|
- if (strcmp(procName, "glutSolidCylinder" ) == 0) return (void*)glutSolidCylinder;
|
|
- if (strcmp(procName, "glutWireSierpinskiSponge" ) == 0) return (void*)glutWireSierpinskiSponge;
|
|
- if (strcmp(procName, "glutSolidSierpinskiSponge") == 0) return (void*)glutSolidSierpinskiSponge;
|
|
-#endif
|
|
- return glutGetProcAddress(procName);
|
|
-#else
|
|
- return (void*)0;
|
|
-#endif
|
|
-}
|