Skip to content

Commit

Permalink
move GPL licensed sphinxapi.php out of source tree; automatically dow…
Browse files Browse the repository at this point in the history
…nload via make.php
  • Loading branch information
Jesse Young committed Jun 24, 2011
1 parent d58666f commit 71c815f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1,690 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,2 +1,3 @@
config/local.php
test/*.out
vendors/sphinxapi*.php
4 changes: 2 additions & 2 deletions LICENSE.txt
Expand Up @@ -65,7 +65,7 @@ third-party vendors, which is licensed as follows:
The following third-party code is used by the software, but should not be
distributed together with the software due to licensing incompatibilities:

* vendors/sphinxapi.php
* vendors/sphinxapi.php (downloaded/installed by "php make.php vendors")
(c) 2001-2010, Andrew Aksyonoff
(c) 2008-2010, Sphinx Technologies Inc,
released under GPL license v2.
Expand All @@ -74,5 +74,5 @@ distributed together with the software due to licensing incompatibilities:
downloaded from http://www.scribd.com/developers/libraries,
unknown copyright/license.

* ga.php, views/default/page_elements/google_analytics_image.php
* www/ga.php, views/default/page_elements/google_analytics_image.php
(c) 2009 Google Inc. All Rights Reserved.
21 changes: 21 additions & 0 deletions make.php
Expand Up @@ -20,6 +20,7 @@ static function all()
Build::media();
Build::css();
Build::js();
Build::vendors();
}

/*
Expand All @@ -32,6 +33,26 @@ static function clean()
system('rm -rf www/_media/*');
}

/*
* Downloads code for 3rd party libraries that can't be distributed with our source code
* because their licensing is incompatible with ours.
*/
static function vendors()
{
$sphinx_ver = "rel110";
$sphinx_api_filename = "sphinxapi.{$sphinx_ver}.php";
$sphinx_api_path = __DIR__."/vendors/$sphinx_api_filename";
if (!is_file($sphinx_api_path))
{
$sphinx_url = "http://sphinxsearch.googlecode.com/svn/branches/{$sphinx_ver}/api/sphinxapi.php";

$sphinx_api_php = file_get_contents($sphinx_url);
static::write_file($sphinx_api_path, $sphinx_api_php);
}
static::write_file(__DIR__."/vendors/sphinxapi.php",
"<?php require_once __DIR__.'/$sphinx_api_filename';");
}

/*
* Generates a cache of all the paths of files in the engine, themes, languages, and views
* directories, which might be referenced via virtual paths in calls to Engine::get_real_path() .
Expand Down

0 comments on commit 71c815f

Please sign in to comment.