Skip to content

Instantly share code, notes, and snippets.

View dakcarto's full-sized avatar

Larry Shaffer dakcarto

  • Black Hills, South Dakota
View GitHub Profile
@dakcarto
dakcarto / pyspatialite-3.0.1-Mac-patch.diff
Created November 17, 2013 07:28
Update pyspatialite 3.0.1 for a dynamic-linking spatialite/sqlite build on Mac with libspatialite 4.1.1
From 74985c2c228cac37420eadea7dfa89848df8581f Mon Sep 17 00:00:00 2001
From: Larry Shaffer <larrys@dakotacarto.com>
Date: Tue, 22 Oct 2013 20:03:16 -0600
Subject: [PATCH] [pyspatialite] Update setup.py for dynamic-linking
spatialite/sqlite build (libspatialite 4.1+)
- Remove libspatialite amalgamation download, as it is no longer offered
- Remove hard-coded paths for Mac, since they are not defaults, but one type of install
---
setup.py | 47 +++++------------------------------------------
@dakcarto
dakcarto / qt-mysql.rb
Created November 20, 2013 03:13
Example of post_uninstall function for homebrew formulae
require 'formula'
class QtMysql < Formula
homepage 'http://qt-project.org/'
# 15 KB, stripped down archive of just what's needed to compile driver
url 'http://qgis.dakotacarto.com/qt-4.8.5-mysql-driver.tar.gz'
sha1 '2aa4651510b6974c0c129cfc673b88c7f8dbeeb2'
# 241.5 MB, if downloading full source
# url 'http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-everywhere-opensource-src-4.8.5.tar.gz'
# sha1 '745f9ebf091696c0d5403ce691dc28c039d77b9e'
diff --git a/osgearth.rb b/osgearth.rb
index 5ead3fa..e2b5ffa 100644
--- a/osgearth.rb
+++ b/osgearth.rb
@@ -5,14 +5,11 @@ class Osgearth < Formula
url 'https://github.com/gwaldron/osgearth/archive/osgearth-2.5.tar.gz'
sha1 '97ed0075422c3efcb7b958f89ae02b32d670c48e'
- head do
- url 'https://github.com/gwaldron/osgearth.git', :branch => 'master'
@dakcarto
dakcarto / qgis-20_sip-fixes
Last active December 30, 2015 02:39
qgis-20_sip-fixes
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index e5f4c27..1e298ea 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -91,6 +91,12 @@ INCLUDE_DIRECTORIES(
FILE(GLOB_RECURSE sip_files_gui gui/*.sip)
SET(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_gui})
SET(SIP_EXTRA_OPTIONS ${PYQT4_SIP_FLAGS} -o -a ${CMAKE_BINARY_DIR}/python/qgis.gui.api)
+
+IF(UNIX AND NOT SIP_VERSION_NUM LESS 265984)
@dakcarto
dakcarto / FindJNI.cmake
Created December 31, 2013 19:48
FindJNI.cmake module replacement to optionally work with Oracle Java installs on Mac
# - Find JNI java libraries.
# This module finds if Java is installed and determines where the
# include files and libraries are. It also determines what the name of
# the library is. This code sets the following variables:
#
# JNI_INCLUDE_DIRS = the include dirs to use
# JNI_LIBRARIES = the libraries to use
# JNI_FOUND = TRUE if JNI headers and libraries were found.
# JAVA_AWT_LIBRARY = the path to the jawt library
# JAVA_JVM_LIBRARY = the path to the jvm library
@dakcarto
dakcarto / test-fails_gpkgtools.txt
Created January 4, 2014 20:00
Test errors for gpkgtools
$ brew test -v gpkgtools
Testing gpkgtools
==> python tests/geonames.py
**********************************************************************
File "tests/geonames.py", line 19, in __main__
Failed example:
contents['geonames']['last_change']
Expected:
u'2012-12-14T15:07:00.000000Z'
Got:
@dakcarto
dakcarto / CMakeLists.txt
Last active January 2, 2016 16:19
CMake test project for finding JAVA and JNI on Mac 10.6-9
# Test with `echo '' > CMakeCache.txt && cmake .`
cmake_minimum_required(VERSION 2.8)
project("Find-JNI-JAVA-Test")
# custom path to CMake git repo edits on modules
SET(CMAKE_MODULE_PATH "$ENV{HOME}/github.com/CMake/Modules")
message(STATUS "JAVA_HOME= $ENV{JAVA_HOME}")
message(STATUS "CMAKE_FIND_FRAMEWORK= ${CMAKE_FIND_FRAMEWORK}")
@dakcarto
dakcarto / qscintilla2.rb
Created January 12, 2014 18:54
libc++ fix for qscintilla2 Homebrew install
require 'formula'
class Qscintilla2 < Formula
homepage 'http://www.riverbankcomputing.co.uk/software/qscintilla/intro'
url 'http://downloads.sf.net/project/pyqt/QScintilla2/QScintilla-2.8/QScintilla-gpl-2.8.tar.gz'
sha1 '3edf9d476d4e6af0706a4d33401667a38e3a697e'
depends_on 'pyqt'
depends_on 'sip'
@dakcarto
dakcarto / liblwgeom_issue9105_test.py
Created January 13, 2014 20:17
Test script for Processing LWGEOM Provider issue, http://hub.qgis.org/issues/9105
#!/usr/bin/env python
import sys
from ctypes import *
from ctypes.util import find_library
import binascii
class GBOX(Structure):
@dakcarto
dakcarto / taudem-patch.diff
Last active January 3, 2016 06:49
Homebrew taudem patch
diff --git a/Node.cpp b/Node.cpp
index 50444b5..248dbfc 100644
--- a/Node.cpp
+++ b/Node.cpp
@@ -39,7 +39,7 @@ email: dtarb@usu.edu
// This software is distributed from http://hydrology.usu.edu/taudem/
#include "Node.h"
-#include "stdlib.h"
+#include <stdlib.h>