Remove a bunch of unreferenced files

Plus a small number of obsolete packages (like old versions of qemu).
This commit is contained in:
Eelco Dolstra 2012-11-29 13:43:37 +01:00
parent f04aa4fb59
commit 5553546c21
113 changed files with 38 additions and 17584 deletions

View file

@ -1,37 +0,0 @@
{ stdenv, fetchgit, fetchgitrevision
, lib, cmake, qt4, qtscriptgenerator, perl, gettext, curl
, libxml2, mysql, taglib, taglib_extras, loudmouth , kdelibs, automoc4, phonon
, strigi, soprano, qca2, libmtp, liblastfm, libgpod, pkgconfig
, repository ? "git://git.kde.org/amarok"
, branch ? "heads/master"
, rev ? fetchgitrevision repository branch
, src ? fetchgit {
url = repository;
rev = rev;
}
}:
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "amarok";
version = "live";
inherit src;
QT_PLUGIN_PATH="${qtscriptgenerator}/lib/qt4/plugins";
buildInputs = [ cmake qt4 qtscriptgenerator perl stdenv.gcc.libc gettext curl
libxml2 mysql taglib taglib_extras loudmouth kdelibs automoc4 phonon strigi
soprano qca2 libmtp liblastfm libgpod pkgconfig ];
postInstall = ''
mkdir -p $out/nix-support
echo ${qtscriptgenerator} > $out/nix-support/propagated-user-env-packages
'';
meta = {
description = "Popular music player for KDE";
license = "GPL";
homepage = http://amarok.kde.org;
inherit (kdelibs.meta) maintainers;
};
}

View file

@ -1,18 +0,0 @@
args: with args;
stdenv.mkDerivation {
name = jedit.name+"_startscript";
java = jre+"/bin/java";
jeditjar = jedit+"/lib/jedit.jar";
phases = "buildPhase";
buildPhase = "
mkdir -p \$out/bin
cat > \$out/bin/${jedit.name} << EOF
#!/bin/sh
exec $java -jar $jeditjar \\$*
EOF
chmod +x \$out/bin/${jedit.name}
";
}

View file

@ -1,6 +1,6 @@
{stdenv, fetchurl, x11, motif, libXpm}:
assert stdenv.system == "i686-linux";
assert stdenv.isLinux;
stdenv.mkDerivation {
name = "nedit-5.5";
@ -15,7 +15,7 @@ stdenv.mkDerivation {
inherit motif;
buildInputs = [x11 motif libXpm];
buildFlags = if stdenv.system == "i686-linux" then "linux" else "";
buildFlags = if stdenv.isLinux then "linux" else "";
meta = {
homepage = http://www.nedit.org;

View file

@ -1,22 +0,0 @@
commit 5803d31ae7704e0349821dcc20a94a1cddda69f1
Author: Tim Harder <radhermit@gmail.com>
Date: Wed Sep 21 14:13:55 2011 -0700
Fix build with libpng-1.5
Explicitly include the zlib.h header for the Z_BEST_COMPRESSION and
Z_DEFAULT_STRATEGY macros since >=libpng-1.5 doesn't pull it in anymore
via the png.h header.
diff --git a/src/imageio/format/png.c b/src/imageio/format/png.c
index 40c7d48..c7be566 100644
--- a/src/imageio/format/png.c
+++ b/src/imageio/format/png.c
@@ -28,6 +28,7 @@
#include <stdio.h>
#include <png.h>
#include <inttypes.h>
+#include <zlib.h>
DT_MODULE(1)

View file

@ -1,10 +0,0 @@
source $stdenv/setup
patchPhase=patchPhase
patchPhase() {
sed -e "s@-ljpeg6b@-ljpeg@" -i configure
}
genericBuild
ln -sv $KDEDIR/share/mimelnk $out/share

View file

@ -1,83 +0,0 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 2.6)
+option (WITH_RAWZOR "Build with Rawzor support" ON)
+
add_subdirectory (rtexif)
add_subdirectory (rtengine)
add_subdirectory (rtgui)
--- a/rtengine/CMakeLists.txt
+++ b/rtengine/CMakeLists.txt
@@ -9,9 +9,13 @@
IF (WIN32)
SET (EXTRA_LIBDIR "${CMAKE_CURRENT_SOURCE_DIR}/../lib; ${CMAKE_CURRENT_SOURCE_DIR}/../rawzor_win")
SET (EXTRA_INCDIR "${CMAKE_CURRENT_SOURCE_DIR}/../winclude; ${CMAKE_CURRENT_SOURCE_DIR}/../rawzor_win")
- SET (EXTRA_LIB "ws2_32 ${CMAKE_CURRENT_SOURCE_DIR}/../lib/libiptcdata.a ${CMAKE_CURRENT_SOURCE_DIR}/../lib/libjpeg.a ${CMAKE_CURRENT_SOURCE_DIR}/../lib/libpng.a ${CMAKE_CURRENT_SOURCE_DIR}/../lib/libtiff.a ${CMAKE_CURRENT_SOURCE_DIR}/../lib/libz.a ${CMAKE_CURRENT_SOURCE_DIR}/../rawzor_win/rwz_sdk_s.a")
+ SET (EXTRA_LIB "ws2_32 ${CMAKE_CURRENT_SOURCE_DIR}/../lib/libiptcdata.a ${CMAKE_CURRENT_SOURCE_DIR}/../lib/libjpeg.a ${CMAKE_CURRENT_SOURCE_DIR}/../lib/libpng.a ${CMAKE_CURRENT_SOURCE_DIR}/../lib/libtiff.a ${CMAKE_CURRENT_SOURCE_DIR}/../lib/libz.a")
+ if (WITH_RAWZOR)
ADD_DEFINITIONS (-DRAWZOR_SUPPORT)
+ SET (EXTRA_LIB "${EXTRA_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/../rawzor_win/rwz_sdk_s.a")
+ endif (WITH_RAWZOR)
ELSE (WIN32)
+ if (WITH_RAWZOR)
IF (CMAKE_SIZEOF_VOID_P EQUAL 4)
SET (EXTRA_INCDIR "${CMAKE_CURRENT_SOURCE_DIR}/../rawzor_lin32")
SET (EXTRA_LIBDIR "${CMAKE_CURRENT_SOURCE_DIR}/../rawzor_lin32")
@@ -19,10 +23,11 @@
SET (EXTRA_INCDIR "${CMAKE_CURRENT_SOURCE_DIR}/../rawzor_lin64")
SET (EXTRA_LIBDIR "${CMAKE_CURRENT_SOURCE_DIR}/../rawzor_lin64")
ENDIF (CMAKE_SIZEOF_VOID_P EQUAL 4)
- pkg_check_modules (IPTCDATA REQUIRED libiptcdata)
- pkg_check_modules (LCMS REQUIRED lcms)
SET (EXTRA_LIB "-lrwz_sdk")
ADD_DEFINITIONS (-DRAWZOR_SUPPORT)
+ endif (WITH_RAWZOR)
+ pkg_check_modules (IPTCDATA REQUIRED libiptcdata)
+ pkg_check_modules (LCMS REQUIRED lcms)
ENDIF (WIN32)
include_directories (${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../rtexif ${EXTRA_INCDIR} ${GTHREAD_INCLUDE_DIRS} ${GOBJECT_INCLUDE_DIRS} ${GLIB2_INCLUDE_DIRS} ${GLIBMM_INCLUDE_DIRS} ${IPTCDATA_INCLUDE_DIRS} ${LCMS_INCLUDE_DIRS})
--- a/rtengine/imagedata.cc
+++ b/rtengine/imagedata.cc
@@ -19,7 +19,9 @@
#include <imagedata.h>
#include <iptcpairs.h>
#include <glib/gstdio.h>
+#ifdef RAWZOR_SUPPORT
#include <rwz_sdk.h>
+#endif
using namespace rtengine;
--- a/rtengine/myfile.cc
+++ b/rtengine/myfile.cc
@@ -19,7 +19,9 @@
#include <myfile.h>
#include <cstdarg>
#include <glibmm.h>
+#ifdef RAWZOR_SUPPORT
#include <rwz_sdk.h>
+#endif
IMFILE* fopen (const char* fname) {
--- a/rtgui/CMakeLists.txt
+++ b/rtgui/CMakeLists.txt
@@ -75,6 +75,7 @@
if (NOT ZLIB_LIBRARIES)
message(SEND_ERROR "libz was not found!")
endif (NOT ZLIB_LIBRARIES)
+ if (WITH_RAWZOR)
IF (CMAKE_SIZEOF_VOID_P EQUAL 4)
SET (EXTRA_INCDIR "${CMAKE_CURRENT_SOURCE_DIR}/../rawzor_lin32")
SET (EXTRA_LIBDIR "${CMAKE_CURRENT_SOURCE_DIR}/../rawzor_lin32")
@@ -82,6 +83,7 @@
SET (EXTRA_INCDIR "${CMAKE_CURRENT_SOURCE_DIR}/../rawzor_lin64")
SET (EXTRA_LIBDIR "${CMAKE_CURRENT_SOURCE_DIR}/../rawzor_lin64")
ENDIF (CMAKE_SIZEOF_VOID_P EQUAL 4)
+ endif (WITH_RAWZOR)
include_directories (/usr/local/lib ${CMAKE_CURRENT_SOURCE_DIR}/../rtengine . ${CMAKE_CURRENT_SOURCE_DIR}/../rtexif ${EXTRA_INCDIR} ${GLIB2_INCLUDE_DIRS} ${GLIBMM_INCLUDE_DIRS}
${GTK_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS} ${GIO_INCLUDE_DIRS} ${GIOMM_INCLUDE_DIRS} ${IPTCDATA_INCLUDE_DIRS} ${LCMS_INCLUDE_DIRS} ${GTHREAD_INCLUDE_DIRS} ${GOBJECT_INCLUDE_DIRS} )

View file

@ -1,11 +0,0 @@
--- old/sink.c (revision 5118)
+++ new/sink.c (revision 5119)
@@ -262,7 +262,7 @@
const char *md1 = "MAILER-DAEMON", *md2 = "MAILER-DAEMON@";
/* don't bounce in reply to undeliverable bounces */
- if (!msg->return_path[0] ||
+ if (!msg || !msg->return_path[0] ||
strcmp(msg->return_path, "<>") == 0 ||
strcasecmp(msg->return_path, md1) == 0 ||
strncasecmp(msg->return_path, md2, strlen(md2)) == 0)

View file

@ -1,10 +0,0 @@
--- krusader-2.0.0/krusader/VFS/kiojobwrapper.cpp~ 2009-04-29 17:13:43.000000000 +0000
+++ krusader-2.0.0/krusader/VFS/kiojobwrapper.cpp 2009-04-29 17:14:01.000000000 +0000
@@ -37,6 +37,7 @@
#include <kio/jobuidelegate.h>
#include <kio/job.h>
#include <qapplication.h>
+#include <cstdio>
#include <iostream>
#include <klocale.h>
#include "virtualcopyjob.h"

View file

@ -1,471 +0,0 @@
diff -cr xpdf-3.01.orig/goo/gmem.c xpdf-3.01/goo/gmem.c
*** xpdf-3.01.orig/goo/gmem.c Tue Aug 16 22:34:30 2005
--- xpdf-3.01/goo/gmem.c Tue Jan 17 17:03:57 2006
***************
*** 11,16 ****
--- 11,17 ----
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
+ #include <limits.h>
#include "gmem.h"
#ifdef DEBUG_MEM
***************
*** 63,69 ****
int lst;
unsigned long *trl, *p;
! if (size == 0)
return NULL;
size1 = gMemDataSize(size);
if (!(mem = (char *)malloc(size1 + gMemHdrSize + gMemTrlSize))) {
--- 64,70 ----
int lst;
unsigned long *trl, *p;
! if (size <= 0)
return NULL;
size1 = gMemDataSize(size);
if (!(mem = (char *)malloc(size1 + gMemHdrSize + gMemTrlSize))) {
***************
*** 86,92 ****
#else
void *p;
! if (size == 0)
return NULL;
if (!(p = malloc(size))) {
fprintf(stderr, "Out of memory\n");
--- 87,93 ----
#else
void *p;
! if (size <= 0)
return NULL;
if (!(p = malloc(size))) {
fprintf(stderr, "Out of memory\n");
***************
*** 102,108 ****
void *q;
int oldSize;
! if (size == 0) {
if (p)
gfree(p);
return NULL;
--- 103,109 ----
void *q;
int oldSize;
! if (size <= 0) {
if (p)
gfree(p);
return NULL;
***************
*** 120,126 ****
#else
void *q;
! if (size == 0) {
if (p)
free(p);
return NULL;
--- 121,127 ----
#else
void *q;
! if (size <= 0) {
if (p)
free(p);
return NULL;
***************
*** 140,147 ****
void *gmallocn(int nObjs, int objSize) {
int n;
n = nObjs * objSize;
! if (objSize == 0 || n / objSize != nObjs) {
fprintf(stderr, "Bogus memory allocation size\n");
exit(1);
}
--- 141,151 ----
void *gmallocn(int nObjs, int objSize) {
int n;
+ if (nObjs == 0) {
+ return NULL;
+ }
n = nObjs * objSize;
! if (objSize <= 0 || nObjs < 0 || nObjs >= INT_MAX / objSize) {
fprintf(stderr, "Bogus memory allocation size\n");
exit(1);
}
***************
*** 151,158 ****
void *greallocn(void *p, int nObjs, int objSize) {
int n;
n = nObjs * objSize;
! if (objSize == 0 || n / objSize != nObjs) {
fprintf(stderr, "Bogus memory allocation size\n");
exit(1);
}
--- 155,168 ----
void *greallocn(void *p, int nObjs, int objSize) {
int n;
+ if (nObjs == 0) {
+ if (p) {
+ gfree(p);
+ }
+ return NULL;
+ }
n = nObjs * objSize;
! if (objSize <= 0 || nObjs < 0 || nObjs >= INT_MAX / objSize) {
fprintf(stderr, "Bogus memory allocation size\n");
exit(1);
}
diff -cr xpdf-3.01.orig/xpdf/JBIG2Stream.cc xpdf-3.01/xpdf/JBIG2Stream.cc
*** xpdf-3.01.orig/xpdf/JBIG2Stream.cc Tue Aug 16 22:34:31 2005
--- xpdf-3.01/xpdf/JBIG2Stream.cc Tue Jan 17 17:29:46 2006
***************
*** 13,18 ****
--- 13,19 ----
#endif
#include <stdlib.h>
+ #include <limits.h>
#include "GList.h"
#include "Error.h"
#include "JArithmeticDecoder.h"
***************
*** 681,686 ****
--- 682,691 ----
w = wA;
h = hA;
line = (wA + 7) >> 3;
+ if (w <= 0 || h <= 0 || line <= 0 || h >= (INT_MAX - 1) / line) {
+ data = NULL;
+ return;
+ }
// need to allocate one extra guard byte for use in combine()
data = (Guchar *)gmalloc(h * line + 1);
data[h * line] = 0;
***************
*** 692,697 ****
--- 697,706 ----
w = bitmap->w;
h = bitmap->h;
line = bitmap->line;
+ if (w <= 0 || h <= 0 || line <= 0 || h >= (INT_MAX - 1) / line) {
+ data = NULL;
+ return;
+ }
// need to allocate one extra guard byte for use in combine()
data = (Guchar *)gmalloc(h * line + 1);
memcpy(data, bitmap->data, h * line);
***************
*** 720,726 ****
}
void JBIG2Bitmap::expand(int newH, Guint pixel) {
! if (newH <= h) {
return;
}
// need to allocate one extra guard byte for use in combine()
--- 729,735 ----
}
void JBIG2Bitmap::expand(int newH, Guint pixel) {
! if (newH <= h || line <= 0 || newH >= (INT_MAX - 1) / line) {
return;
}
// need to allocate one extra guard byte for use in combine()
***************
*** 2294,2299 ****
--- 2303,2316 ----
!readUWord(&stepX) || !readUWord(&stepY)) {
goto eofError;
}
+ if (w == 0 || h == 0 || w >= INT_MAX / h) {
+ error(getPos(), "Bad bitmap size in JBIG2 halftone segment");
+ return;
+ }
+ if (gridH == 0 || gridW >= INT_MAX / gridH) {
+ error(getPos(), "Bad grid size in JBIG2 halftone segment");
+ return;
+ }
// get pattern dictionary
if (nRefSegs != 1) {
diff -cr xpdf-3.01.orig/xpdf/JPXStream.cc xpdf-3.01/xpdf/JPXStream.cc
*** xpdf-3.01.orig/xpdf/JPXStream.cc Tue Aug 16 22:34:31 2005
--- xpdf-3.01/xpdf/JPXStream.cc Tue Jan 17 17:14:06 2006
***************
*** 12,17 ****
--- 12,18 ----
#pragma implementation
#endif
+ #include <limits.h>
#include "gmem.h"
#include "Error.h"
#include "JArithmeticDecoder.h"
***************
*** 818,823 ****
--- 819,830 ----
/ img.xTileSize;
img.nYTiles = (img.ySize - img.yTileOffset + img.yTileSize - 1)
/ img.yTileSize;
+ // check for overflow before allocating memory
+ if (img.nXTiles <= 0 || img.nYTiles <= 0 ||
+ img.nXTiles >= INT_MAX / img.nYTiles) {
+ error(getPos(), "Bad tile count in JPX SIZ marker segment");
+ return gFalse;
+ }
img.tiles = (JPXTile *)gmallocn(img.nXTiles * img.nYTiles,
sizeof(JPXTile));
for (i = 0; i < img.nXTiles * img.nYTiles; ++i) {
diff -cr xpdf-3.01.orig/xpdf/Stream.cc xpdf-3.01/xpdf/Stream.cc
*** xpdf-3.01.orig/xpdf/Stream.cc Tue Aug 16 22:34:31 2005
--- xpdf-3.01/xpdf/Stream.cc Tue Jan 17 17:31:52 2006
***************
*** 15,20 ****
--- 15,21 ----
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
+ #include <limits.h>
#ifndef WIN32
#include <unistd.h>
#endif
***************
*** 406,418 ****
--- 407,432 ----
width = widthA;
nComps = nCompsA;
nBits = nBitsA;
+ predLine = NULL;
+ ok = gFalse;
nVals = width * nComps;
+ if (width <= 0 || nComps <= 0 || nBits <= 0 ||
+ nComps >= INT_MAX / nBits ||
+ width >= INT_MAX / nComps / nBits ||
+ nVals * nBits + 7 < 0) {
+ return;
+ }
pixBytes = (nComps * nBits + 7) >> 3;
rowBytes = ((nVals * nBits + 7) >> 3) + pixBytes;
+ if (rowBytes <= 0) {
+ return;
+ }
predLine = (Guchar *)gmalloc(rowBytes);
memset(predLine, 0, rowBytes);
predIdx = rowBytes;
+
+ ok = gTrue;
}
StreamPredictor::~StreamPredictor() {
***************
*** 1004,1009 ****
--- 1018,1027 ----
FilterStream(strA) {
if (predictor != 1) {
pred = new StreamPredictor(this, predictor, columns, colors, bits);
+ if (!pred->isOk()) {
+ delete pred;
+ pred = NULL;
+ }
} else {
pred = NULL;
}
***************
*** 1259,1264 ****
--- 1277,1285 ----
if (columns < 1) {
columns = 1;
}
+ if (columns + 4 <= 0) {
+ columns = INT_MAX - 4;
+ }
rows = rowsA;
endOfBlock = endOfBlockA;
black = blackA;
***************
*** 2899,2904 ****
--- 2920,2930 ----
height = read16();
width = read16();
numComps = str->getChar();
+ if (numComps <= 0 || numComps > 4) {
+ error(getPos(), "Bad number of components in DCT stream");
+ numComps = 0;
+ return gFalse;
+ }
if (prec != 8) {
error(getPos(), "Bad DCT precision %d", prec);
return gFalse;
***************
*** 2925,2930 ****
--- 2951,2961 ----
height = read16();
width = read16();
numComps = str->getChar();
+ if (numComps <= 0 || numComps > 4) {
+ error(getPos(), "Bad number of components in DCT stream");
+ numComps = 0;
+ return gFalse;
+ }
if (prec != 8) {
error(getPos(), "Bad DCT precision %d", prec);
return gFalse;
***************
*** 2947,2952 ****
--- 2978,2988 ----
length = read16() - 2;
scanInfo.numComps = str->getChar();
+ if (scanInfo.numComps <= 0 || scanInfo.numComps > 4) {
+ error(getPos(), "Bad number of components in DCT stream");
+ scanInfo.numComps = 0;
+ return gFalse;
+ }
--length;
if (length != 2 * scanInfo.numComps + 3) {
error(getPos(), "Bad DCT scan info block");
***************
*** 3041,3046 ****
--- 3077,3083 ----
numACHuffTables = index+1;
tbl = &acHuffTables[index];
} else {
+ index &= 0x0f;
if (index >= numDCHuffTables)
numDCHuffTables = index+1;
tbl = &dcHuffTables[index];
***************
*** 3827,3832 ****
--- 3864,3873 ----
FilterStream(strA) {
if (predictor != 1) {
pred = new StreamPredictor(this, predictor, columns, colors, bits);
+ if (!pred->isOk()) {
+ delete pred;
+ pred = NULL;
+ }
} else {
pred = NULL;
}
diff -cr xpdf-3.01.orig/xpdf/Stream.h xpdf-3.01/xpdf/Stream.h
*** xpdf-3.01.orig/xpdf/Stream.h Tue Aug 16 22:34:31 2005
--- xpdf-3.01/xpdf/Stream.h Tue Jan 17 17:19:54 2006
***************
*** 232,237 ****
--- 232,239 ----
~StreamPredictor();
+ GBool isOk() { return ok; }
+
int lookChar();
int getChar();
***************
*** 249,254 ****
--- 251,257 ----
int rowBytes; // bytes per line
Guchar *predLine; // line buffer
int predIdx; // current index in predLine
+ GBool ok;
};
//------------------------------------------------------------------------
***************
*** 527,533 ****
short getWhiteCode();
short getBlackCode();
short lookBits(int n);
! void eatBits(int n) { inputBits -= n; }
};
//------------------------------------------------------------------------
--- 530,536 ----
short getWhiteCode();
short getBlackCode();
short lookBits(int n);
! void eatBits(int n) { if ((inputBits -= n) < 0) inputBits = 0; }
};
//------------------------------------------------------------------------
diff -cr xpdf-3.01.orig/splash/SplashXPathScanner.cc xpdf-3.01/splash/SplashXPathScanner.cc
*** xpdf-3.01.orig/splash/SplashXPathScanner.cc Tue Aug 16 22:34:31 2005
--- xpdf-3.01/splash/SplashXPathScanner.cc Wed Feb 1 17:01:14 2006
***************
*** 186,192 ****
}
void SplashXPathScanner::computeIntersections(int y) {
! SplashCoord ySegMin, ySegMax, xx0, xx1;
SplashXPathSeg *seg;
int i, j;
--- 186,192 ----
}
void SplashXPathScanner::computeIntersections(int y) {
! SplashCoord xSegMin, xSegMax, ySegMin, ySegMax, xx0, xx1;
SplashXPathSeg *seg;
int i, j;
***************
*** 236,254 ****
} else if (seg->flags & splashXPathVert) {
xx0 = xx1 = seg->x0;
} else {
! if (ySegMin <= y) {
! // intersection with top edge
! xx0 = seg->x0 + ((SplashCoord)y - seg->y0) * seg->dxdy;
} else {
! // x coord of segment endpoint with min y coord
! xx0 = (seg->flags & splashXPathFlip) ? seg->x1 : seg->x0;
}
! if (ySegMax >= y + 1) {
! // intersection with bottom edge
! xx1 = seg->x0 + ((SplashCoord)y + 1 - seg->y0) * seg->dxdy;
! } else {
! // x coord of segment endpoint with max y coord
! xx1 = (seg->flags & splashXPathFlip) ? seg->x0 : seg->x1;
}
}
if (xx0 < xx1) {
--- 236,262 ----
} else if (seg->flags & splashXPathVert) {
xx0 = xx1 = seg->x0;
} else {
! if (seg->x0 < seg->x1) {
! xSegMin = seg->x0;
! xSegMax = seg->x1;
} else {
! xSegMin = seg->x1;
! xSegMax = seg->x0;
}
! // intersection with top edge
! xx0 = seg->x0 + ((SplashCoord)y - seg->y0) * seg->dxdy;
! // intersection with bottom edge
! xx1 = seg->x0 + ((SplashCoord)y + 1 - seg->y0) * seg->dxdy;
! // the segment may not actually extend to the top and/or bottom edges
! if (xx0 < xSegMin) {
! xx0 = xSegMin;
! } else if (xx0 > xSegMax) {
! xx0 = xSegMax;
! }
! if (xx1 < xSegMin) {
! xx1 = xSegMin;
! } else if (xx1 > xSegMax) {
! xx1 = xSegMax;
}
}
if (xx0 < xx1) {

View file

@ -1,13 +0,0 @@
[
{name="ktp-accounts-kcm";key="accounts_kcm";sha256="1lkqiwibxabg5p3k8l0zyzjyysi56dvbbcxp1sybd81hmxf6fzxh";}
{name="ktp-approver";key="approver";sha256="0bw3i8av55n93ac6phvar03b6rz34wbqrzx7l2vd48d0y5ib0j6m";}
{name="ktp-auth-handler";key="auth_handler";sha256="0kby9935df474b7jvzzg7v3zvrgml5caf96ps4dcrcvyz91ckd1y";}
{name="ktp-common-internals";key="common_internals";sha256="1g22b0g9g14dsdl0qkdglgkf26c3pjc96q19kj2kai1i644i8k5h";}
{name="ktp-contact-applet";key="contact_applet";sha256="0iwr202snsm72xjxv1jb9z24j8ikdx6ljaz5v9i0ha8f8rb1vrp5";}
{name="ktp-contact-list";key="contact_list";sha256="06y1cw2kkn6ig5qnmzl7bdz9nghpv2c83c9vf9glgbxf77qfg3ms";}
{name="ktp-filetransfer-handler";key="filetransfer_handler";sha256="1cdnl4sn34lmm7h7qv8rrkp7ia5gcg2704fqhvpv8n8gxwwhrc1a";}
{name="ktp-kded-integration-module";key="kded_integration_module";sha256="1ccihqk0pg28v2q6p9dx37ql7hnwdz2060jf1s6p9yyd27fc4is0";}
{name="ktp-presence-applet";key="presence_applet";sha256="0zgl8z81kmy2a03kzgvvqlr244cw9gw2kfrph1d6ax8zk4fqvxnz";}
{name="ktp-send-file";key="send_file";sha256="1d1j0klp8dvmldn5c19zqfsxcm5hbaq5fxikpjg0q3j9ib8yh9la";}
{name="ktp-text-ui";key="text_ui";sha256="0qikjh8ywlnwkfr4nd4hc9b15b824simhdj3n62yd87pmkk3avw6";}
]

View file

@ -1,41 +0,0 @@
diff --git a/gnucash.cc b/gnucash.cc
index 7d31526..c4edd77 100644
--- a/gnucash.cc
+++ b/gnucash.cc
@@ -201,7 +201,7 @@ static amount_t convert_number(const std::string& number,
{
const char * num = number.c_str();
- if (char * p = std::strchr(num, '/')) {
+ if (const char * p = std::strchr(num, '/')) {
std::string numer_str(num, p - num);
std::string denom_str(p + 1);
diff --git a/option.cc b/option.cc
index 10c23a7..8f2fead 100644
--- a/option.cc
+++ b/option.cc
@@ -892,7 +892,7 @@ OPT_BEGIN(market, "V") {
namespace {
void parse_price_setting(const char * optarg)
{
- char * equals = std::strchr(optarg, '=');
+ const char * equals = std::strchr(optarg, '=');
if (! equals)
return;
diff --git a/textual.cc b/textual.cc
index 2033106..d897368 100644
--- a/textual.cc
+++ b/textual.cc
@@ -298,8 +298,8 @@ transaction_t * parse_transaction(char * line, account_t * account,
DEBUG_PRINT("ledger.textual.parse", "line " << linenum << ": " <<
"Parsed a note '" << xact->note << "'");
- if (char * b = std::strchr(xact->note.c_str(), '['))
- if (char * e = std::strchr(xact->note.c_str(), ']')) {
+ if (const char * b = std::strchr(xact->note.c_str(), '['))
+ if (const char * e = std::strchr(xact->note.c_str(), ']')) {
char buf[256];
std::strncpy(buf, b + 1, e - b - 1);
buf[e - b - 1] = '\0';

View file

@ -1,23 +0,0 @@
{stdenv, fetchurl, liblapack}:
stdenv.mkDerivation {
name = "slr-1.4.2";
src = fetchurl {
url = http://www.ebi.ac.uk/goldman-srv/SLR/download/v1.4.2/slr_source.tgz;
sha256 = "03ak7jsz89zism6gx8fr1dwlwjgcmnrr9m6xgqpr0xzikxid02jp";
};
buildInputs = [ liblapack ];
preConfigure = "mkdir bin; cd src";
makeFlags = "-f Makefile.linux";
meta = {
description = "Phylogenetic Analysis by Maximum Likelihood (PAML)";
longDescription = ''
SLR is a program to detect sites in coding DNA that are unusually conserved and/or unusually variable (that is, evolving under purify or positive selection) by analysing the pattern of changes for an alignment of sequences on an evolutionary tree.
'';
license = "GPL3";
homepage = http://www.ebi.ac.uk/goldman/SLR/;
};
}

View file

@ -1,19 +0,0 @@
diff --git a/darcs-2.0.0/tools/darcs_completion b/darcs-2.0.0/tools/darcs_completion
index 10628db..e36476e 100644
--- a/tools/darcs_completion
+++ b/tools/darcs_completion
@@ -3,7 +3,6 @@
# darcs command line completion.
# Copyright 2002 "David Roundy" <droundy@abridgegame.org>
#
-have darcs &&
_darcs()
{
local cur
@@ -48,5 +47,5 @@ _darcs()
return 0
}
-[ "$have" ] && complete -F _darcs -o default darcs
+complete -F _darcs -o default darcs

View file

@ -1,28 +0,0 @@
make sure `gitman.info' isn't produced since it's broken (duplicate
node names).
diff --git a/Documentation/Makefile b/Documentation/Makefile
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -84,7 +84,7 @@ man1: $(DOC_MAN1)
man5: $(DOC_MAN5)
man7: $(DOC_MAN7)
-info: git.info gitman.info
+info: git.info
install: man
$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
@@ -96,10 +96,9 @@ install: man
install-info: info
$(INSTALL) -d -m 755 $(DESTDIR)$(infodir)
- $(INSTALL) -m 644 git.info gitman.info $(DESTDIR)$(infodir)
+ $(INSTALL) -m 644 git.info $(DESTDIR)$(infodir)
if test -r $(DESTDIR)$(infodir)/dir; then \
$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) git.info ;\
- $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) gitman.info ;\
else \
echo "No directory found in $(DESTDIR)$(infodir)" >&2 ; \
fi

View file

@ -1,529 +0,0 @@
diff --git a/builtin-add.c b/builtin-add.c
index bf13aa3..02c6751 100644
--- a/builtin-add.c
+++ b/builtin-add.c
@@ -123,6 +123,7 @@ int add_files_to_cache(const char *prefix, const char **pathspec, int flags)
init_revisions(&rev, prefix);
setup_revisions(0, NULL, &rev, NULL);
rev.prune_data = pathspec;
+ rev.glob_paths = 0; /* git-add has its own filename matching machinery */
rev.diffopt.output_format = DIFF_FORMAT_CALLBACK;
rev.diffopt.format_callback = update_callback;
data.flags = flags;
diff --git a/builtin-blame.c b/builtin-blame.c
index 9bced3b..237d1fe 100644
--- a/builtin-blame.c
+++ b/builtin-blame.c
@@ -343,7 +343,7 @@ static struct origin *find_origin(struct scoreboard *sb,
paths[0] = origin->path;
paths[1] = NULL;
- diff_tree_setup_paths(paths, &diff_opts);
+ diff_tree_setup_paths(paths, &diff_opts, 0);
if (diff_setup_done(&diff_opts) < 0)
die("diff-setup");
@@ -417,7 +417,7 @@ static struct origin *find_rename(struct scoreboard *sb,
diff_opts.output_format = DIFF_FORMAT_NO_OUTPUT;
diff_opts.single_follow = origin->path;
paths[0] = NULL;
- diff_tree_setup_paths(paths, &diff_opts);
+ diff_tree_setup_paths(paths, &diff_opts, 0);
if (diff_setup_done(&diff_opts) < 0)
die("diff-setup");
@@ -1099,7 +1099,7 @@ static int find_copy_in_parent(struct scoreboard *sb,
diff_opts.output_format = DIFF_FORMAT_NO_OUTPUT;
paths[0] = NULL;
- diff_tree_setup_paths(paths, &diff_opts);
+ diff_tree_setup_paths(paths, &diff_opts, 0);
if (diff_setup_done(&diff_opts) < 0)
die("diff-setup");
@@ -2346,6 +2346,11 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
parse_done:
argc = parse_options_end(&ctx);
+ if (revs.glob_paths) {
+ error("git blame does not support `--glob-paths'");
+ usage_with_options(blame_opt_usage, options);
+ }
+
if (!blame_move_score)
blame_move_score = BLAME_DEFAULT_MOVE_SCORE;
if (!blame_copy_score)
diff --git a/builtin-reset.c b/builtin-reset.c
index 2e5a886..6026b34 100644
--- a/builtin-reset.c
+++ b/builtin-reset.c
@@ -128,14 +128,15 @@ static void update_index_from_diff(struct diff_queue_struct *q,
}
static int read_from_tree(const char *prefix, const char **argv,
- unsigned char *tree_sha1)
+ unsigned char *tree_sha1, int glob_paths)
{
struct lock_file *lock = xcalloc(1, sizeof(struct lock_file));
int index_fd, index_was_discarded = 0;
struct diff_options opt;
memset(&opt, 0, sizeof(opt));
- diff_tree_setup_paths(get_pathspec(prefix, (const char **)argv), &opt);
+ diff_tree_setup_paths(get_pathspec(prefix, (const char **)argv),
+ &opt, glob_paths);
opt.output_format = DIFF_FORMAT_CALLBACK;
opt.format_callback = update_index_from_diff;
opt.format_callback_data = &index_was_discarded;
@@ -171,6 +172,7 @@ static const char *reset_type_names[] = { "mixed", "soft", "hard", NULL };
int cmd_reset(int argc, const char **argv, const char *prefix)
{
int i = 0, reset_type = NONE, update_ref_status = 0, quiet = 0;
+ int glob_paths = 0;
const char *rev = "HEAD";
unsigned char sha1[20], *orig = NULL, sha1_orig[20],
*old_orig = NULL, sha1_old_orig[20];
@@ -182,6 +184,8 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
OPT_SET_INT(0, "soft", &reset_type, "reset only HEAD", SOFT),
OPT_SET_INT(0, "hard", &reset_type,
"reset HEAD, index and working tree", HARD),
+ OPT_BOOLEAN(0, "glob-paths", &glob_paths,
+ "match paths with fnmatch"),
OPT_BOOLEAN('q', NULL, &quiet,
"disable showing new HEAD in hard reset and progress message"),
OPT_END()
@@ -246,7 +250,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
else if (reset_type != NONE)
die("Cannot do %s reset with paths.",
reset_type_names[reset_type]);
- return read_from_tree(prefix, argv + i, sha1);
+ return read_from_tree(prefix, argv + i, sha1, glob_paths);
}
if (reset_type == NONE)
reset_type = MIXED; /* by default */
diff --git a/builtin-update-index.c b/builtin-update-index.c
index 38eb53c..28b09a3 100644
--- a/builtin-update-index.c
+++ b/builtin-update-index.c
@@ -23,6 +23,7 @@ static int allow_replace;
static int info_only;
static int force_remove;
static int verbose;
+static int glob_paths;
static int mark_valid_only;
#define MARK_VALID 1
#define UNMARK_VALID 2
@@ -534,7 +535,7 @@ static int do_reupdate(int ac, const char **av,
struct cache_entry *old = NULL;
int save_nr;
- if (ce_stage(ce) || !ce_path_match(ce, pathspec))
+ if (ce_stage(ce) || !ce_path_match(ce, pathspec, glob_paths))
continue;
if (has_head)
old = read_one_ent(NULL, head_sha1,
@@ -659,6 +660,10 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
force_remove = 1;
continue;
}
+ if (!strcmp(path, "--glob-paths")) {
+ glob_paths = 1;
+ continue;
+ }
if (!strcmp(path, "-z")) {
line_termination = 0;
continue;
@@ -702,6 +707,8 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
usage(update_index_usage);
die("unknown option %s", path);
}
+ if (glob_paths)
+ die("--glob-paths without -g");
p = prefix_path(prefix, prefix_length, path);
update_one(p, NULL, 0);
if (set_executable_bit)
@@ -712,6 +719,8 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
if (read_from_stdin) {
struct strbuf buf, nbuf;
+ if (glob_paths)
+ die("--glob-paths without -g");
strbuf_init(&buf, 0);
strbuf_init(&nbuf, 0);
while (strbuf_getline(&buf, stdin, line_termination) != EOF) {
diff --git a/cache.h b/cache.h
index a779d92..5560195 100644
--- a/cache.h
+++ b/cache.h
@@ -387,7 +387,8 @@ extern int ce_same_name(struct cache_entry *a, struct cache_entry *b);
extern int ie_match_stat(const struct index_state *, struct cache_entry *, struct stat *, unsigned int);
extern int ie_modified(const struct index_state *, struct cache_entry *, struct stat *, unsigned int);
-extern int ce_path_match(const struct cache_entry *ce, const char **pathspec);
+extern int ce_path_match(const struct cache_entry *ce, const char **pathspec,
+ int glob_paths);
extern int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_object, enum object_type type, const char *path);
extern int index_pipe(unsigned char *sha1, int fd, const char *type, int write_object);
extern int index_path(unsigned char *sha1, const char *path, struct stat *st, int write_object);
diff --git a/diff-lib.c b/diff-lib.c
index e7eaff9..87925a2 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -77,7 +77,7 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
DIFF_OPT_TST(&revs->diffopt, HAS_CHANGES))
break;
- if (!ce_path_match(ce, revs->prune_data))
+ if (!ce_path_match(ce, revs->prune_data, revs->glob_paths))
continue;
if (ce_stage(ce)) {
@@ -431,7 +431,7 @@ static int oneway_diff(struct cache_entry **src, struct unpack_trees_options *o)
if (tree == o->df_conflict_entry)
tree = NULL;
- if (ce_path_match(idx ? idx : tree, revs->prune_data))
+ if (ce_path_match(idx ? idx : tree, revs->prune_data, revs->glob_paths))
do_oneway_diff(o, idx, tree);
return 0;
@@ -508,6 +508,7 @@ int do_diff_cache(const unsigned char *tree_sha1, struct diff_options *opt)
init_revisions(&revs, NULL);
revs.prune_data = opt->paths;
+ revs.glob_paths = opt->glob_paths;
tree = parse_tree_indirect(tree_sha1);
if (!tree)
die("bad tree object %s", sha1_to_hex(tree_sha1));
diff --git a/diff-no-index.c b/diff-no-index.c
index f6994cf..ec549a7 100644
--- a/diff-no-index.c
+++ b/diff-no-index.c
@@ -240,6 +240,7 @@ void diff_no_index(struct rev_info *revs,
}
else
revs->diffopt.paths = argv + argc - 2;
+ revs->diffopt.glob_paths = 0;
revs->diffopt.nr_paths = 2;
DIFF_OPT_SET(&revs->diffopt, EXIT_WITH_STATUS);
diff --git a/diff.h b/diff.h
index 50fb5dd..56f0857 100644
--- a/diff.h
+++ b/diff.h
@@ -102,6 +102,7 @@ struct diff_options {
FILE *file;
int close_file;
+ int glob_paths;
int nr_paths;
const char **paths;
int *pathlens;
@@ -128,7 +129,8 @@ const char *diff_get_color(int diff_use_color, enum color_diff ix);
extern const char mime_boundary_leader[];
-extern void diff_tree_setup_paths(const char **paths, struct diff_options *);
+extern void diff_tree_setup_paths(const char **paths, struct diff_options *opt,
+ int glob_paths);
extern void diff_tree_release_paths(struct diff_options *);
extern int diff_tree(struct tree_desc *t1, struct tree_desc *t2,
const char *base, struct diff_options *opt);
diff --git a/gitk-git/gitk b/gitk-git/gitk
index fddcb45..18c5cbc 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -1866,6 +1866,7 @@ proc makewindow {} {
set gm [tk_optionMenu .tf.lbar.gdttype gdttype \
[mc "containing:"] \
[mc "touching paths:"] \
+ [mc "touching paths (glob):"] \
[mc "adding/removing string:"]]
trace add variable gdttype write gdttype_change
pack .tf.lbar.gdttype -side left -fill y
@@ -3588,6 +3589,11 @@ proc do_file_hl {serial} {
set highlight_paths [makepatterns $paths]
highlight_filelist
set gdtargs [concat -- $paths]
+ } elseif {$gdttype eq [mc "touching paths (glob):"]} {
+ if {[catch {set paths [shellsplit $highlight_files]}]} return
+ set highlight_paths $paths
+ highlight_filelist
+ set gdtargs [concat --glob-paths -- $paths]
} elseif {$gdttype eq [mc "adding/removing string:"]} {
set gdtargs [list "-S$highlight_files"]
} else {
diff --git a/read-cache.c b/read-cache.c
index 1648428..c11ded9 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -582,7 +582,8 @@ int ce_same_name(struct cache_entry *a, struct cache_entry *b)
return ce_namelen(b) == len && !memcmp(a->name, b->name, len);
}
-int ce_path_match(const struct cache_entry *ce, const char **pathspec)
+static int ce_path_match_standard(const struct cache_entry *ce,
+ const char **pathspec)
{
const char *match, *name;
int len;
@@ -608,6 +609,31 @@ int ce_path_match(const struct cache_entry *ce, const char **pathspec)
return 0;
}
+static int ce_path_match_globbed(const struct cache_entry *ce,
+ const char **pathspec)
+{
+ const char *match, *name;
+
+ if (!pathspec)
+ return 1;
+
+ name = ce->name;
+ while ((match = *pathspec++) != NULL) {
+ if (!fnmatch(match, name, 0))
+ return 1;
+ }
+ return 0;
+}
+
+int ce_path_match(const struct cache_entry *ce,
+ const char **pathspec, int glob_paths)
+{
+ if (glob_paths)
+ return ce_path_match_globbed(ce, pathspec);
+ else
+ return ce_path_match_standard(ce, pathspec);
+}
+
/*
* We fundamentally don't like some paths: we don't want
* dot or dot-dot anywhere, and for obvious reasons don't
diff --git a/revision.c b/revision.c
index 3897fec..0dd1091 100644
--- a/revision.c
+++ b/revision.c
@@ -519,6 +519,7 @@ static void cherry_pick_list(struct commit_list *list, struct rev_info *revs)
if (revs->diffopt.nr_paths) {
ids.diffopts.nr_paths = revs->diffopt.nr_paths;
ids.diffopts.paths = revs->diffopt.paths;
+ ids.diffopts.glob_paths = revs->diffopt.glob_paths; /* CHECKME */
ids.diffopts.pathlens = revs->diffopt.pathlens;
}
@@ -826,7 +827,7 @@ static void prepare_show_merge(struct rev_info *revs)
struct cache_entry *ce = active_cache[i];
if (!ce_stage(ce))
continue;
- if (ce_path_match(ce, revs->prune_data)) {
+ if (ce_path_match(ce, revs->prune_data, revs->glob_paths)) {
prune_num++;
prune = xrealloc(prune, sizeof(*prune) * prune_num);
prune[prune_num-2] = ce->name;
@@ -837,6 +838,7 @@ static void prepare_show_merge(struct rev_info *revs)
i++;
}
revs->prune_data = prune;
+ revs->glob_paths = 0;
revs->limited = 1;
}
@@ -1033,6 +1035,8 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
revs->min_age = approxidate(arg + 8);
} else if (!strcmp(arg, "--first-parent")) {
revs->first_parent_only = 1;
+ } else if (!strcmp(arg, "--glob-paths")) {
+ revs->glob_paths = 1;
} else if (!strcmp(arg, "-g") || !strcmp(arg, "--walk-reflogs")) {
init_reflog_walk(&revs->reflog_info);
} else if (!strcmp(arg, "--default")) {
@@ -1220,6 +1224,7 @@ void parse_revision_opt(struct rev_info *revs, struct parse_opt_ctx_t *ctx,
int setup_revisions(int argc, const char **argv, struct rev_info *revs, const char *def)
{
int i, flags, left, seen_dashdash;
+ const char **paths = NULL;
/* First, search for "--" */
seen_dashdash = 0;
@@ -1230,7 +1235,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
argv[i] = NULL;
argc = i;
if (argv[i + 1])
- revs->prune_data = get_pathspec(revs->prefix, argv + i + 1);
+ paths = argv + i + 1;
seen_dashdash = 1;
break;
}
@@ -1290,6 +1295,9 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
if (seen_dashdash || *arg == '^')
die("bad revision '%s'", arg);
+ if (revs->glob_paths)
+ die("--glob-paths without --");
+
/* If we didn't have a "--":
* (1) all filenames must exist;
* (2) all rev-args must not be interpretable
@@ -1301,10 +1309,19 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
revs->prune_data = get_pathspec(revs->prefix,
argv + i);
+ revs->glob_paths = 0;
break;
}
}
+ /* Third, handle paths listed after -- */
+ if (paths != NULL) {
+ if (revs->glob_paths)
+ revs->prune_data = paths;
+ else
+ revs->prune_data = get_pathspec(revs->prefix, paths);
+ }
+
if (revs->def == NULL)
revs->def = def;
if (revs->show_merge)
@@ -1333,12 +1350,14 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
revs->limited = 1;
if (revs->prune_data) {
- diff_tree_setup_paths(revs->prune_data, &revs->pruning);
+ diff_tree_setup_paths(revs->prune_data, &revs->pruning,
+ revs->glob_paths);
/* Can't prune commits with rename following: the paths change.. */
if (!DIFF_OPT_TST(&revs->diffopt, FOLLOW_RENAMES))
revs->prune = 1;
if (!revs->full_diff)
- diff_tree_setup_paths(revs->prune_data, &revs->diffopt);
+ diff_tree_setup_paths(revs->prune_data, &revs->diffopt,
+ revs->glob_paths);
}
if (revs->combine_merges) {
revs->ignore_merges = 0;
diff --git a/revision.h b/revision.h
index fa68c65..a68cdb8 100644
--- a/revision.h
+++ b/revision.h
@@ -32,6 +32,9 @@ struct rev_info {
void *prune_data;
unsigned int early_output;
+ /* whether prune_data contains fnmatch() patterns */
+ unsigned int glob_paths:1;
+
/* Traversal flags */
unsigned int dense:1,
prune:1,
diff --git a/tree-diff.c b/tree-diff.c
index bbb126f..0aa1e9b 100644
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -82,6 +82,11 @@ static int compare_tree_entry(struct tree_desc *t1, struct tree_desc *t2, const
return 0;
}
+static int tree_entry_interesting_globbed(struct tree_desc *, const char *,
+ int, struct diff_options *);
+static int tree_entry_interesting_standard(struct tree_desc *, const char *,
+ int, struct diff_options *);
+
/*
* Is a tree entry interesting given the pathspec we have?
*
@@ -91,7 +96,19 @@ static int compare_tree_entry(struct tree_desc *t1, struct tree_desc *t2, const
* - zero for no
* - negative for "no, and no subsequent entries will be either"
*/
-static int tree_entry_interesting(struct tree_desc *desc, const char *base, int baselen, struct diff_options *opt)
+static int tree_entry_interesting(struct tree_desc *desc,
+ const char *base, int baselen, struct diff_options *opt)
+{
+ if (opt->glob_paths)
+ return tree_entry_interesting_globbed(desc, base,
+ baselen, opt);
+ else
+ return tree_entry_interesting_standard(desc, base,
+ baselen, opt);
+}
+
+static int tree_entry_interesting_standard(struct tree_desc *desc,
+ const char *base, int baselen, struct diff_options *opt)
{
const char *path;
const unsigned char *sha1;
@@ -190,6 +207,41 @@ static int tree_entry_interesting(struct tree_desc *desc, const char *base, int
return never_interesting; /* No matches */
}
+static int tree_entry_interesting_globbed(struct tree_desc *desc,
+ const char *base, int baselen, struct diff_options *opt)
+{
+ const char *path;
+ char *fullpath;
+ const unsigned char *sha1;
+ unsigned mode;
+ int i;
+ int pathlen;
+ int result;
+
+ if (!opt->nr_paths)
+ return 1;
+ sha1 = tree_entry_extract(desc, &path, &mode);
+ if (S_ISDIR(mode))
+ return 1;
+ pathlen = tree_entry_len(path, sha1);
+
+ fullpath = xmalloc(pathlen + baselen + 1);
+ memcpy(fullpath, base, baselen);
+ memcpy(fullpath + baselen, path, pathlen + 1);
+
+ result = 0;
+ for (i = 0; i < opt->nr_paths; i++) {
+ const char *match = opt->paths[i];
+ if (!fnmatch(match, fullpath, 0)) {
+ result = 1;
+ break;
+ }
+ }
+
+ free(fullpath);
+ return result;
+}
+
/* A whole sub-tree went away or appeared */
static void show_tree(struct diff_options *opt, const char *prefix, struct tree_desc *desc, const char *base, int baselen)
{
@@ -338,7 +390,7 @@ static void try_to_follow_renames(struct tree_desc *t1, struct tree_desc *t2, co
diff_opts.single_follow = opt->paths[0];
diff_opts.break_opt = opt->break_opt;
paths[0] = NULL;
- diff_tree_setup_paths(paths, &diff_opts);
+ diff_tree_setup_paths(paths, &diff_opts, 0);
if (diff_setup_done(&diff_opts) < 0)
die("unable to set up diff options to follow renames");
diff_tree(t1, t2, base, &diff_opts);
@@ -362,7 +414,7 @@ static void try_to_follow_renames(struct tree_desc *t1, struct tree_desc *t2, co
/* Update the path we use from now on.. */
diff_tree_release_paths(opt);
opt->paths[0] = xstrdup(p->one->path);
- diff_tree_setup_paths(opt->paths, opt);
+ diff_tree_setup_paths(opt->paths, opt, 0);
break;
}
}
@@ -440,11 +492,13 @@ void diff_tree_release_paths(struct diff_options *opt)
free(opt->pathlens);
}
-void diff_tree_setup_paths(const char **p, struct diff_options *opt)
+void diff_tree_setup_paths(const char **p, struct diff_options *opt,
+ int glob_paths)
{
opt->nr_paths = 0;
opt->pathlens = NULL;
opt->paths = NULL;
+ opt->glob_paths = glob_paths;
if (p) {
int i;

View file

@ -1,23 +0,0 @@
args : with args;
rec {
src = fetchurl {
name = "monotone-viz-1.0.1-nolablgtk.tar.gz";
urls = [
http://ftp.debian.org/debian/pool/main/m/monotone-viz/monotone-viz_1.0.1.orig.tar.gz
#http://oandrieu.nerim.net/monotone-viz/monotone-viz-1.0.1-nolablgtk.tar.gz
];
sha256 = "066qwrknjk5hwk9jblnf0bzvbmfbabq0zhsxkd3nzk469zkpvhl2";
};
buildInputs = [ocaml lablgtk libgnomecanvas gtk graphviz glib pkgconfig];
configureFlags = ["--with-lablgtk-dir=${lablgtk}/lib/ocaml/lablgtk2"];
/* doConfigure should be specified separately */
phaseNames = ["doConfigure" "doMakeInstall"];
name = "monotone-viz-" + version;
meta = {
description = "Monotone commit tree visualizer";
};
}

View file

@ -1,34 +0,0 @@
# patch "agraph.ml"
# from [8ae6c9bb70bbf9fd80e4e62d9f162ac581619b9e]
# to [05aa88921481ac9bfe238daeb4374fbc9993caaa]
#
============================================================
--- a/agraph.ml 8ae6c9bb70bbf9fd80e4e62d9f162ac581619b9e
+++ b/agraph.ml 05aa88921481ac9bfe238daeb4374fbc9993caaa
@@ -50,8 +50,9 @@ let dot_format params agraph =
agraph.nodes in
!+ "digraph \"monotone-viz\"\n{\n" ;
- if params.lr_layout then
- !+ " graph [rankdir=LR] ;\n" ;
+ if params.lr_layout
+ then !+ " graph [rankdir=LR] ;\n"
+ else !+ " graph [rankdir=BT] ;\n" ;
!+ " graph [ranksep=\"0.25\"] ;\n" ;
!+ " node [label=\"\"] ;\n" ;
@@ -222,11 +223,11 @@ let spawn_dot graph status done_cb =
let dot_prg = graph.layout_params.dot_program in
let cmd =
if Viz_misc.debug "dot"
- then [ "/bin/sh" ; "-c" ;
+ then [ "/bin/sh" ; "-c" ;
Printf.sprintf
"set -o pipefail ; \
- tee agraph.in.dot | %s -q -y -s%.0f | tee agraph.out.dot" dot_prg ppi ]
- else [ dot_prg ; "-q" ; "-y" ; Printf.sprintf "-s%.0f" ppi ] in
+ tee agraph.in.dot | %s -q -s%.0f | tee agraph.out.dot" dot_prg ppi ]
+ else [ dot_prg ; "-q" ; Printf.sprintf "-s%.0f" ppi ] in
let error fmt =
Printf.kprintf (fun s -> done_cb (`LAYOUT_ERROR s)) fmt in
try

View file

@ -1,23 +0,0 @@
In NixOS chroot builds, there is no root account. So configure should
not rely on its existence in deciding whether to use getpwuid().
diff -rc -x '*~' rcs-5.7-orig/src/conf.sh rcs-5.7/src/conf.sh
*** rcs-5.7-orig/src/conf.sh 1995-06-16 08:19:24.000000000 +0200
--- rcs-5.7/src/conf.sh 2010-02-12 15:22:37.000000000 +0100
***************
*** 821,827 ****
a= z=
cat >a.c <<EOF
#include "$A_H"
! int main() { exitmain(!getpwuid(0)); }
EOF
$PREPARE_CC || exit
if ($CL a.c $L && $aout) >&2
--- 821,827 ----
a= z=
cat >a.c <<EOF
#include "$A_H"
! int main() { exitmain(!getpwuid(getuid())); }
EOF
$PREPARE_CC || exit
if ($CL a.c $L && $aout) >&2

View file

@ -1,15 +0,0 @@
Index: tvtime-1.0.2/src/videoinput.c
===================================================================
--- tvtime-1.0.2.orig/src/videoinput.c
+++ tvtime-1.0.2/src/videoinput.c
@@ -35,8 +35,8 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
-#include "videodev.h"
-#include "videodev2.h"
+#include <linux/videodev.h>
+#include <linux/videodev2.h>
#include "videoinput.h"
#include "mixer.h"

View file

@ -1,18 +0,0 @@
{stdenv, fetchurl, SDL, zlib, which}:
stdenv.mkDerivation {
name = "qemu-0.11.0";
src = fetchurl {
url = http://download.savannah.gnu.org/releases/qemu/qemu-0.11.0.tar.gz;
sha256 = "1w3n61lzwvqg1ygn0vs8syybbmbcbk7lfyya098k201lp5rpwamw";
};
patchFlags = "-p2";
buildInputs = [SDL zlib which];
meta = {
description = "QEmu processor emulator";
};
}

View file

@ -1,19 +0,0 @@
{ stdenv, fetchurl, SDL, zlib, which, ncurses }:
stdenv.mkDerivation rec {
name = "qemu-0.13.0";
src = fetchurl {
url = "mirror://savannah/releases/qemu/${name}.tar.gz";
sha256 = "0xyqbwy78218ja6r9ya5p37j8hcd81l4cpw3ghvnxsjwn18mhvqy";
};
buildInputs = [ SDL zlib which ncurses ];
meta = {
description = "QEmu processor emulator";
license = "GPLv2+";
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux;
};
}

View file

@ -1,19 +0,0 @@
{stdenv, fetchsvn, SDL, zlib, which}:
stdenv.mkDerivation {
name = "qemu-svn-6642";
src = fetchsvn {
url = "svn://svn.sv.gnu.org/qemu/trunk";
rev = "6642";
sha256 = "12445ad91feb72eecd1db0d4319a8fa5d7dc971b89228bd0e121b49c5da9705e";
};
patchFlags = "-p2";
buildInputs = [SDL zlib which];
meta = {
description = "QEmu processor emulator";
};
}

View file

@ -1,24 +0,0 @@
source $stdenv/setup
postUnpack() {
cd $sourceRoot
cat >> config.mk << EOF
PREFIX=
DESTDIR=${out}
CFLAGS = -DVERSION=\\"\${VERSION}\\"
LDFLAGS = -lm -lX11 -lixp
AWKPATH=${gawk}/bin/gawk
CONFPREFIX = /etc
MANPREFIX = /share/man
EOF
cd ..
}
postUnpack=postUnpack
genericBuild

View file

@ -1,5 +0,0 @@
{fetchurl, ...} :
fetchurl {
url = http://www.kde-look.org/CONTENT/content-files/58501-green.tar.gz;
sha256 = "0sdykpziij1f3w4braq8r8nqg4lnsd7i7gi1k5d7c31m2q3b9a7r";
}

View file

@ -1,5 +0,0 @@
{fetchurl, ...}:
fetchurl {
url = http://dev.gentoo.org/~spock/repos/bootsplash/Theme-GNU.tar.bz2;
sha256 = "1pj91nxvwjphc8r6idl4ih3ldyk34j1w9c4p8gzmwnwg3w34xha0";
}

View file

@ -1,10 +0,0 @@
{ kde, cmake, smokeqt, perl }:
kde {
buildInputs = [ smokeqt perl ];
buildNativeInputs = [ cmake ];
meta = {
description = "Perl bindings for Qt library";
};
}

View file

@ -1,10 +0,0 @@
{ kde, kdelibs, smokeqt }:
kde {
propagatedBuildInputs = [ kdelibs smokeqt ];
meta = {
description = "C++ parser used to generate language bindings for Qt/KDE";
license = "GPLv2";
};
}

View file

@ -1,60 +0,0 @@
--- a/kget/CMakeLists.txt 2010-08-16 19:08:36.000000000 +0400
+++ b/kget/CMakeLists.txt 2010-08-16 22:04:24.000000000 +0400
@@ -53,21 +53,20 @@
add_subdirectory(desktop)
add_subdirectory(plasma)
-# find kworkspace library to allow the shutdown after downloads completed option
-find_library(KDE4_KWORKSPACE_LIBRARY NAMES kworkspace PATHS ${KDE4_LIB_INSTALL_DIR} NO_DEFAULT_PATH )
-if(KDE4_KWORKSPACE_LIBRARY)
- set(KDE4_KWORKSPACE_LIBS ${kworkspace_LIB_DEPENDS} ${KDE4_KWORKSPACE_LIBRARY})
+macro_optional_find_package(KDE4Workspace)
+macro_log_feature(KDE4WORKSPACE_FOUND "KDE4Workspace" "KDE4 workspace libraries, part of kdebase-workspace" "http://www.kde.org" FALSE "" "Allows 'shutdown after downloads completed' in kget")
+if(KDE4WORKSPACE_FOUND)
add_definitions(-DHAVE_KWORKSPACE)
- set(KWORKSPACE_FOUND true)
-endif(KDE4_KWORKSPACE_LIBRARY)
+ include_directories(${KDE4WORKSPACE_INCLUDE_DIR})
+endif(KDE4WORKSPACE_FOUND)
# find libkonq to allow actions and open with options in the context menu of a transfer
-find_library(KDE4_KONQUEROR_LIBRARY NAMES konq PATHS ${KDE4_LIB_INSTALL_DIR} NO_DEFAULT_PATH )
-if(KDE4_KONQUEROR_LIBRARY)
- set(KDE4_KONQUEROR_LIBS ${konq_LIB_DEPENDS} ${KDE4_KONQUEROR_LIBRARY})
+macro_optional_find_package(LibKonq)
+macro_log_feature(LIBKONQ_FOUND "libkonq" "KDE4 Konqueror library" "http://www.kde.org" FALSE "" "Needed to build actions and open with options in the context menu of a transfer")
+if(LIBKONQ_FOUND)
add_definitions(-DHAVE_KONQUEROR)
- set(KONQUEROR_FOUND true)
-endif(KDE4_KONQUEROR_LIBRARY)
+ include_directories(${LIBKONQ_INCLUDE_DIR})
+endif(LIBKONQ_FOUND)
include_directories(
@@ -142,9 +141,9 @@
target_link_libraries(kgetcore ${KDE4_KIO_LIBS})
-if (KWORKSPACE_FOUND)
- target_link_libraries(kgetcore ${KDE4_KWORKSPACE_LIBS})
-endif (KWORKSPACE_FOUND)
+if (KDE4WORKSPACE_FOUND)
+ target_link_libraries(kgetcore ${KDE4WORKSPACE_KWORKSPACE_LIBS})
+endif (KDE4WORKSPACE_FOUND)
if (HAVE_NEPOMUK)
target_link_libraries(kgetcore ${SOPRANO_LIBRARIES} ${NEPOMUK_LIBRARIES})
@@ -294,9 +293,9 @@
target_link_libraries(kget ${SOPRANO_LIBRARIES} ${NEPOMUK_LIBRARIES})
endif (HAVE_NEPOMUK)
-if (KONQUEROR_FOUND)
- target_link_libraries(kget ${KDE4_KONQUEROR_LIBS})
-endif (KONQUEROR_FOUND)
+if (LIBKONQ_FOUND)
+ target_link_libraries(kget ${LIBKONQ_LIBRARY})
+endif (LIBKONQ_FOUND)
if (QGPGME_FOUND)
target_link_libraries(kget ${QGPGME_LIBRARIES})

View file

@ -1,39 +0,0 @@
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 63cdef8..0c5b50a 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -3,22 +3,30 @@ if( UNIX )
add_subdirectory(cervisia)
endif()
endif( UNIX )
-add_subdirectory(kapptemplate)
+if(BUILD_kapptemplate)
+ add_subdirectory(kapptemplate)
+endif()
if(BUILD_kbugbuster)
add_subdirectory(kbugbuster)
endif()
if(BUILD_kcachegrind)
add_subdirectory(kcachegrind)
endif()
-add_subdirectory(kmtrace)
+if(BUILD_kmtrace)
+ add_subdirectory(kmtrace)
+endif()
if(BUILD_kompare)
add_subdirectory(kompare)
endif()
if(BUILD_lokalize)
add_subdirectory(lokalize)
endif()
-add_subdirectory(poxml)
-add_subdirectory(scripts)
+if(BUILD_poxml)
+ add_subdirectory(poxml)
+endif()
+if(BUILD_scripts)
+ add_subdirectory(scripts)
+endif()
if(LIBXSLT_FOUND AND LIBXML2_FOUND)
if(BUILD_umbrello)

View file

@ -1,29 +0,0 @@
{ stdenv, fetchurl, cmake, kdelibs, qt4, automoc4, phonon, libkexiv2
, libkdcraw, libkipi, gettext, libxml2, libxslt, qjson, qca2
, kdepimlibs }:
stdenv.mkDerivation rec {
name = "kipi-plugins-1.9.0";
src = fetchurl {
url = "mirror://sourceforge/kipi/${name}.tar.bz2";
sha256 = "0k4k9v1rj7129n0s0i5pvv4rabx0prxqs6sca642fj95cxc6c96m";
};
buildInputs =
# Some dependencies are missing because they are very big (OpenCV,
# GTK).
[ cmake kdelibs qt4 automoc4 phonon libkexiv2 libkdcraw libkipi
gettext libxml2 libxslt qjson qca2 kdepimlibs
];
enableParallelBuilding = true;
meta = {
description = "Photo Management Program";
license = "GPL";
homepage = http://www.kipi-plugins.org;
inherit (kdelibs.meta) platforms;
maintainers = with stdenv.lib.maintainers; [ viric urkud ];
};
}

View file

@ -1,12 +0,0 @@
diff -ruN gcc-4.0.2/configure gcc-4.0.2.new/configure
--- gcc-4.0.2/configure 2005-09-13 09:01:28.000000000 +0200
+++ gcc-4.0.2.new/configure 2006-01-20 20:38:09.000000000 +0100
@@ -3471,7 +3471,7 @@
# being built; programs in there won't even run.
if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
# Search for pre-installed headers if nothing else fits.
- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include'
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include $(NIX_EXTRA_CFLAGS)'
fi
if test "x${use_gnu_ld}" = x &&

View file

@ -1,9 +0,0 @@
args:
if args.stdenv.system == "i686-linux" || args.stdenv.system == "x86_64-linux" then
(import ./jdk6-linux.nix) ( removeAttrs args ["cabextract"] )
else if args.stdenv.system == "i686-cygwin" then
(import ./jdk6-cygwin.nix) (removeAttrs args ["pluginSupport" "xlibs" "installjdk" "xlibs"])
else
abort "the JDK is not supported on this platform"

View file

@ -1,48 +0,0 @@
{ stdenv
, fetchurl
, unzip
, cabextract
, ...
}:
assert stdenv.system == "i686-cygwin";
stdenv.mkDerivation rec {
name = "jdk-1.6.0_20";
src = fetchurl {
url = file:///tmp/jdk-6u20-windows-i586.exe;
sha256 = "0w4afz8a9gi1iyhh47gvhiy59dfrzx0fnmywdff3v5cx696w25fh";
};
buildInputs = [unzip cabextract];
buildCommand = ''
cabextract ${src}
mkdir -p $out
unzip -d $out tools.zip
find $out -name '*.exe' | xargs chmod a+x
find $out -name '*.dll' | xargs chmod a+x
cd $out
$out/bin/unpack200.exe ./jre/lib/jsse.pack ./jre/lib/jsse.jar
$out/bin/unpack200.exe ./jre/lib/javaws.pack ./jre/lib/javaws.jar
$out/bin/unpack200.exe ./jre/lib/plugin.pack ./jre/lib/plugin.jar
$out/bin/unpack200.exe ./jre/lib/charsets.pack ./jre/lib/charsets.jar
$out/bin/unpack200.exe ./jre/lib/deploy.pack ./jre/lib/deploy.jar
$out/bin/unpack200.exe ./jre/lib/rt.pack ./jre/lib/rt.jar
$out/bin/unpack200.exe ./jre/lib/ext/localedata.pack ./jre/lib/ext/localedata.jar
$out/bin/unpack200.exe ./lib/tools.pack ./lib/tools.jar
rm ./jre/lib/jsse.pack \
./jre/lib/javaws.pack \
./jre/lib/plugin.pack \
./jre/lib/charsets.pack \
./jre/lib/deploy.pack \
./jre/lib/rt.pack \
./jre/lib/ext/localedata.pack \
./lib/tools.pack
'';
meta.license = "unfree";
}

View file

@ -1,31 +0,0 @@
args: with args;
stdenv.mkDerivation (rec {
name = "ocaml-cvs-2009-09-24";
src = fetchcvs {
cvsRoot = ":pserver:anoncvs@camlcvs.inria.fr:/caml";
module = "ocaml";
date = "2009-09-24";
sha256 = "3909bffebc9ce36ca51711d7d95596cba94376ebb1975c6ed46b09c9892c3ef1";
};
prefixKey = "-prefix ";
configureFlags = ["-no-tk"];
buildFlags = "world" +
(if !stdenv.isArm then "bootstrap world.opt" else "");
buildInputs = [ncurses];
installTargets = "install" + (if !stdenv.isArm then "installopt" else "");
patchPhase = ''
CAT=$(type -tp cat)
sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang
'';
meta = {
homepage = http://caml.inria.fr/ocaml;
license = "QPL, LGPL2 (library part)";
desctiption = "Most popular variant of the Caml language";
};
})

View file

@ -1,15 +0,0 @@
buildinputs="$aterm $sdf $strategoxt"
source $stdenv/setup || exit 1
tar zxf $src || exit 1
cd tiger-* || exit 1
./configure --prefix=$out \
--with-aterm=$aterm \
--with-sdf=$sdf \
--with-stratego-xt=$strategoxt \
--enable-tiger \
--enable-ir \
--enable-asm \
|| exit 1
make || exit 1
make install || exit 1

View file

@ -1,11 +0,0 @@
{stdenv, fetchurl, aterm, sdf, strategoxt}: stdenv.mkDerivation {
name = "tiger-1.3-4631";
builder = ./builder.sh;
src = fetchurl {
url = http://losser.st-lab.cs.uu.nl/~mbravenb/dailydist/tiger/src/tiger-1.3-4631.tar.gz;
md5 = "1ea6070d84134eb6cff7fb32a75ef90a";
};
aterm = aterm;
sdf = sdf;
strategoxt = strategoxt;
}

View file

@ -1,31 +0,0 @@
source $stdenv/setup
set -e
set -x
tar zxf $src
cd js/src
# Extend Makefile to dump some of its variables we want to know.
cat >> Makefile.ref <<EOF
printlibraries :
@echo \$(LIBRARY) \$(SHARED_LIBRARY) > LIBRARIES
printprograms :
@echo \$(PROGRAM) > PROGRAMS
EOF
MAKE="make -f Makefile.ref"
$MAKE printlibraries
$MAKE printprograms
$MAKE
mkdir -p $out
mkdir -p $out/bin
mkdir -p $out/lib
# Install the binaries that have been created.
install $(cat PROGRAMS) $out/bin
install $(cat LIBRARIES) $out/lib

View file

@ -1,17 +0,0 @@
{javaAdapter ? false,
jdk ? null,
stdenv, fetchurl, toolbuslib, atermjava, aterm, yacc, flex, tcltk} :
stdenv.mkDerivation {
name = "toolbus-1.2.2";
builder = ./builder.sh;
src = fetchurl {
url = http://nixos.org/tarballs/toolbus-1.2.2.tar.gz;
md5 = "887349b097006c0883e1948797349a50";
};
java = if javaAdapter then true else false;
jdk = if javaAdapter then jdk else null;
inherit toolbuslib atermjava aterm yacc flex tcltk;
buildInputs = [toolbuslib atermjava aterm yacc flex jdk tcltk] ;
}

View file

@ -1,515 +0,0 @@
diff -urN cil.orig/Makefile.cil.in cil/Makefile.cil.in
--- cil.orig/Makefile.cil.in 2005-06-01 14:37:13.000000000 +0200
+++ cil/Makefile.cil.in 2005-11-21 10:45:48.000000000 +0100
@@ -75,6 +75,7 @@
canonicalize heap oneret partial simplemem simplify \
dataslicing \
testcil \
+ atermprinter \
$(CILLY_FEATURES) \
feature_config
# ww: we don't want "maincil" in an external cil library (cil.cma),
diff -urN cil.orig/src/ext/atermprinter.ml cil/src/ext/atermprinter.ml
--- cil.orig/src/ext/atermprinter.ml 1970-01-01 01:00:00.000000000 +0100
+++ cil/src/ext/atermprinter.ml 2005-11-21 11:14:44.000000000 +0100
@@ -0,0 +1,489 @@
+open Cil
+open Pretty
+open List
+open String
+open Printf
+module S = String
+module E = Errormsg
+module H = Hashtbl
+module IH = Inthash
+
+let outputfilename = ref "cil.aterm"
+let trace p = eprintf "%s" (p ^ "\n") ; flush stderr
+let invalidStmt = mkStmt (Instr [])
+let id = fun x -> x
+let compose f g x = (f (g x))
+let (@) = compose
+let pSpace = text " "
+let foldl1 op ls = match ls with
+ | (x::xs) -> fold_left op x xs
+ | _ -> raise (Invalid_argument "foldl1 should not take an empty list")
+let pPacked d l r = l ++ d ++ r
+let pParens d = pPacked d (text "(") (text ")")
+let pBraced d = pPacked d (text "{") (text "}")
+let pSquared d = pPacked d (text "[") (text "]")
+let pSpaced d = pPacked d pSpace pSpace
+let pBool b = (pSpaced @ text @ S.capitalize @ string_of_bool) b
+let pInt64 i = text (Int64.to_string i)
+let pSeqSep sep xs = match xs with
+ | [] -> nil
+ | _ -> foldl1 (pPacked sep) xs
+let pCommaSep xs = pSeqSep (text ",") xs
+let pPair (a,b) = (pSpaced @ pParens @ pCommaSep) [a;b]
+let pTriplet (a,b,c) = (pSpaced @ pParens @ pCommaSep) [a;b;c]
+let pSemiColSep xs = pSeqSep (text ";") xs
+let pTriple f g h (a,b,c) = (f a, g b, h c)
+let pDouble f g (a,b) = (f a, g b)
+let pOption p m = match m with
+ | None -> text "None()"
+ | Some v -> text "Some" ++ pParens( p v )
+let pSpParens = pSpaced @ pParens
+let pQuoted str = pPacked (text(escaped str)) (text "\"") (text "\"")
+let pList = pSpaced @ pSquared @ pCommaSep
+let pRecord = pSpaced @ pBraced @ pCommaSep
+
+class atermPrinter : cilPrinter =
+object (self)
+ inherit defaultCilPrinterClass
+
+ (* printing variable declarations; just store the varinfo *)
+ method pVDecl () (vinfo:varinfo) : doc = if !E.verboseFlag then trace "pVDecl"
+ ; self#pp_varinfo vinfo
+ (* printing variable uses; same as declarations; store the varinfo *)
+ method pVar (vinfo:varinfo) : doc = if !E.verboseFlag then trace "pVar" ;
+ self#pp_varinfo vinfo
+
+ method pLval () ((lh, off):lval) : doc = if !E.verboseFlag then trace "pLvalue" ;
+ text "Lvalue" ++ (pParens @ pCommaSep) [ self#pp_lhost lh ; self#pOffset nil off ]
+
+ (** we are not using the first argument which represents the base from which we are
+ offsetting, because we just want to generate a tree view of the CIL tree. For a tree view
+ this base case is not necessary **)
+ method pOffset (d:doc) (o:offset) : doc = if !E.verboseFlag then trace "pOffset" ;
+ match o with
+ | NoOffset -> text "Offset_NoOffset() "
+ | Field (finfo, off) -> text "Offset_Field" ++ (pParens @ pCommaSep) [ (self#pFieldDecl ()) finfo ; self#pOffset nil off ]
+ | Index (e, off) -> text "Offset_Index" ++ (pParens @ pCommaSep) [ self#pExp () e ; self#pOffset nil off ]
+
+ (*** INSTRUCTIONS ***)
+ method pInstr () (i:instr) : doc = if !E.verboseFlag then trace "pInstr" ;
+ match i with
+ | Set (lv,e,l) -> text "Set" ++ (pParens @ pCommaSep) [
+ self#pLval () lv ;
+ self#pExp () e ;
+ self#pp_location l ]
+ | Call (olv,e, elst, l) -> text "Call" ++ (pParens @ pCommaSep) [
+ pOption (self#pLval ()) olv ;
+ self#pExp () e ;
+ pList (map (self#pExp ()) elst) ;
+ self#pp_location l]
+ | Asm (attr, slst1, slvlst, selst, slst2, l) -> text "Asm" ++ (pParens @ pCommaSep) [
+ self#pAttrs () attr ;
+ (pList @ map pQuoted) slst1 ;
+ pList (map (pPair @ pDouble pQuoted (self#pLval ())) slvlst) ;
+ pList (map (pPair @ pDouble pQuoted (self#pExp ())) selst) ;
+ (pList @ map pQuoted) slst2 ;
+ self#pp_location l]
+
+ (* a statement itself is just a record of info about the statement
+ the different kinds of statements can be found at pStmtKind *)
+ method pStmt () (s:stmt) : doc = if !E.verboseFlag then trace "pStmt" ;
+ self#pp_stmtinfo s
+ method dStmt (out:out_channel) (i:int) (s:stmt) : unit = fprint out i (self#pStmt () s)
+
+ (* a block is just a record of info about the block of interest.
+ the real block is a stmtkind (see pStmtKind) *)
+ method dBlock (out:out_channel) (i:int) (b:block) : unit = fprint out i (self#pBlock () b)
+ method pBlock () (b:block) : doc = if !E.verboseFlag then trace "pBlock" ;
+ self#pp_blockinfo b
+
+ (*** GLOBALS ***)
+ method pGlobal () (g:global) : doc = if !E.verboseFlag then trace "pGlobal" ; (* global (vars, types, etc.) *)
+ match g with
+ | GType (typ , l) -> text "GlobalType" ++ (pParens @ pCommaSep) [ self#pp_typeinfo typ ; self#pp_location l ]
+ | GCompTag (comp, l) -> text "GlobalCompTag" ++ (pParens @ pCommaSep) [ self#pp_compinfo comp ; self#pp_location l ]
+ | GCompTagDecl (comp, l) -> text "GlobalCompTagDecl" ++ (pParens @ pCommaSep) [ self#pp_compinfo comp ; self#pp_location l ]
+ | GEnumTag (enum, l) -> text "GlobalEnumTag" ++ (pParens @ pCommaSep) [ self#pp_enuminfo enum ; self#pp_location l ]
+ | GEnumTagDecl (enum, l) -> text "GlobalEnumTagDecl" ++ (pParens @ pCommaSep) [ self#pp_enuminfo enum ; self#pp_location l ]
+ | GVarDecl (vinf, l) -> text "GlobalVarDecl" ++ (pParens @ pCommaSep) [ self#pp_varinfo vinf ; self#pp_location l ]
+ | GVar (vinf, iinf, l) -> text "GlobalVar" ++ (pParens @ pCommaSep) [ self#pp_varinfo vinf ; self#pp_initinfo iinf ; self#pp_location l ]
+ | GFun (fdec, l) -> text "GlobalFun" ++ (pParens @ pCommaSep) [ self#pp_fundec fdec ; self#pp_location l ]
+ | GAsm (str , l) -> text "GlobalAsm" ++ (pParens @ pCommaSep) [ pQuoted str ; self#pp_location l ]
+ | GPragma (attr, l) -> text "GlobalPragma" ++ (pParens @ pCommaSep) [ (fun (doc1, bool1) -> doc1) (self#pAttr attr)
+ ; self#pp_location l
+ ]
+ | GText str -> text "GlobalText" ++ pParens( pQuoted str)
+ method dGlobal (out:out_channel) (g:global) : unit = fprint out 80 (self#pGlobal () g)
+
+ (* a fielddecl is just a record containing info about the decl *)
+ method pFieldDecl () : fieldinfo -> doc = if !E.verboseFlag then trace "pFieldDecl" ;
+ self#pp_fieldinfo
+
+ (*** TYPES ***)
+ method pType (nameOpt: doc option) (* Whether we are declaring a name or
+ * we are just printing a type *)
+ () (t:typ) = if !E.verboseFlag then trace "pType" ; (* use of some type *)
+ match t with
+ | TVoid attr -> text "TVoid" ++ pParens( self#pAttrs () attr)
+ | TInt (ikin, attr) -> text "TInt" ++ (pParens @ pCommaSep) [ self#pp_ikind ikin ; self#pAttrs () attr ]
+ | TFloat (fkin, attr) -> text "TFloat" ++ (pParens @ pCommaSep) [ self#pp_fkind fkin ; self#pAttrs () attr ]
+ | TPtr (t , attr) -> text "TPtr" ++ (pParens @ pCommaSep) [ self#pType None () t ; self#pAttrs () attr ]
+ | TArray (t, e, attr) -> text "TArray" ++ (pParens @ pCommaSep) [ self#pType None () t ;
+ pOption (self#pExp ()) e ; self#pAttrs () attr ]
+ | TFun (t, olst, b, attr) -> text "TFun" ++ (pParens @ pCommaSep) [
+ self#pType None () t ;
+ pOption (pList @ (map ( pTriplet
+ @ (pTriple (pQuoted) (self#pType None ()) (self#pAttrs ()))
+ )
+ )
+ )
+ olst ;
+ pBool b ;
+ self#pAttrs () attr]
+ | TNamed (tinfo, attr) -> text "TNamed" ++ (pParens @ pCommaSep) [ self#pp_typeinfo tinfo ; self#pAttrs () attr ]
+ | TComp (cinfo, attr) -> text "TComp" ++ (pParens @ pCommaSep) [ (text @ string_of_int) cinfo.ckey ;
+ self#pAttrs () attr]
+ | TEnum (einfo, attr) -> text "TEnum" ++ (pParens @ pCommaSep) [ self#pp_enuminfo einfo ; self#pAttrs () attr ]
+ | TBuiltin_va_list (attr) -> text "TBuiltin_va_list" ++ pParens( self#pAttrs () attr)
+
+ (*** ATTRIBUTES ***)
+ method pAttr (Attr(an, args) : attribute) : (doc * bool) = if !E.verboseFlag then trace "pAttr" ;
+ ( text "Attr" ++ (pParens @ pCommaSep) [ pQuoted an ; pList (map (self#pAttrParam ()) args) ]
+ , false
+ )
+
+ method pAttrParam () (p:attrparam) : doc = if !E.verboseFlag then trace "pAttrParam" ;
+ match p with
+ | AInt (i) -> text "AInt" ++ pParens( pQuoted (string_of_int i))
+ | AStr (s) -> text "AStr" ++ pParens( pQuoted s)
+ | ACons (s, args) -> text "ACons" ++ (pParens @ pCommaSep) [ pQuoted s ; pList (map (self#pAttrParam ()) args) ]
+ | ASizeOf (t) -> text "ASizeOf" ++ pParens( self#pType None () t)
+ | ASizeOfE (arg) -> text "ASizeOfE" ++ pParens( self#pAttrParam () arg)
+ | ASizeOfS (tsig) -> text "ASizeOfS" ++ pParens( self#pp_typsig tsig)
+ | AAlignOf (t) -> text "AAlignOf" ++ pParens( self#pType None () t)
+ | AAlignOfE (arg) -> text "AAlignOfE" ++ pParens( self#pAttrParam () arg)
+ | AAlignOfS (tsig) -> text "AAlignOfS" ++ pParens( self#pp_typsig tsig)
+ | AUnOp (uop, arg) -> text "AUnOp" ++ (pParens @ pCommaSep) [ self#pp_unop uop ; self#pAttrParam () arg ]
+ | ABinOp (bop, arg1, arg2) -> text "ABinOp" ++ (pParens @ pCommaSep) [ self#pp_binop bop
+ ; self#pAttrParam () arg1
+ ; self#pAttrParam () arg2 ]
+ | ADot (arg, s) -> text "ADot" ++ (pParens @ pCommaSep) [ self#pAttrParam () arg ; pQuoted s]
+
+ method pAttrs () (attr:attributes) : doc = if !E.verboseFlag then trace "pAttrs" ;
+ text "Attributes" ++ pParens(
+ pList (map (fst @ self#pAttr) attr)
+ )
+
+ (*** LABELS ***)
+ method pLabel () (l:label) : doc = if !E.verboseFlag then trace "pLabel" ;
+ match l with
+ | Label (s,l,b) -> text "Label" ++ (pParens @ pCommaSep) [
+ pQuoted s ;
+ self#pp_location l ;
+ pBool b ]
+ | Case (e,l) -> text "Case" ++ (pParens @ pCommaSep) [
+ self#pExp () e ;
+ self#pp_location l ]
+ | Default (l) -> text "Default" ++ pParens( self#pp_location l)
+
+ (*** printing out locations as line directives is not necessary
+ because we are printing the tree structure and locations are
+ present everywhere ***)
+ method pLineDirective : ?forcefile:bool -> location -> doc = fun ?forcefile _ -> nil
+
+ (*** STATEMENT KINDS ***)
+ method pStmtKind s () (sk:stmtkind) : doc = if !E.verboseFlag then trace "pStmtKind" ;
+ match sk with
+ | Instr (ilst) -> text "Instr" ++ pParens( pList (map (self#pInstr ()) ilst))
+ | Return (oe, l) -> text "Return" ++ (pParens @ pCommaSep) [ pOption (self#pExp ()) oe ; self#pp_location l ]
+ | Goto (stmtref, l) -> text "Goto" ++ (pParens @ pCommaSep) [ self#pStmt () !stmtref ; self#pp_location l ]
+ | Break (l) -> text "Break" ++ pParens( self#pp_location l)
+ | Continue (l) -> text "Continue" ++ pParens( self#pp_location l)
+ | If (e, b1, b2, l) -> text "If" ++ (pParens @ pCommaSep) [
+ self#pExp () e ;
+ self#pBlock () b1 ;
+ self#pBlock () b2 ;
+ self#pp_location l ]
+ | Switch (e,b,stlst,l) -> text "Switch" ++ (pParens @ pCommaSep) [
+ self#pExp () e ;
+ self#pBlock () b ;
+ pList (map (self#pStmt ()) stlst) ;
+ self#pp_location l ]
+ | Loop (b,l,os1, os2) -> text "Loop" ++ (pParens @ pCommaSep) [
+ self#pBlock () b ;
+ self#pp_location l ;
+ pOption (self#pStmt ()) os1 ;
+ pOption (self#pStmt ()) os2 ]
+ | Block (b) -> text "Block" ++ pParens( self#pBlock () b)
+ | TryFinally (b1,b2,l) -> text "TryFinally" ++ (pParens @ pCommaSep) [
+ self#pBlock () b1 ;
+ self#pBlock () b2 ;
+ self#pp_location l ]
+ | TryExcept (b1, pr, b2, l) -> text "TryExcept" ++ (pParens @ pCommaSep) [
+ self#pBlock () b1 ;
+ ( pPair
+ @ pDouble (pList @ map (self#pInstr ()))
+ (self#pExp ())
+ ) pr ;
+ self#pBlock () b2 ;
+ self#pp_location l ]
+
+ (*** EXPRESSIONS ***)
+
+ method pExp () (e:exp) : doc = if !E.verboseFlag then trace "pExp" ;
+ match e with
+ | Const (c) -> text "Constant" ++ pParens( self#pp_constant c)
+ | Lval (lh,off) -> text "Lvalue" ++ (pParens @ pCommaSep) [self#pp_lhost lh ; self#pOffset nil off ]
+ | SizeOf (t) -> text "SizeOfType" ++ pParens( self#pType None () t)
+ | SizeOfE (e) -> text "SizeOfExp" ++ pParens( self#pExp () e)
+ | SizeOfStr (s) -> text "SizeOfString" ++ pParens( pQuoted s)
+ | AlignOf (t) -> text "AlignOfType" ++ pParens( self#pType None () t)
+ | AlignOfE (e) -> text "AlignOfExp" ++ pParens( self#pExp () e)
+ | UnOp (uop, e, t) -> text "UnOp" ++ (pParens @ pCommaSep) [
+ self#pp_unop uop ;
+ self#pExp () e ;
+ self#pType None () t ]
+ | BinOp (bop, e1, e2, t) -> text "BinOp" ++ (pParens @ pCommaSep) [
+ self#pp_binop bop ;
+ self#pExp () e1 ;
+ self#pExp () e2 ;
+ self#pType None () t ]
+ | CastE (t,e) -> text "Cast" ++ (pParens @ pCommaSep) [ self#pType None () t ; self#pExp () e]
+ | AddrOf (lv) -> text "AddressOf" ++ pParens( self#pLval () lv)
+ | StartOf (lv) -> text "StartOf" ++ pParens( self#pLval () lv)
+
+ (*** INITIALIZERS ***)
+ method pInit () (i:init) : doc = if !E.verboseFlag then trace "pInit" ;
+ match i with
+ | SingleInit (e) -> text "SingleInit" ++ pParens( self#pExp () e)
+ | CompoundInit (t, oilst) -> text "CompoundInit" ++ (pParens @ pCommaSep) [ self#pType None () t ;
+ pList (map ( pPair
+ @ pDouble (self#pOffset nil) (self#pInit ())
+ )
+ oilst
+ ) ]
+ method dInit (out:out_channel) (i:int) (init1:init) : unit = fprint out i (self#pInit () init1)
+
+ (*** auxiliary methods ***)
+ (* Mart: hmmmm *)
+ method private pp_storage (s:storage) : doc =
+ let tok = match s with
+ | NoStorage -> "NoStorage"
+ | Static -> "Static"
+ | Register -> "Register"
+ | Extern -> "Extern"
+ in pQuoted ("Storage" ^ tok)
+
+ method private pp_typeinfo (tinfo:typeinfo) : doc = if !E.verboseFlag then trace "pp_typeinfo" ;
+ text "Typeinfo" ++ (pParens @ pCommaSep) [
+ pQuoted tinfo.tname ;
+ self#pType None () tinfo.ttype ;
+ pBool tinfo.treferenced ]
+
+ method private pp_fieldinfo (finfo:fieldinfo) : doc = if !E.verboseFlag then trace "pp_fieldinfo" ;
+ text "Fieldinfo" ++ (pParens @ pCommaSep) [
+ pQuoted finfo.fname ;
+ self#pType None () finfo.ftype ;
+ pOption (pQuoted @ string_of_int) finfo.fbitfield ;
+ self#pAttrs () finfo.fattr ;
+ self#pp_location finfo.floc ]
+
+ method private pp_compinfo (cinfo:compinfo) : doc = if !E.verboseFlag then trace "pp_compinfo" ;
+ text "Compinfo" ++ (pParens @ pCommaSep) [
+ pBool cinfo.cstruct ;
+ pQuoted cinfo.cname ;
+ text (string_of_int cinfo.ckey) ;
+ pList (map (self#pFieldDecl ()) cinfo.cfields) ;
+ self#pAttrs () cinfo.cattr ;
+ pBool cinfo.cdefined ;
+ pBool cinfo.creferenced ]
+
+ method private pp_enuminfo (einfo:enuminfo) : doc = if !E.verboseFlag then trace "pp_enuminfo" ;
+ text "Enuminfo" ++ (pParens @ pCommaSep) [
+ pQuoted einfo.ename ;
+ pList (map ( pTriplet
+ @ (pTriple pQuoted (self#pExp ()) self#pp_location)
+ )
+ einfo.eitems) ;
+ self#pAttrs () einfo.eattr ;
+ pBool einfo.ereferenced ]
+
+ method private pp_location (loc:location) : doc = if !E.verboseFlag then trace "pp_location" ;
+ text "Location" ++ (pParens @ pCommaSep) [
+ text (string_of_int loc.line) ;
+ pQuoted loc.file ;
+ text (string_of_int loc.byte) ]
+
+ method private pp_varinfo (vinfo:varinfo) : doc = if !E.verboseFlag then trace "pp_varinfo" ;
+ text "Varinfo" ++ (pParens @ pCommaSep) [
+ pQuoted vinfo.vname ;
+ self#pType None () vinfo.vtype ;
+ self#pAttrs () vinfo.vattr ;
+ self#pp_storage vinfo.vstorage ;
+ pBool vinfo.vglob ;
+ pBool vinfo.vinline ;
+ self#pp_location vinfo.vdecl ;
+ text (string_of_int vinfo.vid) ;
+ pBool vinfo.vaddrof ;
+ pBool vinfo.vreferenced ]
+
+ method private pp_initinfo (iinfo:initinfo) : doc = if !E.verboseFlag then trace "pp_initinfo" ;
+ text "Initinfo" ++ pParens(
+ pOption (self#pInit ()) iinfo.init)
+
+ method private pp_fundec (fdec:fundec) : doc = if !E.verboseFlag then trace "pp_fundec" ;
+ text "Fundec" ++ (pParens @ pCommaSep) [
+ self#pp_varinfo fdec.svar ;
+ pList (map self#pp_varinfo fdec.sformals) ;
+ pList (map self#pp_varinfo fdec.slocals) ;
+ text (string_of_int fdec.smaxid) ;
+ self#pBlock () fdec.sbody ;
+ pOption (pSpParens @ text @ string_of_int) fdec.smaxstmtid ;
+ pList (map (self#pStmt ()) fdec.sallstmts) ]
+
+ method private pp_ikind (ikin:ikind) : doc =
+ let tok = match ikin with
+ | IChar -> "IChar"
+ | ISChar -> "ISChar"
+ | IUChar -> "IUChar"
+ | IInt -> "IInt"
+ | IUInt -> "IUInt"
+ | IShort -> "IShort"
+ | IUShort -> "IUShort"
+ | ILong -> "ILong"
+ | IULong -> "IULong"
+ | ILongLong -> "ILongLong"
+ | IULongLong -> "IULongLong"
+ in pQuoted ("Ikind" ^ tok)
+
+ method private pp_fkind (fkin:fkind) : doc =
+ let tok = match fkin with
+ | FFloat -> "FFloat"
+ | FDouble -> "FDouble"
+ | FLongDouble -> "FLongDouble"
+ in pQuoted ("Fkind" ^ tok)
+
+ method private pp_typsig (tsig:typsig) : doc = if !E.verboseFlag then trace "pp_typsig" ;
+ match tsig with
+ | TSArray (tsig2, oe, attr) -> text "TSArray" ++ (pParens @ pCommaSep) [
+ self#pp_typsig tsig2 ;
+ pOption pInt64 oe ;
+ self#pAttrs () attr ]
+ | TSPtr (tsig2, attr) -> text "TSPtr" ++ (pParens @ pCommaSep) [
+ self#pp_typsig tsig2 ;
+ self#pAttrs () attr ]
+ | TSComp (b, s, attr) -> text "TSComp" ++ (pParens @ pCommaSep) [
+ pBool b ;
+ pQuoted s ;
+ self#pAttrs () attr ]
+ | TSFun (tsig2, tsiglst, b, attr) -> text "TSFun" ++ (pParens @ pCommaSep) [
+ self#pp_typsig tsig2 ;
+ pList (map self#pp_typsig tsiglst) ;
+ pBool b ;
+ self#pAttrs () attr ]
+ | TSEnum (s, attr) -> text "TSEnum" ++ (pParens @ pCommaSep) [
+ pQuoted s ;
+ self#pAttrs () attr ]
+ | TSBase (t) -> text "TSBase" ++ pParens( self#pType None () t)
+
+
+ method private pp_unop (uop:unop) : doc =
+ let tok = match uop with
+ | Neg -> "Neg"
+ | BNot -> "BNot"
+ | LNot -> "LNot"
+ in pQuoted ("UnOp" ^ tok)
+
+ method private pp_binop (bop:binop) : doc =
+ let tok = match bop with
+ | PlusA -> "PlusA"
+ | PlusPI -> "PlusPI"
+ | IndexPI -> "IndexPI"
+ | MinusA -> "MinusA"
+ | MinusPI -> "MinusPI"
+ | MinusPP -> "MinusPP"
+ | Mult -> "Mult"
+ | Div -> "Div"
+ | Mod -> "Mod"
+ | Shiftlt -> "Shiftlt"
+ | Shiftrt -> "Shiftrt"
+ | Lt -> "Lt"
+ | Gt -> "Gt"
+ | Le -> "Le"
+ | Ge -> "Ge"
+ | Eq -> "Eq"
+ | Ne -> "Ne"
+ | BAnd -> "BAnd"
+ | BXor -> "BXor"
+ | BOr -> "BOr"
+ | LAnd -> "LAnd"
+ | LOr -> "LOr"
+ in pQuoted ("BinOp" ^ tok )
+
+ method private pp_constant (c:constant) : doc = if !E.verboseFlag then trace "pp_constant" ;
+ match c with
+ | CInt64 (i, ikin, os) -> text "CInt64" ++ (pParens @ pCommaSep) [
+ pQuoted (Int64.to_string i) ;
+ self#pp_ikind ikin ;
+ pOption pQuoted os ]
+ | CStr (s) -> text "CStr" ++ pParens( pQuoted s)
+ | CWStr (ilist) -> text "CWStr" ++ pParens( pList (map ( text @ Int64.to_string) ilist))
+ | CChr (c) -> text "CChr" ++ pParens( text "\"" ++ text (Char.escaped c) ++ text "\"")
+ | CReal (f, fkin, os) -> text "CReal" ++ (pParens @ pCommaSep) [ pQuoted (sprintf "%f0" f) ;
+ self#pp_fkind fkin ;
+ pOption pQuoted os ]
+
+ method private pp_lhost (lh:lhost) : doc = if !E.verboseFlag then trace "pp_lhost" ;
+ match lh with
+ | Var (vinfo) -> text "Var" ++ pParens( self#pp_varinfo vinfo)
+ | Mem (e) -> text "Mem" ++ pParens( self#pExp () e)
+
+ method private pp_blockinfo (b:block) : doc = if !E.verboseFlag then trace "pp_blockinfo" ;
+ text "Block" ++ (pParens @ pCommaSep) [
+ self#pAttrs () b.battrs ;
+ pList (map (self#pStmt ()) b.bstmts) ]
+
+ method private pp_stmtinfo (sinfo:stmt) : doc = if !E.verboseFlag then trace "pp_stmtinfo" ;
+ text "Stmt" ++ (pParens @ pCommaSep) [
+ pList (map (self#pLabel ()) sinfo.labels) ;
+ self#pStmtKind invalidStmt () sinfo.skind ;
+ text (string_of_int sinfo.sid) ;
+ pList (map self#pp_stmtinfo sinfo.succs) ;
+ pList (map self#pp_stmtinfo sinfo.preds) ]
+end
+
+let ppFile (f:file) (pp:cilPrinter) : doc = if !E.verboseFlag then trace "ppFile" ;
+ text "File" ++ (pParens @ pCommaSep) [
+ pQuoted f.fileName ;
+ pList (map (pp#pGlobal ()) f.globals) ]
+
+(* we need a different more flexible mapGlobals
+ we only visit globals and not global init;
+ use mapGlobinits *)
+let mapGlobals2 (fl: file)
+ (doone: global -> 'a) : 'a list =
+ List.map doone fl.globals
+
+(* We redefine dumpFile because we don't want a header in our
+ file telling us it was generated with CIL blabla *)
+let dumpFile (pp: cilPrinter) (out : out_channel) file =
+ printDepth := 99999;
+ Pretty.fastMode := true;
+ if !E.verboseFlag then ignore (E.log "printing file %s\n" file.fileName);
+ let file_doc = ppFile file pp in
+ fprint out 80 file_doc;
+ flush out
+
+let feature : featureDescr =
+ { fd_name = "printaterm";
+ fd_enabled = ref false;
+ fd_description = "printing the current CIL AST to an ATerm";
+ fd_extraopt = [("--atermfile", Arg.String (fun s -> outputfilename := s), "=<filename>: writes the ATerm to <filename>");];
+ fd_doit = (function (f: file) ->
+ let channel = open_out !outputfilename in
+ let printer = new atermPrinter
+ in dumpFile printer channel f
+ ; close_out channel
+ );
+ fd_post_check = false;
+ }
diff -urN cil.orig/src/maincil.ml cil/src/maincil.ml
--- cil.orig/src/maincil.ml 2005-06-01 14:37:13.000000000 +0200
+++ cil/src/maincil.ml 2005-11-21 10:45:34.000000000 +0100
@@ -105,6 +105,7 @@
Simplemem.feature;
Simplify.feature;
Dataslicing.feature;
+ Atermprinter.feature;
]
@ Feature_config.features

View file

@ -1,12 +0,0 @@
{ stdenv, fetchurl, ocaml, perl }:
stdenv.mkDerivation {
name = "cil-aterm-1.3.3";
src = fetchurl {
url = http://manju.cs.berkeley.edu/cil/distrib/cil-1.3.3.tar.gz;
md5 = "dafd350c154990728efb35a7073ca81a";
};
patches = [./atermprinter.patch];
buildInputs = [ ocaml perl ];
inherit ocaml perl;
}

View file

@ -1,593 +0,0 @@
diff -urN cil-old/bin/CilConfig.pm.in cil-new/bin/CilConfig.pm.in
--- cil-old/bin/CilConfig.pm.in 2005-11-22 06:34:41.000000000 +0100
+++ cil-new/bin/CilConfig.pm.in 2006-09-13 13:52:44.000000000 +0200
@@ -1,7 +1,7 @@
-use lib "@CILHOME@/lib"; # The libraries are in the lib directory
+use lib "@prefix@/lib"; # The libraries are in the lib directory
$::archos = "@ARCHOS@";
$::cc = "@CC@";
-$::cilhome = "@CILHOME@";
+$::cilhome = "@prefix@";
$::default_mode = "@DEFAULT_CIL_MODE@";
diff -urN cil-old/Makefile.cil.in cil-new/Makefile.cil.in
--- cil-old/Makefile.cil.in 2005-11-22 06:34:41.000000000 +0100
+++ cil-new/Makefile.cil.in 2006-09-13 13:52:09.000000000 +0200
@@ -78,6 +78,7 @@
canonicalize heap oneret partial simplemem simplify \
dataslicing \
testcil \
+ atermprinter \
$(CILLY_FEATURES) \
feature_config
# ww: we don't want "maincil" in an external cil library (cil.cma),
@@ -536,6 +537,8 @@
prefix = @prefix@
exec_prefix = @exec_prefix@
+bindir = @prefix@/bin
+objdir = @prefix@/$(OBJDIR)
libdir = @libdir@
pkglibdir = $(libdir)/cil
datadir = @datadir@
@@ -554,6 +557,11 @@
$(INSTALL_DATA) $(install_lib) $(DESTDIR)$(pkglibdir)
$(INSTALL) -d $(DESTDIR)$(pkgdatadir)
$(INSTALL_DATA) $(addprefix lib/, $(filter %.pm, $(DISTRIB_LIB))) $(DESTDIR)$(pkgdatadir)
+ $(INSTALL) -d $(bindir)
+ $(INSTALL) -d $(objdir)
+ $(INSTALL) bin/* $(bindir)
+ $(INSTALL_DATA) lib/* $(bindir)
+ $(INSTALL) $(OBJDIR)/*.exe $(objdir)
cil.spec: cil.spec.in
./config.status $@
diff -urN cil-old/ocamlutil/Makefile.ocaml cil-new/ocamlutil/Makefile.ocaml
--- cil-old/ocamlutil/Makefile.ocaml 2005-11-22 06:34:41.000000000 +0100
+++ cil-new/ocamlutil/Makefile.ocaml 2006-09-13 13:52:09.000000000 +0200
@@ -135,6 +135,7 @@
CAMLFLAGS =$(OPT_FLAGS) -I $(OBJDIR)
+
# sm: two styles for echoing compilation progress:
# style 1, by George:
# - print English descriptions of what's happening
@@ -152,20 +153,12 @@
# $(AT) - put this before shell commands which are to be executed,
# and also printed in style 2
# $(ECHO) - use in place of '@' for things not printed in either style
-ifdef ECHOSTYLE_SCOTT
- # 'true' silently consumes its arguments, whereas 'echo' prints them
- NARRATIVE := true
- COMMAND := echo
- AT :=
- ECHO := @
-else
- NARRATIVE := echo
- COMMAND := true
- # change these next two definitions to <empty> to echo everything,
- # or leave as @ to suppress echoing
- AT := @
- ECHO := @
-endif
+
+# 'true' silently consumes its arguments, whereas 'echo' prints them
+NARRATIVE := true
+COMMAND := echo
+AT :=
+ECHO := @
ifdef PREPROC
COMPILEFLAGS += -pp "$(PREPROC)$"
@@ -361,4 +354,4 @@
endif
listmodules:
- @echo $(MODULES)
\ No newline at end of file
+ @echo $(MODULES)
diff -urN cil-old/src/ext/atermprinter.ml cil-new/src/ext/atermprinter.ml
--- cil-old/src/ext/atermprinter.ml 1970-01-01 01:00:00.000000000 +0100
+++ cil-new/src/ext/atermprinter.ml 2006-09-13 13:52:09.000000000 +0200
@@ -0,0 +1,488 @@
+open Cil
+open Pretty
+open List
+open String
+open Printf
+module S = String
+module E = Errormsg
+module H = Hashtbl
+module IH = Inthash
+
+let outputfilename = ref "cil.aterm"
+let trace p = eprintf "%s" (p ^ "\n") ; flush stderr
+let invalidStmt = mkStmt (Instr [])
+let id = fun x -> x
+let compose f g x = (f (g x))
+let (@) = compose
+let pSpace = text " "
+let foldl1 op ls = match ls with
+ | (x::xs) -> fold_left op x xs
+ | _ -> raise (Invalid_argument "foldl1 should not take an empty list")
+let pPacked d l r = l ++ d ++ r
+let pParens d = pPacked d (text "(") (text ")")
+let pBraced d = pPacked d (text "{") (text "}")
+let pSquared d = pPacked d (text "[") (text "]")
+let pSpaced d = pPacked d pSpace pSpace
+let pBool b = (pSpaced @ text @ S.capitalize @ string_of_bool) b
+let pInt64 i = text (Int64.to_string i)
+let pSeqSep sep xs = match xs with
+ | [] -> nil
+ | _ -> foldl1 (pPacked sep) xs
+let pCommaSep xs = pSeqSep (text ",") xs
+let pPair (a,b) = (pSpaced @ pParens @ pCommaSep) [a;b]
+let pTriplet (a,b,c) = (pSpaced @ pParens @ pCommaSep) [a;b;c]
+let pSemiColSep xs = pSeqSep (text ";") xs
+let pTriple f g h (a,b,c) = (f a, g b, h c)
+let pDouble f g (a,b) = (f a, g b)
+let pOption p m = match m with
+ | None -> text "None()"
+ | Some v -> text "Some" ++ pParens( p v )
+let pSpParens = pSpaced @ pParens
+let pQuoted str = pPacked (text(escaped str)) (text "\"") (text "\"")
+let pList = pSpaced @ pSquared @ pCommaSep
+let pRecord = pSpaced @ pBraced @ pCommaSep
+
+class atermPrinter : cilPrinter =
+object (self)
+ inherit defaultCilPrinterClass
+
+ (* printing variable declarations; just store the varinfo *)
+ method pVDecl () (vinfo:varinfo) : doc = if !E.verboseFlag then trace "pVDecl"
+ ; self#pp_varinfo vinfo
+ (* printing variable uses; same as declarations; store the varinfo *)
+ method pVar (vinfo:varinfo) : doc = if !E.verboseFlag then trace "pVar" ;
+ self#pp_varinfo vinfo
+
+ method pLval () ((lh, off):lval) : doc = if !E.verboseFlag then trace "pLvalue" ;
+ text "Lvalue" ++ (pParens @ pCommaSep) [ self#pp_lhost lh ; self#pOffset nil off ]
+
+ (** we are not using the first argument which represents the base from which we are
+ offsetting, because we just want to generate a tree view of the CIL tree. For a tree view
+ this base case is not necessary **)
+ method pOffset (d:doc) (o:offset) : doc = if !E.verboseFlag then trace "pOffset" ;
+ match o with
+ | NoOffset -> text "Offset_NoOffset() "
+ | Field (finfo, off) -> text "Offset_Field" ++ (pParens @ pCommaSep) [ (self#pFieldDecl ()) finfo ; self#pOffset nil off ]
+ | Index (e, off) -> text "Offset_Index" ++ (pParens @ pCommaSep) [ self#pExp () e ; self#pOffset nil off ]
+
+ (*** INSTRUCTIONS ***)
+ method pInstr () (i:instr) : doc = if !E.verboseFlag then trace "pInstr" ;
+ match i with
+ | Set (lv,e,l) -> text "Set" ++ (pParens @ pCommaSep) [
+ self#pLval () lv ;
+ self#pExp () e ;
+ self#pp_location l ]
+ | Call (olv,e, elst, l) -> text "Call" ++ (pParens @ pCommaSep) [
+ pOption (self#pLval ()) olv ;
+ self#pExp () e ;
+ pList (map (self#pExp ()) elst) ;
+ self#pp_location l]
+ | Asm (attr, slst1, slvlst, selst, slst2, l) -> text "Asm" ++ (pParens @ pCommaSep) [
+ self#pAttrs () attr ;
+ (pList @ map pQuoted) slst1 ;
+ pList (map (pPair @ pDouble pQuoted (self#pLval ())) slvlst) ;
+ pList (map (pPair @ pDouble pQuoted (self#pExp ())) selst) ;
+ (pList @ map pQuoted) slst2 ;
+ self#pp_location l]
+
+ (* a statement itself is just a record of info about the statement
+ the different kinds of statements can be found at pStmtKind *)
+ method pStmt () (s:stmt) : doc = if !E.verboseFlag then trace "pStmt" ;
+ self#pp_stmtinfo s
+ method dStmt (out:out_channel) (i:int) (s:stmt) : unit = fprint out i (self#pStmt () s)
+
+ (* a block is just a record of info about the block of interest.
+ the real block is a stmtkind (see pStmtKind) *)
+ method dBlock (out:out_channel) (i:int) (b:block) : unit = fprint out i (self#pBlock () b)
+ method pBlock () (b:block) : doc = if !E.verboseFlag then trace "pBlock" ;
+ self#pp_blockinfo b
+
+ (*** GLOBALS ***)
+ method pGlobal () (g:global) : doc = if !E.verboseFlag then trace "pGlobal" ; (* global (vars, types, etc.) *)
+ match g with
+ | GType (typ , l) -> text "GlobalType" ++ (pParens @ pCommaSep) [ self#pp_typeinfo typ ; self#pp_location l ]
+ | GCompTag (comp, l) -> text "GlobalCompTag" ++ (pParens @ pCommaSep) [ self#pp_compinfo comp ; self#pp_location l ]
+ | GCompTagDecl (comp, l) -> text "GlobalCompTagDecl" ++ (pParens @ pCommaSep) [ self#pp_compinfo comp ; self#pp_location l ]
+ | GEnumTag (enum, l) -> text "GlobalEnumTag" ++ (pParens @ pCommaSep) [ self#pp_enuminfo enum ; self#pp_location l ]
+ | GEnumTagDecl (enum, l) -> text "GlobalEnumTagDecl" ++ (pParens @ pCommaSep) [ self#pp_enuminfo enum ; self#pp_location l ]
+ | GVarDecl (vinf, l) -> text "GlobalVarDecl" ++ (pParens @ pCommaSep) [ self#pp_varinfo vinf ; self#pp_location l ]
+ | GVar (vinf, iinf, l) -> text "GlobalVar" ++ (pParens @ pCommaSep) [ self#pp_varinfo vinf ; self#pp_initinfo iinf ; self#pp_location l ]
+ | GFun (fdec, l) -> text "GlobalFun" ++ (pParens @ pCommaSep) [ self#pp_fundec fdec ; self#pp_location l ]
+ | GAsm (str , l) -> text "GlobalAsm" ++ (pParens @ pCommaSep) [ pQuoted str ; self#pp_location l ]
+ | GPragma (attr, l) -> text "GlobalPragma" ++ (pParens @ pCommaSep) [ (fun (doc1, bool1) -> doc1) (self#pAttr attr)
+ ; self#pp_location l
+ ]
+ | GText str -> text "GlobalText" ++ pParens( pQuoted str)
+ method dGlobal (out:out_channel) (g:global) : unit = fprint out 80 (self#pGlobal () g)
+
+ (* a fielddecl is just a record containing info about the decl *)
+ method pFieldDecl () : fieldinfo -> doc = if !E.verboseFlag then trace "pFieldDecl" ;
+ self#pp_fieldinfo
+
+ (*** TYPES ***)
+ method pType (nameOpt: doc option) (* Whether we are declaring a name or
+ * we are just printing a type *)
+ () (t:typ) = if !E.verboseFlag then trace "pType" ; (* use of some type *)
+ match t with
+ | TVoid attr -> text "TVoid" ++ pParens( self#pAttrs () attr)
+ | TInt (ikin, attr) -> text "TInt" ++ (pParens @ pCommaSep) [ self#pp_ikind ikin ; self#pAttrs () attr ]
+ | TFloat (fkin, attr) -> text "TFloat" ++ (pParens @ pCommaSep) [ self#pp_fkind fkin ; self#pAttrs () attr ]
+ | TPtr (t , attr) -> text "TPtr" ++ (pParens @ pCommaSep) [ self#pType None () t ; self#pAttrs () attr ]
+ | TArray (t, e, attr) -> text "TArray" ++ (pParens @ pCommaSep) [ self#pType None () t ;
+ pOption (self#pExp ()) e ; self#pAttrs () attr ]
+ | TFun (t, olst, b, attr) -> text "TFun" ++ (pParens @ pCommaSep) [
+ self#pType None () t ;
+ pOption (pList @ (map ( pTriplet
+ @ (pTriple (pQuoted) (self#pType None ()) (self#pAttrs ()))
+ )
+ )
+ )
+ olst ;
+ pBool b ;
+ self#pAttrs () attr]
+ | TNamed (tinfo, attr) -> text "TNamed" ++ (pParens @ pCommaSep) [ self#pp_typeinfo tinfo ; self#pAttrs () attr ]
+ | TComp (cinfo, attr) -> text "TComp" ++ (pParens @ pCommaSep) [ (text @ string_of_int) cinfo.ckey ;
+ self#pAttrs () attr]
+ | TEnum (einfo, attr) -> text "TEnum" ++ (pParens @ pCommaSep) [ self#pp_enuminfo einfo ; self#pAttrs () attr ]
+ | TBuiltin_va_list (attr) -> text "TBuiltin_va_list" ++ pParens( self#pAttrs () attr)
+
+ (*** ATTRIBUTES ***)
+ method pAttr (Attr(an, args) : attribute) : (doc * bool) = if !E.verboseFlag then trace "pAttr" ;
+ ( text "Attr" ++ (pParens @ pCommaSep) [ pQuoted an ; pList (map (self#pAttrParam ()) args) ]
+ , false
+ )
+
+ method pAttrParam () (p:attrparam) : doc = if !E.verboseFlag then trace "pAttrParam" ;
+ match p with
+ | AInt (i) -> text "AInt" ++ pParens( pQuoted (string_of_int i))
+ | AStr (s) -> text "AStr" ++ pParens( pQuoted s)
+ | ACons (s, args) -> text "ACons" ++ (pParens @ pCommaSep) [ pQuoted s ; pList (map (self#pAttrParam ()) args) ]
+ | ASizeOf (t) -> text "ASizeOf" ++ pParens( self#pType None () t)
+ | ASizeOfE (arg) -> text "ASizeOfE" ++ pParens( self#pAttrParam () arg)
+ | ASizeOfS (tsig) -> text "ASizeOfS" ++ pParens( self#pp_typsig tsig)
+ | AAlignOf (t) -> text "AAlignOf" ++ pParens( self#pType None () t)
+ | AAlignOfE (arg) -> text "AAlignOfE" ++ pParens( self#pAttrParam () arg)
+ | AAlignOfS (tsig) -> text "AAlignOfS" ++ pParens( self#pp_typsig tsig)
+ | AUnOp (uop, arg) -> text "AUnOp" ++ (pParens @ pCommaSep) [ self#pp_unop uop ; self#pAttrParam () arg ]
+ | ABinOp (bop, arg1, arg2) -> text "ABinOp" ++ (pParens @ pCommaSep) [ self#pp_binop bop
+ ; self#pAttrParam () arg1
+ ; self#pAttrParam () arg2 ]
+ | ADot (arg, s) -> text "ADot" ++ (pParens @ pCommaSep) [ self#pAttrParam () arg ; pQuoted s]
+
+ method pAttrs () (attr:attributes) : doc = if !E.verboseFlag then trace "pAttrs" ;
+ text "Attributes" ++ pParens(
+ pList (map (fst @ self#pAttr) attr)
+ )
+
+ (*** LABELS ***)
+ method pLabel () (l:label) : doc = if !E.verboseFlag then trace "pLabel" ;
+ match l with
+ | Label (s,l,b) -> text "Label" ++ (pParens @ pCommaSep) [
+ pQuoted s ;
+ self#pp_location l ;
+ pBool b ]
+ | Case (e,l) -> text "Case" ++ (pParens @ pCommaSep) [
+ self#pExp () e ;
+ self#pp_location l ]
+ | Default (l) -> text "Default" ++ pParens( self#pp_location l)
+
+ (*** printing out locations as line directives is not necessary
+ because we are printing the tree structure and locations are
+ present everywhere ***)
+ method pLineDirective : ?forcefile:bool -> location -> doc = fun ?forcefile _ -> nil
+
+ (*** STATEMENT KINDS ***)
+ method pStmtKind s () (sk:stmtkind) : doc = if !E.verboseFlag then trace "pStmtKind" ;
+ match sk with
+ | Instr (ilst) -> text "Instr" ++ pParens( pList (map (self#pInstr ()) ilst))
+ | Return (oe, l) -> text "Return" ++ (pParens @ pCommaSep) [ pOption (self#pExp ()) oe ; self#pp_location l ]
+ | Goto (stmtref, l) -> text "Goto" ++ (pParens @ pCommaSep) [ self#pStmt () !stmtref ; self#pp_location l ]
+ | Break (l) -> text "Break" ++ pParens( self#pp_location l)
+ | Continue (l) -> text "Continue" ++ pParens( self#pp_location l)
+ | If (e, b1, b2, l) -> text "If" ++ (pParens @ pCommaSep) [
+ self#pExp () e ;
+ self#pBlock () b1 ;
+ self#pBlock () b2 ;
+ self#pp_location l ]
+ | Switch (e,b,stlst,l) -> text "Switch" ++ (pParens @ pCommaSep) [
+ self#pExp () e ;
+ self#pBlock () b ;
+ pList (map (self#pStmt ()) stlst) ;
+ self#pp_location l ]
+ | Loop (b,l,os1, os2) -> text "Loop" ++ (pParens @ pCommaSep) [
+ self#pBlock () b ;
+ self#pp_location l ;
+ pOption (self#pStmt ()) os1 ;
+ pOption (self#pStmt ()) os2 ]
+ | Block (b) -> text "Block" ++ pParens( self#pBlock () b)
+ | TryFinally (b1,b2,l) -> text "TryFinally" ++ (pParens @ pCommaSep) [
+ self#pBlock () b1 ;
+ self#pBlock () b2 ;
+ self#pp_location l ]
+ | TryExcept (b1, pr, b2, l) -> text "TryExcept" ++ (pParens @ pCommaSep) [
+ self#pBlock () b1 ;
+ ( pPair
+ @ pDouble (pList @ map (self#pInstr ()))
+ (self#pExp ())
+ ) pr ;
+ self#pBlock () b2 ;
+ self#pp_location l ]
+
+ (*** EXPRESSIONS ***)
+
+ method pExp () (e:exp) : doc = if !E.verboseFlag then trace "pExp" ;
+ match e with
+ | Const (c) -> text "Constant" ++ pParens( self#pp_constant c)
+ | Lval (lh,off) -> text "Lvalue" ++ (pParens @ pCommaSep) [self#pp_lhost lh ; self#pOffset nil off ]
+ | SizeOf (t) -> text "SizeOfType" ++ pParens( self#pType None () t)
+ | SizeOfE (e) -> text "SizeOfExp" ++ pParens( self#pExp () e)
+ | SizeOfStr (s) -> text "SizeOfString" ++ pParens( pQuoted s)
+ | AlignOf (t) -> text "AlignOfType" ++ pParens( self#pType None () t)
+ | AlignOfE (e) -> text "AlignOfExp" ++ pParens( self#pExp () e)
+ | UnOp (uop, e, t) -> text "UnOp" ++ (pParens @ pCommaSep) [
+ self#pp_unop uop ;
+ self#pExp () e ;
+ self#pType None () t ]
+ | BinOp (bop, e1, e2, t) -> text "BinOp" ++ (pParens @ pCommaSep) [
+ self#pp_binop bop ;
+ self#pExp () e1 ;
+ self#pExp () e2 ;
+ self#pType None () t ]
+ | CastE (t,e) -> text "Cast" ++ (pParens @ pCommaSep) [ self#pType None () t ; self#pExp () e]
+ | AddrOf (lv) -> text "AddressOf" ++ pParens( self#pLval () lv)
+ | StartOf (lv) -> text "StartOf" ++ pParens( self#pLval () lv)
+
+ (*** INITIALIZERS ***)
+ method pInit () (i:init) : doc = if !E.verboseFlag then trace "pInit" ;
+ match i with
+ | SingleInit (e) -> text "SingleInit" ++ pParens( self#pExp () e)
+ | CompoundInit (t, oilst) -> text "CompoundInit" ++ (pParens @ pCommaSep) [ self#pType None () t ;
+ pList (map ( pPair
+ @ pDouble (self#pOffset nil) (self#pInit ())
+ )
+ oilst
+ ) ]
+ method dInit (out:out_channel) (i:int) (init1:init) : unit = fprint out i (self#pInit () init1)
+
+ (*** auxiliary methods ***)
+ method private pp_storage (s:storage) : doc =
+ let tok = match s with
+ | NoStorage -> "NoStorage"
+ | Static -> "Static"
+ | Register -> "Register"
+ | Extern -> "Extern"
+ in text ("Storage_" ^ tok)
+
+ method private pp_typeinfo (tinfo:typeinfo) : doc = if !E.verboseFlag then trace "pp_typeinfo" ;
+ text "Typeinfo" ++ (pParens @ pCommaSep) [
+ pQuoted tinfo.tname ;
+ self#pType None () tinfo.ttype ;
+ pBool tinfo.treferenced ]
+
+ method private pp_fieldinfo (finfo:fieldinfo) : doc = if !E.verboseFlag then trace "pp_fieldinfo" ;
+ text "Fieldinfo" ++ (pParens @ pCommaSep) [
+ pQuoted finfo.fname ;
+ self#pType None () finfo.ftype ;
+ pOption (pQuoted @ string_of_int) finfo.fbitfield ;
+ self#pAttrs () finfo.fattr ;
+ self#pp_location finfo.floc ]
+
+ method private pp_compinfo (cinfo:compinfo) : doc = if !E.verboseFlag then trace "pp_compinfo" ;
+ text "Compinfo" ++ (pParens @ pCommaSep) [
+ pBool cinfo.cstruct ;
+ pQuoted cinfo.cname ;
+ text (string_of_int cinfo.ckey) ;
+ pList (map (self#pFieldDecl ()) cinfo.cfields) ;
+ self#pAttrs () cinfo.cattr ;
+ pBool cinfo.cdefined ;
+ pBool cinfo.creferenced ]
+
+ method private pp_enuminfo (einfo:enuminfo) : doc = if !E.verboseFlag then trace "pp_enuminfo" ;
+ text "Enuminfo" ++ (pParens @ pCommaSep) [
+ pQuoted einfo.ename ;
+ pList (map ( pTriplet
+ @ (pTriple pQuoted (self#pExp ()) self#pp_location)
+ )
+ einfo.eitems) ;
+ self#pAttrs () einfo.eattr ;
+ pBool einfo.ereferenced ]
+
+ method private pp_location (loc:location) : doc = if !E.verboseFlag then trace "pp_location" ;
+ text "Location" ++ (pParens @ pCommaSep) [
+ text (string_of_int loc.line) ;
+ pQuoted loc.file ;
+ text (string_of_int loc.byte) ]
+
+ method private pp_varinfo (vinfo:varinfo) : doc = if !E.verboseFlag then trace "pp_varinfo" ;
+ text "Varinfo" ++ (pParens @ pCommaSep) [
+ pQuoted vinfo.vname ;
+ self#pType None () vinfo.vtype ;
+ self#pAttrs () vinfo.vattr ;
+ self#pp_storage vinfo.vstorage ;
+ pBool vinfo.vglob ;
+ pBool vinfo.vinline ;
+ self#pp_location vinfo.vdecl ;
+ text (string_of_int vinfo.vid) ;
+ pBool vinfo.vaddrof ;
+ pBool vinfo.vreferenced ]
+
+ method private pp_initinfo (iinfo:initinfo) : doc = if !E.verboseFlag then trace "pp_initinfo" ;
+ text "Initinfo" ++ pParens(
+ pOption (self#pInit ()) iinfo.init)
+
+ method private pp_fundec (fdec:fundec) : doc = if !E.verboseFlag then trace "pp_fundec" ;
+ text "Fundec" ++ (pParens @ pCommaSep) [
+ self#pp_varinfo fdec.svar ;
+ pList (map self#pp_varinfo fdec.sformals) ;
+ pList (map self#pp_varinfo fdec.slocals) ;
+ text (string_of_int fdec.smaxid) ;
+ self#pBlock () fdec.sbody ;
+ pOption (pSpParens @ text @ string_of_int) fdec.smaxstmtid ;
+ pList (map (self#pStmt ()) fdec.sallstmts) ]
+
+ method private pp_ikind (ikin:ikind) : doc =
+ let tok = match ikin with
+ | IChar -> "IChar"
+ | ISChar -> "ISChar"
+ | IUChar -> "IUChar"
+ | IInt -> "IInt"
+ | IUInt -> "IUInt"
+ | IShort -> "IShort"
+ | IUShort -> "IUShort"
+ | ILong -> "ILong"
+ | IULong -> "IULong"
+ | ILongLong -> "ILongLong"
+ | IULongLong -> "IULongLong"
+ in text ("Ikind_" ^ tok)
+
+ method private pp_fkind (fkin:fkind) : doc =
+ let tok = match fkin with
+ | FFloat -> "FFloat"
+ | FDouble -> "FDouble"
+ | FLongDouble -> "FLongDouble"
+ in text ("Fkind_" ^ tok)
+
+ method private pp_typsig (tsig:typsig) : doc = if !E.verboseFlag then trace "pp_typsig" ;
+ match tsig with
+ | TSArray (tsig2, oe, attr) -> text "TSArray" ++ (pParens @ pCommaSep) [
+ self#pp_typsig tsig2 ;
+ pOption pInt64 oe ;
+ self#pAttrs () attr ]
+ | TSPtr (tsig2, attr) -> text "TSPtr" ++ (pParens @ pCommaSep) [
+ self#pp_typsig tsig2 ;
+ self#pAttrs () attr ]
+ | TSComp (b, s, attr) -> text "TSComp" ++ (pParens @ pCommaSep) [
+ pBool b ;
+ pQuoted s ;
+ self#pAttrs () attr ]
+ | TSFun (tsig2, tsiglst, b, attr) -> text "TSFun" ++ (pParens @ pCommaSep) [
+ self#pp_typsig tsig2 ;
+ pList (map self#pp_typsig tsiglst) ;
+ pBool b ;
+ self#pAttrs () attr ]
+ | TSEnum (s, attr) -> text "TSEnum" ++ (pParens @ pCommaSep) [
+ pQuoted s ;
+ self#pAttrs () attr ]
+ | TSBase (t) -> text "TSBase" ++ pParens( self#pType None () t)
+
+
+ method private pp_unop (uop:unop) : doc =
+ let tok = match uop with
+ | Neg -> "Neg"
+ | BNot -> "BNot"
+ | LNot -> "LNot"
+ in text ("UnOp_" ^ tok)
+
+ method private pp_binop (bop:binop) : doc =
+ let tok = match bop with
+ | PlusA -> "PlusA"
+ | PlusPI -> "PlusPI"
+ | IndexPI -> "IndexPI"
+ | MinusA -> "MinusA"
+ | MinusPI -> "MinusPI"
+ | MinusPP -> "MinusPP"
+ | Mult -> "Mult"
+ | Div -> "Div"
+ | Mod -> "Mod"
+ | Shiftlt -> "Shiftlt"
+ | Shiftrt -> "Shiftrt"
+ | Lt -> "Lt"
+ | Gt -> "Gt"
+ | Le -> "Le"
+ | Ge -> "Ge"
+ | Eq -> "Eq"
+ | Ne -> "Ne"
+ | BAnd -> "BAnd"
+ | BXor -> "BXor"
+ | BOr -> "BOr"
+ | LAnd -> "LAnd"
+ | LOr -> "LOr"
+ in text ("BinOp_" ^ tok )
+
+ method private pp_constant (c:constant) : doc = if !E.verboseFlag then trace "pp_constant" ;
+ match c with
+ | CInt64 (i, ikin, os) -> text "CInt64" ++ (pParens @ pCommaSep) [
+ pQuoted (Int64.to_string i) ;
+ self#pp_ikind ikin ;
+ pOption pQuoted os ]
+ | CStr (s) -> text "CStr" ++ pParens( pQuoted s)
+ | CWStr (ilist) -> text "CWStr" ++ pParens( pList (map ( text @ Int64.to_string) ilist))
+ | CChr (c) -> text "CChr" ++ pParens( text "\"" ++ text (Char.escaped c) ++ text "\"")
+ | CReal (f, fkin, os) -> text "CReal" ++ (pParens @ pCommaSep) [ pQuoted (sprintf "%f0" f) ;
+ self#pp_fkind fkin ;
+ pOption pQuoted os ]
+
+ method private pp_lhost (lh:lhost) : doc = if !E.verboseFlag then trace "pp_lhost" ;
+ match lh with
+ | Var (vinfo) -> text "Var" ++ pParens( self#pp_varinfo vinfo)
+ | Mem (e) -> text "Mem" ++ pParens( self#pExp () e)
+
+ method private pp_blockinfo (b:block) : doc = if !E.verboseFlag then trace "pp_blockinfo" ;
+ text "Block" ++ (pParens @ pCommaSep) [
+ self#pAttrs () b.battrs ;
+ pList (map (self#pStmt ()) b.bstmts) ]
+
+ method private pp_stmtinfo (sinfo:stmt) : doc = if !E.verboseFlag then trace "pp_stmtinfo" ;
+ text "Stmt" ++ (pParens @ pCommaSep) [
+ pList (map (self#pLabel ()) sinfo.labels) ;
+ self#pStmtKind invalidStmt () sinfo.skind ;
+ text (string_of_int sinfo.sid) ;
+ pList (map self#pp_stmtinfo sinfo.succs) ;
+ pList (map self#pp_stmtinfo sinfo.preds) ]
+end
+
+let ppFile (f:file) (pp:cilPrinter) : doc = if !E.verboseFlag then trace "ppFile" ;
+ text "File" ++ (pParens @ pCommaSep) [
+ pQuoted f.fileName ;
+ pList (map (pp#pGlobal ()) f.globals) ]
+
+(* we need a different more flexible mapGlobals
+ we only visit globals and not global init;
+ use mapGlobinits *)
+let mapGlobals2 (fl: file)
+ (doone: global -> 'a) : 'a list =
+ List.map doone fl.globals
+
+(* We redefine dumpFile because we don't want a header in our
+ file telling us it was generated with CIL blabla *)
+let dumpFile (pp: cilPrinter) (out : out_channel) file =
+ printDepth := 99999;
+ Pretty.fastMode := true;
+ if !E.verboseFlag then ignore (E.log "printing file %s\n" file.fileName);
+ let file_doc = ppFile file pp in
+ fprint out 80 file_doc;
+ flush out
+
+let feature : featureDescr =
+ { fd_name = "printaterm";
+ fd_enabled = ref false;
+ fd_description = "printing the current CIL AST to an ATerm";
+ fd_extraopt = [("--atermfile", Arg.String (fun s -> outputfilename := s), "=<filename>: writes the ATerm to <filename>");];
+ fd_doit = (function (f: file) ->
+ let channel = open_out !outputfilename in
+ let printer = new atermPrinter
+ in dumpFile printer channel f
+ ; close_out channel
+ );
+ fd_post_check = false;
+ }
diff -urN cil-old/src/maincil.ml cil-new/src/maincil.ml
--- cil-old/src/maincil.ml 2005-11-22 06:34:41.000000000 +0100
+++ cil-new/src/maincil.ml 2006-09-13 13:52:09.000000000 +0200
@@ -105,6 +105,7 @@
Simplemem.feature;
Simplify.feature;
Dataslicing.feature;
+ Atermprinter.feature;
]
@ Feature_config.features

View file

@ -1,13 +0,0 @@
source $stdenv/setup
preConfigure() {
mkdir cracklib-dicts/
cp $dicts cracklib-dicts/
}
postInstall() {
$out/sbin/cracklib-format cracklib-dicts/* | $out/sbin/cracklib-packer cracklib_dict
cp cracklib_dict.* $out/lib
}
genericBuild

View file

@ -3,18 +3,11 @@
stdenv.mkDerivation rec {
name = "cracklib-2.8.16";
#builder = ./builder.sh;
src = fetchurl {
url = "mirror://sourceforge/cracklib/${name}.tar.gz";
sha256 = "1g3mchdvra9nihxlkl3rdz96as3xnfw5m59hmr5k17l7qa9a8fpw";
};
#dicts = fetchurl {
# url = http://nixos.org/tarballs/cracklib-words.gz;
# md5 = "d18e670e5df560a8745e1b4dede8f84f";
#};
meta = {
homepage = http://sourceforge.net/projects/cracklib;
description = "A library for checking the strength of passwords";

View file

@ -1,13 +0,0 @@
diff -urN freeglut-2.4.0.old/src/freeglut_joystick.c freeglut-2.4.0/src/freeglut_joystick.c
--- freeglut-2.4.0.old/src/freeglut_joystick.c 2007-06-16 03:51:41.000000000 +0000
+++ freeglut-2.4.0/src/freeglut_joystick.c 2007-06-16 03:54:27.000000000 +0000
@@ -1682,9 +1682,6 @@
fgInitialiseJoysticks ();
- if ( !fgJoystick )
- return 0;
-
if ( !fgState.JoysticksInitialised )
return 0;

View file

@ -1,65 +0,0 @@
diff -rc gtk-sharp-1.0.6-orig/gdk/gdk-sharp.dll.config.in gtk-sharp-1.0.6/gdk/gdk-sharp.dll.config.in
*** gtk-sharp-1.0.6-orig/gdk/gdk-sharp.dll.config.in 2004-12-16 18:15:44.000000000 +0100
--- gtk-sharp-1.0.6/gdk/gdk-sharp.dll.config.in 2005-03-08 12:40:58.000000000 +0100
***************
*** 3,6 ****
--- 3,7 ----
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
<dllmap dll="libgdk-win32-2.0-0.dll" target="libgdk-x11-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
<dllmap dll="libgdk_pixbuf-2.0-0.dll" target="libgdk_pixbuf-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
+ <dllmap dll="gdksharpglue" target="libgdksharpglue@LIB_PREFIX@@LIB_SUFFIX@"/>
</configuration>
diff -rc gtk-sharp-1.0.6-orig/glade/glade-sharp.dll.config.in gtk-sharp-1.0.6/glade/glade-sharp.dll.config.in
*** gtk-sharp-1.0.6-orig/glade/glade-sharp.dll.config.in 2004-12-16 18:15:46.000000000 +0100
--- gtk-sharp-1.0.6/glade/glade-sharp.dll.config.in 2005-03-08 12:41:19.000000000 +0100
***************
*** 1,3 ****
--- 1,4 ----
<configuration>
<dllmap dll="libglade-2.0-0.dll" target="libglade-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
+ <dllmap dll="gladesharpglue" target="libgladesharpglue@LIB_PREFIX@@LIB_SUFFIX@"/>
</configuration>
diff -rc gtk-sharp-1.0.6-orig/glib/glib-sharp.dll.config.in gtk-sharp-1.0.6/glib/glib-sharp.dll.config.in
*** gtk-sharp-1.0.6-orig/glib/glib-sharp.dll.config.in 2004-12-16 18:15:38.000000000 +0100
--- gtk-sharp-1.0.6/glib/glib-sharp.dll.config.in 2005-03-08 12:37:57.000000000 +0100
***************
*** 2,5 ****
--- 2,6 ----
<dllmap dll="libglib-2.0-0.dll" target="libglib-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
<dllmap dll="libgthread-2.0-0.dll" target="libgthread-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
+ <dllmap dll="glibsharpglue" target="libglibsharpglue@LIB_PREFIX@@LIB_SUFFIX@"/>
</configuration>
diff -rc gtk-sharp-1.0.6-orig/gnome/gnome-sharp.dll.config.in gtk-sharp-1.0.6/gnome/gnome-sharp.dll.config.in
*** gtk-sharp-1.0.6-orig/gnome/gnome-sharp.dll.config.in 2004-12-16 18:15:43.000000000 +0100
--- gtk-sharp-1.0.6/gnome/gnome-sharp.dll.config.in 2005-03-08 12:41:50.000000000 +0100
***************
*** 8,11 ****
--- 8,12 ----
<dllmap dll="gnomeprint-2-2" target="libgnomeprint-2-2@LIB_PREFIX@.0@LIB_SUFFIX@"/>
<dllmap dll="gnomeprintui-2-2" target="libgnomeprintui-2-2@LIB_PREFIX@.0@LIB_SUFFIX@"/>
<dllmap dll="gnomeui-2" target="libgnomeui-2@LIB_PREFIX@.0@LIB_SUFFIX@"/>
+ <dllmap dll="gnomesharpglue" target="libgnomesharpglue@LIB_PREFIX@@LIB_SUFFIX@"/>
</configuration>
diff -rc gtk-sharp-1.0.6-orig/gtk/gtk-sharp.dll.config.in gtk-sharp-1.0.6/gtk/gtk-sharp.dll.config.in
*** gtk-sharp-1.0.6-orig/gtk/gtk-sharp.dll.config.in 2004-12-16 18:14:51.000000000 +0100
--- gtk-sharp-1.0.6/gtk/gtk-sharp.dll.config.in 2005-03-08 12:38:19.000000000 +0100
***************
*** 3,6 ****
--- 3,7 ----
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
<dllmap dll="libatk-1.0-0.dll" target="libatk-1.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
<dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
+ <dllmap dll="gtksharpglue" target="libgtksharpglue@LIB_PREFIX@@LIB_SUFFIX@"/>
</configuration>
diff -rc gtk-sharp-1.0.6-orig/pango/pango-sharp.dll.config.in gtk-sharp-1.0.6/pango/pango-sharp.dll.config.in
*** gtk-sharp-1.0.6-orig/pango/pango-sharp.dll.config.in 2004-12-16 18:14:55.000000000 +0100
--- gtk-sharp-1.0.6/pango/pango-sharp.dll.config.in 2005-03-08 12:42:11.000000000 +0100
***************
*** 1,4 ****
--- 1,5 ----
<configuration>
<dllmap dll="libglib-2.0-0.dll" target="libglib-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
<dllmap dll="libpango-1.0-0.dll" target="libpango-1.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
+ <dllmap dll="pangosharpglue" target="libpangosharpglue@LIB_PREFIX@@LIB_SUFFIX@"/>
</configuration>

View file

@ -1,20 +0,0 @@
diff --git a/Data/Attoparsec/Binary.hs b/Data/Attoparsec/Binary.hs
index fab76c6..01d6c8b 100644
--- a/Data/Attoparsec/Binary.hs
+++ b/Data/Attoparsec/Binary.hs
@@ -23,7 +23,7 @@ import Data.Word
byteSize :: (Bits a) => a -> Int
byteSize = (`div` 8) . bitSize
-pack :: (Bits a) => B.ByteString -> a
+pack :: (Bits a, Num a) => B.ByteString -> a
pack = B.foldl' (\n h -> (n `shiftL` 8) .|. fromIntegral h) 0
anyWordN :: (Bits a) => (B.ByteString -> a) -> Parser a
@@ -84,4 +84,4 @@ word64be = wordN unpack
-- |Match a specific 64-bit little-endian word.
word64le :: Word64 -> Parser Word64
-word64le = wordN $ B.reverse . unpack
\ No newline at end of file
+word64le = wordN $ B.reverse . unpack

View file

@ -1,14 +0,0 @@
{ cabal, transformers }:
cabal.mkDerivation (self: {
pname = "mtl";
version = "2.1";
sha256 = "041fhi6vgddj43y26ljhxqjryjbsj0rb6m6gfpvrjynzp6c7c5n6";
buildDepends = [ transformers ];
meta = {
description = "Monad classes, using functional dependencies";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
maintainers = [ self.stdenv.lib.maintainers.andres ];
};
})

View file

@ -1,14 +0,0 @@
{ cabal }:
cabal.mkDerivation (self: {
pname = "syb";
version = "0.3.5";
sha256 = "17gwhn0rqjf9zkx1dsmsaj41qdjlk4mq5lzpqkgy3slq30nwwwbr";
meta = {
homepage = "http://www.cs.uu.nl/wiki/GenericProgramming/SYB";
description = "Scrap Your Boilerplate";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
maintainers = [ self.stdenv.lib.maintainers.andres ];
};
})

View file

@ -1,13 +0,0 @@
{ cabal }:
cabal.mkDerivation (self: {
pname = "syb";
version = "0.1.0.1";
sha256 = "08nf4id26s5iasxzdy5jds6h87fy3a55zgw0zrig4dg6difmwjp3";
meta = {
description = "Scrap Your Boilerplate";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
maintainers = [ self.stdenv.lib.maintainers.andres ];
};
})

View file

@ -1,15 +0,0 @@
{ cabal, deepseq }:
cabal.mkDerivation (self: {
pname = "text";
version = "0.11.1.12";
sha256 = "0j2044whj3xckmxqmgdjbc2mpwdan481qzjslwplqbqwml2jvkml";
buildDepends = [ deepseq ];
meta = {
homepage = "https://github.com/bos/text";
description = "An efficient packed Unicode text type";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
maintainers = [ self.stdenv.lib.maintainers.andres ];
};
})

View file

@ -1,37 +0,0 @@
diff --git a/Makefile b/Makefile
index af70b4c..53c6fab 100644
--- a/Makefile
+++ b/Makefile
@@ -15,11 +15,11 @@ DEMOBJS=lmdemo.o
DEMOSRCS=lmdemo.c
AR=ar
RANLIB=ranlib
-LAPACKLIBS=-llapack -lblas -lf2c # comment this line if you are not using LAPACK.
+#LAPACKLIBS=-llapack -lblas -lf2c # comment this line if you are not using LAPACK.
# On systems with a FORTRAN (not f2c'ed) version of LAPACK, -lf2c is
# not necessary; on others, -lf2c is equivalent to -lF77 -lI77
-#LAPACKLIBS=-L/usr/local/atlas/lib -llapack -lcblas -lf77blas -latlas -lf2c # This works with the ATLAS updated lapack and Linux_P4SSE2
+LAPACKLIBS=-llapack -lcblas -lf77blas -latlas -lgfortran # This works with the ATLAS updated lapack and Linux_P4SSE2
# from http://www.netlib.org/atlas/archives/linux/
#LAPACKLIBS=-llapack -lgoto2 -lpthread -lf2c # This works with GotoBLAS
diff --git a/misc.h b/misc.h
index e32f18d..827507e 100644
--- a/misc.h
+++ b/misc.h
@@ -30,11 +30,11 @@
/* f2c'd BLAS */
//#define LM_BLAS_PREFIX f2c_
/* C BLAS */
-//#define LM_BLAS_PREFIX cblas_
+#define LM_BLAS_PREFIX cblas_
/* common suffix for BLAS subroutines */
-//#define LM_BLAS_SUFFIX // define empty if a f2c_ or cblas_ prefix was defined for LM_BLAS_PREFIX above
-#define LM_BLAS_SUFFIX _ // use this in case of no BLAS prefix
+#define LM_BLAS_SUFFIX // define empty if a f2c_ or cblas_ prefix was defined for LM_BLAS_PREFIX above
+//#define LM_BLAS_SUFFIX _ // use this in case of no BLAS prefix
#define LCAT_(a, b) #a b

View file

@ -1,32 +0,0 @@
source $stdenv/setup
## oh, this is ugly. It would be way better to fix the Makefile instead
postUnpack() {
cd $sourceRoot
cat > config.mk <<END
VERSION = 0.3
PREFIX=
MANPREFIX=/share/man
INCS = -I.
LIBS = -L. -lc
LDFLAGS = \${LIBS}
CFLAGS = -g \${INCS} -DVERSION=\"\${VERSION}\"
SOFLAGS = -fPIC -shared
AR = ar cr
RANLIB = ranlib
END
echo -e "PREFIX=\nDESTDIR=${out}" >> config.mk
cd ..
}
postUnpack=postUnpack
genericBuild

View file

@ -1,17 +0,0 @@
http://bugs.gentoo.org/328031
--- msntest/msntest.cpp
+++ msntest/msntest.cpp
@@ -259,7 +259,11 @@
if(mySocketsSsl[i].isSSL && !mySocketsSsl[i].isConnected)
{
BIO *bio_socket_new;
- SSL_METHOD *meth=NULL;
+ #if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ const SSL_METHOD *meth=NULL;
+ #else
+ SSL_METHOD *meth=NULL;
+ #endif
meth=SSLv23_client_method();
SSLeay_add_ssl_algorithms();
mySocketsSsl[i].ctx = SSL_CTX_new(meth);

View file

@ -1,24 +0,0 @@
https://build.opensuse.org/package/view_file?file=0001-Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch&package=Mesa&project=openSUSE%3AFactory&srcmd5=be25d34ad69853c2bb21ed376061d573
diff -ru Mesa-7.10.1-orig//src/mesa/drivers/dri/swrast/swrast.c Mesa-7.10.1//src/mesa/drivers/dri/swrast/swrast.c
--- Mesa-7.10.1-orig//src/mesa/drivers/dri/swrast/swrast.c 2010-12-14 22:43:15.000000000 +0100
+++ Mesa-7.10.1//src/mesa/drivers/dri/swrast/swrast.c 2011-03-07 18:08:17.062816112 +0100
@@ -61,6 +61,7 @@
static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
GLint texture_format, __DRIdrawable *dPriv)
{
+ GET_CURRENT_CONTEXT(ctx);
struct dri_context *dri_ctx;
int x, y, w, h;
__DRIscreen *sPriv = dPriv->driScreenPriv;
@@ -90,6 +91,10 @@
_mesa_init_teximage_fields(&dri_ctx->Base, target, texImage,
w, h, 1, 0, internalFormat, texFormat);
+ ctx->Driver.TexImage2D(ctx, target, 0, internalFormat,
+ w, h, 0, texture_format, GL_UNSIGNED_INT_8_8_8_8,
+ NULL, &ctx->Unpack, texObj, texImage);
+
sPriv->swrast_loader->getImage(dPriv, x, y, w, h, (char *)texImage->Data,
dPriv->loaderPrivate);

View file

@ -1,20 +0,0 @@
--- opencv/src/highgui/cvcap_ffmpeg.cpp
+++ opencv/src/highgui/cvcap_ffmpeg.cpp
@@ -49,6 +49,15 @@
#if !defined(WIN32) || defined(__MINGW32__)
// some versions of FFMPEG assume a C99 compiler, and don't define INT64_C
-#ifndef INT64_C
-#define INT64_C
+#if !defined INT64_C || !defined UINT64_C
+# if __WORDSIZE == 64
+# define INT64_C(c) c ## UL
+# else
+# define INT64_C(c) c ## ULL
+# endif
+# if __WORDSIZE == 64
+# define UINT64_C(c) c ## UL
+# else
+# define UINT64_C(c) c ## ULL
+# endif
#define __STDC_CONSTANT_MACROS
// force re-inclusion of stdint.h to get INT64_C macro

View file

@ -1,27 +0,0 @@
{ stdenv, fetchurl, cmake, gtk, libjpeg, libpng, libtiff, jasper, ffmpeg
, pkgconfig, gstreamer }:
let v = "2.3.1a"; in
stdenv.mkDerivation rec {
name = "opencv-${v}";
src = fetchurl {
url = "mirror://sourceforge/opencvlibrary/OpenCV-${v}.tar.bz2";
sha256 = "0325s7pa2npcw2gc06pr6q5ik4xdyf08rvkfc0myn10w20lzb8m9";
};
buildInputs = [ gtk libjpeg libpng libtiff jasper ffmpeg gstreamer ];
buildNativeInputs = [ cmake pkgconfig ];
enableParallelBuilding = true;
meta = {
description = "Open Computer Vision Library with more than 500 algorithms";
homepage = http://opencv.willowgarage.com/;
license = "BSD";
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux;
};
}

View file

@ -1,32 +0,0 @@
args: with args;
# this is the stable edition of OpenMotif - sources fetched from Debian, without
# patches applied
stdenv.mkDerivation {
name = "openmotif-2.2.3";
src = fetchurl {
url = http://ftp.de.debian.org/debian/pool/non-free/o/openmotif/openmotif_2.2.3.orig.tar.gz;
sha256 = "0amd9834p1ajnin7c8f1gad2jl2csf69msxcpc10rzm2x27jigxi";
};
unpackPhase = ''
tar xzf $src
tar xzf openmotif-2.2.3.orig/dist/openMotif-2.2.3.tar.gz
rm -rf openmotif-2.2.3.orig
cd openMotif-2.2.3
'';
buildInputs = [flex perl];
propagatedBuildInputs = [x11 libXp libXau libXaw libXext xbitmaps];
CFLAGS="-fno-strict-aliasing"; # without this openmotif may segfault
meta = {
description = "Open source version of motif toolkit including aka libmotif3";
homepage = http://www.opengroup.org/openmotif/;
# Open motif is free for open source projects
license = "non-free";
};
}

View file

@ -1,43 +0,0 @@
{stdenv, fetchurl, rLang}:
let
/* Function to compile Bioconductor packages */
buildBioConductor =
{ pname, pver, src, postInstall ? ""}:
stdenv.mkDerivation {
name = "${pname}-${pver}";
inherit src;
buildInputs = [rLang];
# dontAddPrefix = true;
# preBuild = "makeFlagsArray=(dictdir=$out/lib/aspell datadir=$out/lib/aspell)";
inherit postInstall;
installPhase = ''
R CMD INSTALL ${affyioSrc}
'';
meta = {
description = "Bioconductor package for ${pname}";
};
};
in {
affyio = buildBioC {
pname = "affyio";
pver = "1.8.1";
src = fetchurl {
url = http://www.bioconductor.org/packages/release/bioc/src/contrib/affyio_1.8.1.tar.gz;
sha256 = "136nkpq870vrwf9z5gq32xjzrp8bjfbk9pn8fki2a5w2lr0qc8nh";
};
};
}

View file

@ -1,23 +0,0 @@
{stdenv, fetchsvn, fetchsvnrevision, zlib, cmake
, repository ? "svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib"
, rev ? fetchsvnrevision repository
, src ? fetchsvn {
url = repository;
rev = rev;
}
}:
stdenv.mkDerivation {
name = "taglib-live";
inherit src;
cmakeFlags = [ "-DWITH-ASF=ON" "-DWITH-MP4=ON" ];
buildInputs = [ zlib cmake ];
meta = {
homepage = http://developer.kde.org/~wheeler/taglib.html;
description = "A library for reading and editing the meta-data of several popular audio formats";
};
}

View file

@ -1,14 +0,0 @@
--- configure 2010-09-02 10:58:16.128236964 -0400
+++ configure.old 2010-09-02 10:57:42.368111615 -0400
@@ -1637,9 +1637,9 @@
echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_caml_mlvalues_h" >&5
echo "${ECHO_T}$ac_cv_file__usr_include_caml_mlvalues_h" >&6
if test $ac_cv_file__usr_include_caml_mlvalues_h = yes; then
- OCAML_INCLUDE_DIR=/usr/include
+ OCAML_INCLUDE_DIR=/usr/include/caml
else
- OCAML_INCLUDE_DIR=$OCAML_LIB_DIR
+ OCAML_INCLUDE_DIR=$OCAML_LIB_DIR/caml
fi

View file

@ -1,25 +0,0 @@
{stdenv, fetchgit, python, autoconf, automake, libtool, pygobject, pkgconfig, udev}:
stdenv.mkDerivation {
name = "python-gudev-147.2";
src = fetchgit {
url = git://github.com/nzjrs/python-gudev.git;
rev = "refs/tags/147.2";
sha256 = "5b9766fcb88855a77ac8bb416ca3b51f55ac7d82b0e189f88c59cacb11586c15";
};
buildInputs = [ python autoconf automake libtool pygobject pkgconfig udev ];
preConfigure = ''
sed -e 's@/usr/bin/file@file@g' -i configure.ac
sh autogen.sh
'';
meta = {
homepage = http://www.freedesktop.org/software/systemd/gudev/;
description = "Python binding to the GUDev udev helper library.";
license = "GPLv3+";
maintainers = with stdenv.lib.maintainers; [qknight];
platforms = with stdenv.lib.platforms; all;
};
}

View file

@ -1,15 +0,0 @@
{stdenv, fetchurl, python}:
stdenv.mkDerivation rec {
version = "3.4.0";
name = "zope-${version}";
src = fetchurl {
url = "http://www.zope.org/Products/Zope3/${version}/Zope-${version}.tgz";
sha256 = "3e834e8749945d8fc0a67bb724f2cf0c671f04f477e24fb8edb74828e331901d";
};
patches = [
./zope_python-2.4.4.patch
./zope_python-readline.patch
];
buildInputs = [python];
}

View file

@ -1,12 +0,0 @@
diff -r 8833d4892dfc Zope-3.2.1/configure
--- a/configure Mon Aug 18 14:55:39 2008 +0200
+++ b/configure Mon Aug 18 14:57:39 2008 +0200
@@ -21,7 +21,7 @@ prefix="$DEFAULT_PREFIX"
# Place the optimal target version number (as returned by sys.version)
# below
-TARGET="2.4.2"
+TARGET="2.4.4"
# Order a list of "acceptable" python version numbers (as returned by
# sys.version) below in "best" to "worst" order, not including the

View file

@ -1,12 +0,0 @@
diff -r 8833d4892dfc Zope-3.2.1/Dependencies/zope.publisher-Zope-3.2.1/zope.publisher/http.py
--- a/Dependencies/zope.publisher-Zope-3.2.1/zope.publisher/http.py Mon Aug 18 14:55:39 2008 +0200
+++ b/Dependencies/zope.publisher-Zope-3.2.1/zope.publisher/http.py Mon Aug 18 16:37:02 2008 +0200
@@ -198,7 +198,7 @@ class HTTPInputStream(object):
self.cacheStream.write(data)
return data
- def readline(self):
+ def readline(self, size=None):
data = self.stream.readline()
self.cacheStream.write(data)
return data

View file

@ -1,12 +0,0 @@
diff --git a/src/plug/hack/Makefile b/src/plug/hack/Makefile
index b05d8dd..d6c73f9 100644
--- a/src/plug/hack/Makefile
+++ b/src/plug/hack/Makefile
@@ -7,7 +7,6 @@ PERL_LIBS=`perl -MExtUtils::Embed -e ldopts` -lncurses
PY_CFLAGS=-I${PREFIX}/include/python2.5/ -I/usr/include/python2.5/
PY_LIBS=-lpython2.5
LUA_CFLAGS=-I${PREFIX}/include/lua5.1/ -I/usr/include/lua5.1/
-LUA_LIBS=
RUBY_CFLAGS=-I/usr/lib/ruby/1.8/i386-linux
RUBY_LIBS=-lruby18
SO=${SHARED_EXT}

View file

@ -1,12 +0,0 @@
{stdenv, fetchurl}:
stdenv.mkDerivation {
name = "core-apache-ant-1.6.5";
realname = "apache-ant-1.6.5";
builder = ./core-builder.sh;
src = fetchurl {
url = http://apache.surfnet.nl/ant/binaries/apache-ant-1.6.5-bin.tar.bz2;
md5 = "26031ee1a2fd248ad0cc2e7f17c44c39";
};
}

View file

@ -1,51 +0,0 @@
source $stdenv/setup || exit 1
# unpack the binary distribution
tar jxf $src || exit 1
mkdir -p $out
mv apache-ant-*/* $out || exit 1
# remove crap in the root directory
for file in $out/*
do
if test -f $file ; then
rm $file
fi
done
rm -rf $out/docs
# prevent the use of hacky scripts. This will be handled in Nix.
rm $out/bin/* || exit 1
# add core-ant script. This script is to be invoked with all
# appropiate variables and will try to be clever or user-friendlt=y.
cat >> $out/bin/core-ant <<EOF
#! /bin/sh
# Variables:
# JAVA_HOME
# JAVACMD
# ANT_OPTS, NIX_ANT_OPTS
# ANT_ARGS
ANT_HOME=$out
if [ -z "\$LOCALCLASSPATH" ] ; then
LOCALCLASSPATH=\$ANT_HOME/lib/ant-launcher.jar
else
LOCALCLASSPATH=\$ANT_HOME/lib/ant-launcher.jar:\$LOCALCLASSPATH
fi
if [ -n "\$JIKESPATH" ]; then
exec "\$JAVACMD" \$NIX_ANT_OPTS \$ANT_OPTS -classpath "\$LOCALCLASSPATH" -Dant.home="\${ANT_HOME}" -Djikes.class.path="\$JIKESPATH" org.apache.tools.ant.launch.Launcher \$ANT_ARGS -lib "$CLASSPATH" "\$@"
else
exec "\$JAVACMD" \$NIX_ANT_OPTS \$ANT_OPTS -classpath "\$LOCALCLASSPATH" -Dant.home="\${ANT_HOME}" org.apache.tools.ant.launch.Launcher \$ANT_ARGS -lib "$CLASSPATH" "\$@"
fi
fi
EOF
chmod a+x $out/bin/core-ant

View file

@ -1,5 +0,0 @@
source $stdenv/setup
configureFlags="--with-aterm=$aterm --with-sglr=$sglr --with-pgen=$pgen
--with-pt-support=$ptsupport --with-asf-library=$asflibrary --with-strategoxt=$strategoxt --with-graphviz=$graphviz --with-svn=$subversion"
genericBuild

View file

@ -1,13 +0,0 @@
{stdenv, fetchurl, strategoxt, aterm, sdf, subversion, graphviz}:
stdenv.mkDerivation {
name = "xdoc-0.1";
src = fetchurl {
url = http://machina.nl/xdoc/xdoc-0.1.tar.gz;
md5 = "6f601254013d5fe3d2fdbd33b827001a";
};
builder = ./builder.sh;
inherit aterm strategoxt subversion graphviz ;
inherit (sdf) sglr pgen ptsupport asflibrary;
buildInputs = [aterm sdf.pgen strategoxt];
}

View file

@ -1 +0,0 @@
import ./automake-1.10.x.nix

View file

@ -1,11 +0,0 @@
{stdenv, fetchurl, aterm}:
stdenv.mkDerivation {
name = "toolbuslib-0.5.1";
src = fetchurl {
url = http://www.cwi.nl/projects/MetaEnv/toolbuslib/toolbuslib-0.5.1.tar.gz;
md5 = "1c7c7cce870f813bef60bbffdf061c90";
};
buildInputs = [aterm];
}

View file

@ -1,11 +0,0 @@
{stdenv, fetchurl, aterm}:
stdenv.mkDerivation {
name = "toolbuslib-0.6";
src = fetchurl {
url = http://www.cwi.nl/projects/MetaEnv/toolbuslib/toolbuslib-0.6.tar.gz;
md5 = "e117c574b428408ad172b1ad904ff430";
};
buildInputs = [aterm];
}

View file

@ -1,44 +0,0 @@
{ stdenv, fetchurl, SDL, SDL_mixer, zlib, libpng, unzip
, autoconf, automake, libtool, bison, flex
}:
stdenv.mkDerivation {
name = "exult-1.4-pre-svn-20080712-0500";
builder = ./builder.sh;
src = fetchurl {
url = http://www.math.leidenuniv.nl/~wpalenst/cvs/exult-20080712-0500.tar.gz;
sha256 = "186z8qb713yr1wfasfbpgz2wfqwmbh2d6lmgz1v8lhmwmfpkzgc4";
};
buildInputs = [
SDL SDL_mixer zlib libpng unzip
# The following are only needed because we're building from SVN.
autoconf automake libtool bison flex
];
NIX_CFLAGS_COMPILE = "-I${SDL_mixer}/include/SDL";
preConfigure = ''
./autogen.sh
'';
# Digital recordings of the music on an original Roland MT-32. So
# we don't need actual MIDI playback capability.
musicFiles = [
(fetchurl {
url = mirror://sourceforge/exult/U7MusicOGG_1of2.zip;
md5 = "7746d1a9164fd67509107797496553bf";
})
(fetchurl {
url = mirror://sourceforge/exult/U7MusicOGG_2of2.zip;
md5 = "cdae5956d7c52f35e90317913a660123";
})
];
meta = {
homepage = http://exult.sourceforge.net/;
description = "A reimplementation of the Ultima VII game engine (pre-release)";
};
}

View file

@ -1,13 +0,0 @@
name wine
url http://sourceforge.net/projects/wine/files/Source/
version_link 'wine-[0-9.]+[.]tar[.][0-9a-z]+/download$'
SF_redirect
do_regenerate () {
set_var_value name "$CURRENT_NAME-"'${meta.version}'
set_var_value version "$CURRENT_VERSION"
set_var_value url 'mirror://sourceforge/wine/${name}.tar.bz2' 1
set_var_value sha256 "$CURRENT_HASH"
cat "$CURRENT_TARGET"
}

View file

@ -1,198 +0,0 @@
$NetBSD: patch-ak,v 1.5 2011/01/15 14:08:10 wiz Exp $
Fix build with png-1.5. From John Bowler.
See also http://bugs.ghostscript.com/show_bug.cgi?id=692060
--- a/base/gdevpng.c.orig 2008-07-17 02:34:01.000000000 +0000
+++ b/base/gdevpng.c
@@ -36,12 +36,14 @@
#include "gdevpccm.h"
#include "gscdefs.h"
-#define PNG_INTERNAL
/*
* libpng versions 1.0.3 and later allow disabling access to the stdxxx
* files while retaining support for FILE * I/O.
+ *
+ * This is a misunderstanding - this is a build time option for libpng,
+ * it has no effect on a user of libpng.
*/
-#define PNG_NO_CONSOLE_IO
+/*#define PNG_NO_CONSOLE_IO*/
/*
* Earlier libpng versions require disabling FILE * I/O altogether.
* This produces a compiler warning about no prototype for png_init_io.
@@ -280,7 +282,7 @@ png_print_page(gx_device_printer * pdev,
goto done;
}
/* set error handling */
- if (setjmp(png_ptr->jmpbuf)) {
+ if (setjmp(png_jmpbuf(png_ptr))) {
/* If we get here, we had a problem reading the file */
code = gs_note_error(gs_error_VMerror);
goto done;
@@ -290,19 +292,12 @@ png_print_page(gx_device_printer * pdev,
png_init_io(png_ptr, file);
/* set the file information here */
- info_ptr->width = pdev->width;
- info_ptr->height = pdev->height;
- /* resolution is in pixels per meter vs. dpi */
- info_ptr->x_pixels_per_unit =
- (png_uint_32) (pdev->HWResolution[0] * (100.0 / 2.54));
- info_ptr->y_pixels_per_unit =
- (png_uint_32) (pdev->HWResolution[1] * (100.0 / 2.54));
- info_ptr->phys_unit_type = PNG_RESOLUTION_METER;
- info_ptr->valid |= PNG_INFO_pHYs;
switch (depth) {
case 32:
- info_ptr->bit_depth = 8;
- info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
+ png_set_IHDR(png_ptr, info_ptr, pdev->width, pdev->height,
+ 8, PNG_COLOR_TYPE_RGB_ALPHA,
+ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT,
+ PNG_FILTER_TYPE_DEFAULT);
png_set_invert_alpha(png_ptr);
{ gx_device_pngalpha *ppdev = (gx_device_pngalpha *)pdev;
png_color_16 background;
@@ -315,57 +310,69 @@ png_print_page(gx_device_printer * pdev,
}
break;
case 48:
- info_ptr->bit_depth = 16;
- info_ptr->color_type = PNG_COLOR_TYPE_RGB;
+ png_set_IHDR(png_ptr, info_ptr, pdev->width, pdev->height,
+ 16, PNG_COLOR_TYPE_RGB,
+ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT,
+ PNG_FILTER_TYPE_DEFAULT);
#if defined(ARCH_IS_BIG_ENDIAN) && (!ARCH_IS_BIG_ENDIAN)
png_set_swap(png_ptr);
#endif
break;
case 24:
- info_ptr->bit_depth = 8;
- info_ptr->color_type = PNG_COLOR_TYPE_RGB;
+ png_set_IHDR(png_ptr, info_ptr, pdev->width, pdev->height,
+ 8, PNG_COLOR_TYPE_RGB,
+ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT,
+ PNG_FILTER_TYPE_DEFAULT);
break;
case 8:
- info_ptr->bit_depth = 8;
- if (gx_device_has_color(pdev))
- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
- else
- info_ptr->color_type = PNG_COLOR_TYPE_GRAY;
+ png_set_IHDR(png_ptr, info_ptr, pdev->width, pdev->height,
+ 8, gx_device_has_color(pdev) ?
+ PNG_COLOR_TYPE_PALETTE : PNG_COLOR_TYPE_GRAY,
+ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT,
+ PNG_FILTER_TYPE_DEFAULT);
break;
case 4:
- info_ptr->bit_depth = 4;
- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
+ png_set_IHDR(png_ptr, info_ptr, pdev->width, pdev->height,
+ 4, PNG_COLOR_TYPE_PALETTE,
+ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT,
+ PNG_FILTER_TYPE_DEFAULT);
break;
case 1:
- info_ptr->bit_depth = 1;
- info_ptr->color_type = PNG_COLOR_TYPE_GRAY;
+ png_set_IHDR(png_ptr, info_ptr, pdev->width, pdev->height,
+ 1, PNG_COLOR_TYPE_GRAY,
+ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT,
+ PNG_FILTER_TYPE_DEFAULT);
/* invert monocrome pixels */
png_set_invert_mono(png_ptr);
break;
+ default:
+ png_error(png_ptr, "invalid bit depth");
}
+ /* resolution is in pixels per meter vs. dpi */
+ png_set_pHYs(png_ptr, info_ptr,
+ (png_uint_32) (pdev->HWResolution[0] * (100.0 / 2.54)),
+ (png_uint_32) (pdev->HWResolution[1] * (100.0 / 2.54)),
+ PNG_RESOLUTION_METER);
+
/* set the palette if there is one */
- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) {
+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_PALETTE) {
int i;
int num_colors = 1 << depth;
gx_color_value rgb[3];
+ png_color palette[256];
+
+ if (num_colors > 256)
+ num_colors = 256;
- info_ptr->palette =
- (void *)gs_alloc_bytes(mem, 256 * sizeof(png_color),
- "png palette");
- if (info_ptr->palette == 0) {
- code = gs_note_error(gs_error_VMerror);
- goto done;
- }
- info_ptr->num_palette = num_colors;
- info_ptr->valid |= PNG_INFO_PLTE;
for (i = 0; i < num_colors; i++) {
(*dev_proc(pdev, map_color_rgb)) ((gx_device *) pdev,
(gx_color_index) i, rgb);
- info_ptr->palette[i].red = gx_color_value_to_byte(rgb[0]);
- info_ptr->palette[i].green = gx_color_value_to_byte(rgb[1]);
- info_ptr->palette[i].blue = gx_color_value_to_byte(rgb[2]);
+ palette[i].red = gx_color_value_to_byte(rgb[0]);
+ palette[i].green = gx_color_value_to_byte(rgb[1]);
+ palette[i].blue = gx_color_value_to_byte(rgb[2]);
}
+ png_set_PLTE(png_ptr, info_ptr, palette, num_colors);
}
/* add comment */
strncpy(software_key, "Software", sizeof(software_key));
@@ -375,15 +382,14 @@ png_print_page(gx_device_printer * pdev,
text_png.key = software_key;
text_png.text = software_text;
text_png.text_length = strlen(software_text);
- info_ptr->text = &text_png;
- info_ptr->num_text = 1;
+ png_set_text(png_ptr, info_ptr, &text_png, 1);
/* write the file information */
png_write_info(png_ptr, info_ptr);
/* don't write the comments twice */
- info_ptr->num_text = 0;
- info_ptr->text = NULL;
+ /*info_ptr->num_text = 0;*/
+ /*info_ptr->text = NULL;*/
/* Write the contents of the image. */
for (y = 0; y < height; y++) {
@@ -395,7 +401,7 @@ png_print_page(gx_device_printer * pdev,
png_write_end(png_ptr, info_ptr);
/* if you alloced the palette, free it here */
- gs_free_object(mem, info_ptr->palette, "png palette");
+ /*gs_free_object(mem, info_ptr->palette, "png palette");*/
done:
/* free the structures */
@@ -405,6 +411,7 @@ png_print_page(gx_device_printer * pdev,
return code;
}
+#if 0 /* not required in 1.5 */
/*
* Patch around a static reference to a never-used procedure.
* This could be avoided if we were willing to edit pngconf.h to
@@ -422,6 +429,7 @@ png_push_fill_buffer(png_structp png_ptr
{
}
#endif
+#endif
static int
pngalpha_open(gx_device * pdev)

View file

@ -1,59 +0,0 @@
x@{builderDefsPackage
, automake, pkgconfig, libX11, libSM, imake, qt4, alsaLib, jackaudio
, ladspaH, liblrdf, dssi, liblo, fftwSinglePrec, libsndfile, libsamplerate
, xproto, libICE, perl, makedepend, librdf_raptor, lilypond, flac, libunwind
, ...}:
builderDefsPackage
(a :
let
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
[];
buildInputs = map (n: builtins.getAttr n x)
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
sourceInfo = rec {
baseName="rosegarden";
version="10.10";
project="${baseName}";
name="${baseName}-${version}";
url="mirror://sourceforge/project/${project}/${baseName}/${version}/${name}.tar.bz2";
hash="1ia74kzkw1yr3h8q4lrccx49hcy2961rni3h4css7r6hdl9xq909";
};
in
rec {
src = a.fetchurl {
url = sourceInfo.url;
sha256 = sourceInfo.hash;
};
inherit (sourceInfo) name version;
inherit buildInputs;
/* doConfigure should be removed if not needed */
phaseNames = ["doConfigure" "doMakeInstall"];
configureFlags = [
"--with-qtdir=${qt4}"
];
setVars = a.noDepEntry ''
export NIX_LDFLAGS="$NIX_LDFLAGS -lz -ldl -lX11"
'';
meta = {
description = "A music editor and MIDI sequencer";
maintainers = with a.lib.maintainers;
[
raskin
];
platforms = with a.lib.platforms;
linux;
license = a.lib.licenses.gpl2;
};
passthru = {
updateInfo = {
downloadPage = "http://sourceforge.net/projects/rosegarden/files/rosegarden/";
};
};
}) x

View file

@ -1,31 +0,0 @@
source $stdenv/setup
# This is a very dirty hack to prevent the binaries from putting the
# Mesa libraries in their RPATHs.
mkdir -p $out/tmp
ln -s $mesa/lib/* $out/tmp/
mkdir -p $out/lib
ln -s $mesa/lib/libGLU* $out/lib/
export NIX_LDFLAGS="-L$out/tmp $NIX_LDFLAGS"
genericBuild
rm -rf $out/tmp
# Add a wrapper around each program to use the appropriate OpenGL driver.
mkdir -p $out/bin/.orig
for i in $(cd $out/bin && ls); do
mv $out/bin/$i $out/bin/.orig/$i
cat >$out/bin/$i <<EOF
#! $SHELL -e
mesa=$mesa
$(cat $mesaSwitch)
exec $out/bin/.orig/$i "\$@"
EOF
chmod +x $out/bin/$i
done

View file

@ -3,8 +3,6 @@
stdenv.mkDerivation {
name = "rss-glx-0.8.1";
#builder = ./builder.sh;
src = fetchurl {
url = mirror://sourceforge/rss-glx/rss-glx_0.8.1.tar.bz2;
md5 = "a2bdf0e10ee4e89c8975f313c5c0ba6f";

View file

@ -1,32 +0,0 @@
diff -Naur madwifi/ath/if_ath.c madwifi_rawtx/ath/if_ath.c
--- madwifi/ath/if_ath.c 2008-06-24 17:20:58.000000000 -0400
+++ madwifi_rawtx/ath/if_ath.c 2008-06-24 17:20:12.000000000 -0400
@@ -2950,6 +2950,7 @@
ath_tx_startraw(struct net_device *dev, struct ath_buf *bf, struct sk_buff *skb)
{
struct ath_softc *sc = dev->priv;
+ struct ieee80211com *ic = &sc->sc_ic;
struct ath_hal *ah = sc->sc_ah;
struct ieee80211_phy_params *ph = &(SKB_CB(skb)->phy);
const HAL_RATE_TABLE *rt;
@@ -2962,7 +2963,8 @@
struct ieee80211_frame *wh;
wh = (struct ieee80211_frame *)skb->data;
- try0 = ph->try[0];
+// try0 = ph->try[0];
+ try0 = (ic->ic_opmode == IEEE80211_M_MONITOR) ? 1 : ph->try[0];
rt = sc->sc_currates;
txrate = dot11_to_ratecode(sc, rt, ph->rate[0]);
power = ph->power > 60 ? 60 : ph->power;
@@ -2986,7 +2988,8 @@
rt = sc->sc_currates;
KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
- if (IEEE80211_IS_MULTICAST(wh->i_addr1)) {
+ if (IEEE80211_IS_MULTICAST(wh->i_addr1) || ((ic->ic_opmode ==
+IEEE80211_M_MONITOR) && (skb->data[1]&3) != 0x01) ) {
flags |= HAL_TXDESC_NOACK; /* no ack on broad/multicast */
sc->sc_stats.ast_tx_noack++;
try0 = 1;

View file

@ -1,45 +0,0 @@
args : with args;
let localDefs = builderDefs.passthru.function {
src = fetchurl {
url = http://snapshots.madwifi.org/madwifi-trunk/madwifi-trunk-r3867-20080924.tar.gz;
sha256 = "0m48p5mqx1d3aimjjiy251fii7x7y15ch5n74hvq4hygc6bcjf79";
};
buildInputs = [];
configureFlags = [];
makeFlags = [''KERNELPATH=${kernel}/lib/modules/*/build'' ''DESTDIR=$out''];
hal20080528 = fetchurl {
url = http://people.freebsd.org/~sam/ath_hal-20080528.tgz;
sha256 = "1a6glkd8n46876hl48ib08p81qwsvrk4153j4b9xrxgid6f8bar9";
};
injectionPatchFile = ./inj.patch;
};
in with localDefs;
let
preBuild = fullDepEntry (''
echo Replacing HAL.
tar xvf ${hal20080528}
rm -r hal
mv ath_hal-* hal
'') ["minInit" "doUnpack"];
postInstall = fullDepEntry (''
ln -s $out/usr/local/bin $out/bin
'') [minInit doMakeInstall];
in
stdenv.mkDerivation rec {
name = "atheros-"+version;
patches = lib.optional
(lib.attrByPath ["injectionPatch"] false args)
injectionPatchFile;
builder = writeScript (name + "-builder")
(textClosure localDefs
((lib.optional
(lib.attrByPath ["freshHAL"] false args)
preBuild)
++ [doPatch doMakeInstall postInstall
doForceShare doPropagate]));
meta = {
description = "Atheros WiFi driver";
inherit src;
};
}

View file

@ -1,42 +0,0 @@
{ stdenv, fetchgit, kernel, aufs }:
assert aufs != null;
let version = "20110217"; in
stdenv.mkDerivation {
name = "aufs2.1-util-${version}-${kernel.version}";
src = fetchgit {
url = "git://git.c3sl.ufpr.br/aufs/aufs2-util.git";
rev = "0f0cf3f2ae39906fd4b5376cdaa24e9fe64a03f4";
sha256 = "0fce5601b67efe8b5652a813ae612348bf4503aa71056cd31a5ed0406632e364";
};
buildInputs = [ aufs ];
makeFlags =
[ "KDIR=${kernel}/lib/modules/${kernel.version}/build"
"Install=install"
"DESTDIR=$(out)"
];
postInstall =
''
mv $out/usr/* $out
rmdir $out/usr
cp aufs.shlib $out/lib/
substituteInPlace $out/bin/aubrsync \
--replace /sbin/mount $out/sbin/mount \
--replace /usr/lib/aufs.shlib $out/lib/aufs.shlib
'';
meta = {
description = "Utilities for AUFS2.1";
homepage = http://aufs.sourceforge.net/;
maintainers = [ stdenv.lib.maintainers.eelco ];
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -1,48 +0,0 @@
{ stdenv, kernel, fetchgit, perl }:
assert kernel.features ? aufsBase;
let version =
if (builtins.lessThan (builtins.compareVersions kernel.version "2.6.38") 0)
then "20110303"
else "20110408"; in
stdenv.mkDerivation {
name = "aufs2.1-${version}-${kernel.version}";
src =
if (builtins.lessThan (builtins.compareVersions kernel.version "2.6.38") 0)
then
fetchgit {
url = "git://git.c3sl.ufpr.br/aufs/aufs2-standalone.git";
rev = "aceef6c84dbe5798bf46904252727b9588eafaf6";
sha256 = "50a8cb39af5fee82e88b65351cac52b6ab95a68c45e0a98da9fa1925b28f048d";
}
else
fetchgit {
url = "git://git.c3sl.ufpr.br/aufs/aufs2-standalone.git";
rev = "01cb6101f477339bc95e6b47e3618bb29ecc68db";
sha256 = "4af3c4b1e99ef58abe8530665309021d541ee840ee54f442606cc418646a1faf";
};
buildInputs = [ perl ];
makeFlags = "KDIR=${kernel}/lib/modules/${kernel.version}/build";
installPhase =
''
mkdir -p $out/lib/modules/${kernel.version}/misc
cp -v aufs.ko $out/lib/modules/${kernel.version}/misc
# Install the headers because aufs2.1-util requires them.
cp -av usr/include $out/
'';
meta = {
description = "Another Unionfs implementation for Linux (second generation)";
homepage = http://aufs.sourceforge.net/;
maintainers = [ stdenv.lib.maintainers.eelco
stdenv.lib.maintainers.raskin ];
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -1,13 +0,0 @@
source $stdenv/setup
export DESTDIR=$out
preInstall() {
mkdir -p $out
mkdir -p $out/etc
mkdir -p $out/sbin
mkdir -p $out/usr
make install-program
}
genericBuild

View file

@ -1,13 +0,0 @@
{stdenv, fetchurl, pciutils, python, popt, gettext}:
stdenv.mkDerivation {
name = "kudzu-1.2.16";
builder = ./builder.sh;
src = fetchurl {
url = http://losser.labs.cs.uu.nl/~armijn/.nix/kudzu-1.2.16.tar.gz;
md5 = "5fc786dd558064fd9c9cb3e5be10e799";
};
buildInputs = [pciutils python popt gettext];
inherit python;
patches = [./kudzu-python.patch];
}

View file

@ -1,21 +0,0 @@
diff -ruN kudzu-1.2.16/Makefile kudzu-1.2.16.new/Makefile
--- kudzu-1.2.16/Makefile 2005-10-28 21:57:55.000000000 +0200
+++ kudzu-1.2.16.new/Makefile 2005-12-23 19:55:12.000000000 +0100
@@ -17,7 +17,7 @@
CVSTAG = kudzu-r$(subst .,-,$(VERSION))
-PYTHONVERS = $(shell ls /usr/include/python*/Python.h | sed "s|/usr/include/||g"| sed "s|/Python.h||g")
+PYTHONVERS = $(shell ls $(python)/include/python*/Python.h | sed "s|$(python)/include/||g"| sed "s|/Python.h||g")
CFLAGS += -I. -DVERSION=\"$(VERSION)\"
@@ -84,7 +84,7 @@
for ver in $(PYTHONVERS) ; do \
if [ ! -f "$$ver/_kudzumodule.so" -o libkudzu.a -nt "$$ver/_kudzumodule.so" ]; then \
mkdir -p $$ver ;\
- $(CC) $(CFLAGS) -I/usr/include/$$ver -fpic -c -o $$ver/kudzumodule.o kudzumodule.c ;\
+ $(CC) $(CFLAGS) -I$(python)/include/$$ver -fpic -c -o $$ver/kudzumodule.o kudzumodule.c ;\
$(CC) -o $$ver/_kudzumodule.so $$ver/kudzumodule.o -shared -Wl,-soname,_kudzumodule.so -L. -lkudzu -lpci ;\
fi ; \
done

View file

@ -1,11 +0,0 @@
--- libnl-1.1/lib/Makefile.orig 2008-01-14 16:48:45.000000000 +0100
+++ libnl-1.1/lib/Makefile 2009-05-26 09:47:42.000000000 +0200
@@ -48,7 +48,7 @@
$(OUT_SLIB): ../Makefile.opts $(OBJ)
@echo " LD $(OUT_SLIB)"; \
- $(CC) -shared -Wl,-soname,libnl.so.1 -o $(OUT_SLIB) $(OBJ) $(LIBNL_LIB) -lc
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,libnl.so.1 -o $(OUT_SLIB) $(OBJ) $(LIBNL_LIB) -lc
@echo " LN $(OUT_SLIB) $(LN1_SLIB)"; \
rm -f $(LN1_SLIB) ; $(LN) -s $(OUT_SLIB) $(LN1_SLIB)
@echo " LN $(LN1_SLIB) $(LN_SLIB)"; \

View file

@ -1,13 +0,0 @@
https://bugs.gentoo.org/show_bug.cgi?id=225393
--- libnl-1.1/include/netlink-local.h 2008-06-09 07:54:20 +0000
+++ libnl-1.1/include/netlink-local.h 2008-06-09 07:54:47 +0000
@@ -26,6 +26,7 @@
#include <sys/socket.h>
#include <inttypes.h>
#include <assert.h>
+#include <limits.h>
#include <arpa/inet.h>
#include <netdb.h>

View file

@ -1,40 +0,0 @@
From: Patrick McHardy <kaber@trash.net>
Date: Fri, 18 Jan 2008 16:55:49 +0000 (+0100)
Subject: [LIBNL]: Fix minor memleaks on exit
X-Git-Url: http://git.kernel.org/?p=libs%2Fnetlink%2Flibnl.git;a=commitdiff_plain;h=b64f15d6f947839236fa276d473d238f8c9b9d57;hp=e91bb2ffb090955d443e643a25b250bf3d33534a
[LIBNL]: Fix minor memleaks on exit
Make valgrind happy ...
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
diff --git a/lib/route/route_utils.c b/lib/route/route_utils.c
index a12d169..1386cda 100644
--- a/lib/route/route_utils.c
+++ b/lib/route/route_utils.c
@@ -63,6 +63,11 @@ static void __init init_routing_table_names(void)
add_routing_table_name(RT_TABLE_LOCAL, "local");
};
+static void __exit release_routing_table_names(void)
+{
+ __trans_list_clear(&table_names);
+}
+
int rtnl_route_read_table_names(const char *path)
{
__trans_list_clear(&table_names);
@@ -104,6 +109,11 @@ static void __init init_proto_names(void)
add_proto_name(RTPROT_STATIC, "static");
};
+static void __exit release_proto_names(void)
+{
+ __trans_list_clear(&proto_names);
+}
+
int rtnl_route_read_protocol_names(const char *path)
{
__trans_list_clear(&proto_names);

View file

@ -1,80 +0,0 @@
From: Patrick McHardy <kaber@trash.net>
Date: Fri, 18 Jan 2008 16:55:48 +0000 (+0100)
Subject: [LIBNL]: Add if_vlan.h
X-Git-Url: http://git.kernel.org/?p=libs%2Fnetlink%2Flibnl.git;a=commitdiff_plain;h=e91bb2ffb090955d443e643a25b250bf3d33534a;hp=7f6b7a8eea0334b34d58dec72c66121a76f08958
[LIBNL]: Add if_vlan.h
vlan support needs VLAN_FLAG_REORDER_HDR, which is not available in
older if_vlan.h versions. Add the current version from the kernel.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
new file mode 100644
index 0000000..068cd7b
--- /dev/null
+++ include/linux/if_vlan.h
@@ -0,0 +1,61 @@
+/*
+ * VLAN An implementation of 802.1Q VLAN tagging.
+ *
+ * Authors: Ben Greear <greearb@candelatech.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef _LINUX_IF_VLAN_H_
+#define _LINUX_IF_VLAN_H_
+
+
+/* VLAN IOCTLs are found in sockios.h */
+
+/* Passed in vlan_ioctl_args structure to determine behaviour. */
+enum vlan_ioctl_cmds {
+ ADD_VLAN_CMD,
+ DEL_VLAN_CMD,
+ SET_VLAN_INGRESS_PRIORITY_CMD,
+ SET_VLAN_EGRESS_PRIORITY_CMD,
+ GET_VLAN_INGRESS_PRIORITY_CMD,
+ GET_VLAN_EGRESS_PRIORITY_CMD,
+ SET_VLAN_NAME_TYPE_CMD,
+ SET_VLAN_FLAG_CMD,
+ GET_VLAN_REALDEV_NAME_CMD, /* If this works, you know it's a VLAN device, btw */
+ GET_VLAN_VID_CMD /* Get the VID of this VLAN (specified by name) */
+};
+
+enum vlan_flags {
+ VLAN_FLAG_REORDER_HDR = 0x1,
+};
+
+enum vlan_name_types {
+ VLAN_NAME_TYPE_PLUS_VID, /* Name will look like: vlan0005 */
+ VLAN_NAME_TYPE_RAW_PLUS_VID, /* name will look like: eth1.0005 */
+ VLAN_NAME_TYPE_PLUS_VID_NO_PAD, /* Name will look like: vlan5 */
+ VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD, /* Name will look like: eth0.5 */
+ VLAN_NAME_TYPE_HIGHEST
+};
+
+struct vlan_ioctl_args {
+ int cmd; /* Should be one of the vlan_ioctl_cmds enum above. */
+ char device1[24];
+
+ union {
+ char device2[24];
+ int VID;
+ unsigned int skb_priority;
+ unsigned int name_type;
+ unsigned int bind_type;
+ unsigned int flag; /* Matches vlan_dev_info flags */
+ } u;
+
+ short vlan_qos;
+};
+
+#endif /* !(_LINUX_IF_VLAN_H_) */

View file

@ -1,27 +0,0 @@
{stdenv, fetchurl, bison, flex}:
stdenv.mkDerivation rec {
name = "libnl-1.1";
src = fetchurl {
url = "${meta.homepage}files/${name}.tar.gz";
sha256 = "1hzd48z8h8abkclq90wb7cciynpg3pwgyd0gzb5g12ndnv7s9kim";
};
buildInputs = [ bison flex ];
postConfigure = "type -tp flex";
patches = [
./libnl-1.1-flags.patch
./libnl-1.1-glibc-2.8-ULONG_MAX.patch
./libnl-1.1-minor-leaks.patch
./libnl-1.1-vlan-header.patch
];
meta = {
homepage = "http://www.infradead.org/~tgr/libnl/";
description = "Linux NetLink interface library";
maintainers = [ stdenv.lib.maintainers.urkud ];
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -1,19 +0,0 @@
{stdenv, fetchurl, bison, flex}:
stdenv.mkDerivation rec {
name = "libnl-2.0";
src = fetchurl {
url = "${meta.homepage}files/${name}.tar.gz";
sha256 = "173sr25xpsakdvjcg62790v6kwcgxj5r0js2lx6hg89w7n8dqh2s";
};
buildInputs = [ bison flex ];
meta = {
homepage = "http://www.infradead.org/~tgr/libnl/";
description = "Linux NetLink interface library";
maintainers = [ stdenv.lib.maintainers.urkud ];
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -1,22 +0,0 @@
source $stdenv/setup
hashname=$(basename $kernel)
echo $hashname
if echo "$hashname" | grep -q '^[a-z0-9]\{32\}-'; then
hashname=$(echo "$hashname" | cut -c -32)
fi
stripHash $kernel
version=$(echo $strippedName | cut -c 7-)-$hashname
echo "version $version"
export version
mkdir -p $out/lib/modules/$version/kernel/drivers/usb/media/
genericBuild
echo "b0rken"
exit 1

View file

@ -1,13 +0,0 @@
{stdenv, fetchurl, kernel}:
stdenv.mkDerivation {
name = "ov511-2.32";
builder = ./ov511-2.32-builder.sh;
src = fetchurl {
url = http://www.ovcam.org/ov511/download/2.xx/distros/ov511-2.32.tar.bz2;
md5 = "6a08025311649356242761641a1df0f2";
};
patches = [./ov511-kernel.patch ./ov511-2.32.patch ./ov511-2.32-kdir.patch];
inherit kernel;
NIX_GLIBC_FLAGS_SET=1;
}

View file

@ -1,13 +0,0 @@
diff -rc ov511-2.32/tuner.c ov511-2.32.new/tuner.c
*** ov511-2.32/tuner.c Mon Apr 3 15:16:27 2006
--- ov511-2.32.new/tuner.c Mon Jul 17 00:26:57 2006
***************
*** 1029,1035 ****
static struct i2c_client client_template =
{
.name = "(tuner unset)",
- .flags = I2C_CLIENT_ALLOW_USE,
.driver = &driver,
};
--- 1029,1034 ----

View file

@ -1,22 +0,0 @@
{ stdenv, fetchurl, python }:
stdenv.mkDerivation rec {
name = "sepolgen-${version}";
version = "1.0.23";
src = fetchurl {
url = http://userspace.selinuxproject.org/releases/20101221/devel/sepolgen-1.0.23.tar.gz;
sha256 = "04d11l091iclp8lnay9as7y473ydrjz7171h95ddsbn0ihj5if2p";
};
buildInputs = [ python ];
preBuild = '' makeFlags="$makeFlags DESTDIR=$out PACKAGEDIR=$out/lib/${python.libPrefix}/site-packages/sepolgen" '';
meta = with stdenv.lib; {
homepage = http://userspace.selinuxproject.org/;
description = "Python module for SELinux policy generation";
license = licenses.gpl2;
maintainers = [ maintainers.phreedom ];
platforms = platforms.linux;
};
}

View file

@ -1,45 +0,0 @@
diff -rc upstart-0.3.0-orig/init/main.c upstart-0.3.0/init/main.c
*** upstart-0.3.0-orig/init/main.c 2006-10-13 14:35:16.000000000 +0200
--- upstart-0.3.0/init/main.c 2006-11-19 21:41:01.000000000 +0100
***************
*** 206,215 ****
control_open ();
/* Read configuration */
! cfg_watch_dir (NULL, CFG_DIR, NULL);
/* Set the PATH environment variable */
! setenv ("PATH", PATH, TRUE);
/* Generate and run the startup event or read the state from the
--- 206,217 ----
control_open ();
/* Read configuration */
! char *cfg_dir = getenv("UPSTART_CFG_DIR");
! if (!cfg_dir) cfg_dir = CFG_DIR;
! cfg_watch_dir (NULL, cfg_dir, NULL);
/* Set the PATH environment variable */
! /* setenv ("PATH", PATH, TRUE); */
/* Generate and run the startup event or read the state from the
diff -rc upstart-0.3.0-orig/util/initctl.c upstart-0.3.0/util/initctl.c
*** upstart-0.3.0-orig/util/initctl.c 2006-10-13 16:18:06.000000000 +0200
--- upstart-0.3.0/util/initctl.c 2006-11-20 16:53:21.000000000 +0100
***************
*** 95,105 ****
} else if (! strcmp (command->command, "stop")) {
msg.type = UPSTART_JOB_STOP;
msg.job_stop.name = *arg;
- break;
} else if (! strcmp (command->command, "status")) {
msg.type = UPSTART_JOB_QUERY;
msg.job_stop.name = *arg;
- break;
}
/* Send the message */
--- 95,103 ----

View file

@ -1,23 +0,0 @@
args : with args;
rec {
src = fetchurl {
url = http://linux.schottelius.org/gpm/archives/gpm-1.99.6.tar.lzma;
sha256 = "14zxx7nx40k8b0bmwhxfyv20xrdi8cg9fxmv8ylsx661lvizqsg3";
};
buildInputs = [lzma flex bison ncurses];
configureFlags = [];
/* doConfigure should be specified separately */
phaseNames = ["preConfigure" "doConfigure" "doMakeInstall"];
preConfigure = fullDepEntry (''
sed -e 's/[$](MKDIR)/mkdir -p /' -i doc/Makefile.in
sed -e 's/gpm2//' -i Makefile.in
'') ["addInputs" "doUnpack" "minInit"];
name = "gpm-" + version;
meta = {
description = "Mouse daemon";
};
}

View file

@ -1,14 +0,0 @@
We actually want the `myserver' binary to be installable. Failing to do that
it gets an RPATH pointing to $top_builddir/src/.libs.
--- myserver-0.10/src/Makefile.in 2010-10-14 12:45:42.000000000 +0200
+++ myserver-0.10/src/Makefile.in 2011-03-03 22:23:05.000000000 +0100
@@ -1307,7 +1307,6 @@ libmyserver_la_LIBADD = \
$(INTLLIBS) $(LDFLAGS)
myserver_CXXFLAGS = $(AM_CXXFLAGS) $(CXXFLAGS) -DHOST_STR=\"$(build)\" -DPREFIX=\"$(prefix)\"
-myserver_LDFLAGS = -static -no-install
myserver_LDADD = libmyserver.la $(PTHREAD_LIB) $(IDN_LIB) \
$(XNET_LIB) $(DL_LIB) $(ZLIB_LIB) \
$(XML_LIBS) $(INTLLIBS) $(LDFLAGS)

View file

@ -1,9 +0,0 @@
# There is a dependency somewhere on `-ldl', which Make treats
# specially by mapping it to /usr/lib/libdl.so. That won't work on
# NixOS, so force Make to search in our own Glibc.
export VPATH=$(cat ${NIX_GCC}/nix-support/orig-libc)/lib
preConfigure() {
unpackFile $mesaSrc
configureFlags="$configureFlags --with-mesa-source=$(ls -d $(pwd)/Mesa-*)"
}

Some files were not shown because too many files have changed in this diff Show more