Skip to content

Commit

Permalink
libcaca: remove need for compiler blacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
evanmiller authored and mascguy committed Nov 7, 2021
1 parent d17ec0f commit d8cc25e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 28 deletions.
16 changes: 1 addition & 15 deletions graphics/libcaca/Portfile
Expand Up @@ -2,7 +2,6 @@

PortSystem 1.0
PortGroup github 1.0
PortGroup compiler_blacklist_versions 1.0

name libcaca
categories graphics
Expand Down Expand Up @@ -55,26 +54,13 @@ depends_build port:pkgconfig
depends_lib port:ncurses port:zlib

# temporary patch to fix use of implcitily declared function

patchfiles-append patch-fix-implicit-function.diff
patch.pre_args -p1
patchfiles-append patch-libcaca-common-image.diff

use_autoconf yes
# these dependencies are removed by use_autoconf, so add them after
depends_build-append port:libtool port:autoconf port:automake
autoconf.cmd ./bootstrap

# Fix link errors on 10.8 and 10.9:
# Undefined symbols for architecture x86_64:
# "__caca_alloc2d", referenced from:
# _load_image in img2txt-common-image.o
# Undefined symbols for architecture x86_64:
# "__caca_alloc2d", referenced from:
# _load_image in cacaview-common-image.o
# ld: symbol(s) not found for architecture x86_64
compiler.blacklist-append \
{clang < 900}

# require C++11 for CppUnit API
compiler.cxx_standard 2011
configure.cxxflags-append -std=gnu++11
Expand Down
13 changes: 0 additions & 13 deletions graphics/libcaca/files/patch-fix-implicit-function.diff

This file was deleted.

14 changes: 14 additions & 0 deletions graphics/libcaca/files/patch-libcaca-common-image.diff
@@ -0,0 +1,14 @@
_caca_alloc2d is an internal function and not exported to
the image viewer. It is basically a glorified call to malloc.

--- src/common-image.c.orig 2021-11-06 10:15:28.000000000 -0400
+++ src/common-image.c 2021-11-06 10:15:59.000000000 -0400
@@ -161,7 +161,7 @@
uint32_t depth = (bpp + 7) / 8;

/* Allocate the pixel buffer */
- im->pixels = _caca_alloc2d(im->w, im->h, depth);
+ im->pixels = malloc(im->w * im->h * depth);
if (!im->pixels)
{
caca_file_close(f);

0 comments on commit d8cc25e

Please sign in to comment.