Kill vendor_directory in favour of normal include paths.

This commit is contained in:
Sadie Powell 2022-01-26 13:23:46 +00:00
parent ec46f6acda
commit d7a7f37d14
8 changed files with 6 additions and 42 deletions

View File

@ -33,7 +33,6 @@ use make::console;
use constant DIRECTIVE_ERROR_PIPE => $ENV{INSPIRCD_VERBOSE} ? '' : '2>/dev/null';
use constant PKG_CONFIG => $ENV{PKG_CONFIG} || 'pkg-config';
use constant VENDOR_DIRECTORY => catdir(dirname(dirname(__FILE__)), 'vendor');
our @EXPORT = qw(
get_directives
@ -317,26 +316,6 @@ sub __function_require_version {
return "";
}
sub __function_vendor_directory {
my ($file, $name) = @_;
# Try to look the directory up in the environment...
my $key = __environment 'INSPIRCD_VENDOR_', $name;
if (defined $ENV{$key}) {
say console_format "Found the <|GREEN $name|> vendor directory for <|GREEN ${\module_shrink $file}|> using the environment: <|BOLD $ENV{$key}|>";
return $ENV{$key};
}
my $directory = catdir(VENDOR_DIRECTORY, $name);
if (-d $directory) {
say console_format "Using the default <|GREEN $name|> vendor directory for <|GREEN ${\module_shrink $file}|>: <|BOLD $directory|>";
return $directory;
}
# We can't find it via the environment or via the filesystem so give up.
__error $file, "unable to find the <|GREEN $name|> vendor directory for <|GREEN ${\module_shrink $file}|>!";
}
sub __function_warning {
my ($file, @messages) = @_;
print_warning @messages;

View File

@ -44,7 +44,7 @@
#include <rang/rang.hpp>
#ifdef _WIN32
# include <ya_getopt.h>
# include <ya_getopt/ya_getopt.h>
#else
# include <getopt.h>
# include <grp.h>

View File

@ -17,13 +17,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/// $CompilerFlags: -isystem vendor_directory("bcrypt")
#include "inspircd.h"
#include "modules/hash.h"
#include <crypt_blowfish.c>
#include <bcrypt/crypt_blowfish.c>
class BCryptProvider final
: public HashProvider

View File

@ -26,8 +26,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/// $CompilerFlags: -isystem vendor_directory("http_parser")
#include "inspircd.h"
#include "iohook.h"
@ -42,7 +40,7 @@
# pragma GCC diagnostic ignored "-Wshadow"
#endif
#include <http_parser.c>
#include <http_parser/http_parser.c>
#ifdef __GNUC__
# pragma GCC diagnostic pop

View File

@ -23,8 +23,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/// $CompilerFlags: -isystem vendor_directory("sha2")
// Fix a collision between the Haiku uint64 typedef and the
// one from the sha2 library.
@ -32,7 +30,7 @@
# define uint64 sha2_uint64
#endif
#include <sha2.c>
#include <sha2/sha2.c>
#ifdef __HAIKU__
# undef uint64

View File

@ -18,15 +18,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/// $CompilerFlags: -isystem vendor_directory("utfcpp")
#include "inspircd.h"
#include "iohook.h"
#include "modules/hash.h"
#define UTF_CPP_CPLUSPLUS 199711L
#include <unchecked.h>
#include <utfcpp/unchecked.h>
static constexpr char MagicGUID[] = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
static constexpr char newline[] = "\r\n";

View File

@ -53,13 +53,6 @@ file(GLOB INSPIRCD_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
)
list(SORT INSPIRCD_SOURCES)
file(GLOB INSPIRCD_VENDORS "${INSPIRCD_BASE}/vendor/**")
foreach(INSPIRCD_VENDOR ${INSPIRCD_VENDORS})
if(IS_DIRECTORY ${INSPIRCD_VENDOR})
include_directories(${INSPIRCD_VENDOR})
endif()
endforeach()
include_directories("${INSPIRCD_BASE}/win" "${INSPIRCD_BASE}/include" "${INSPIRCD_BASE}/vendor")
include_directories(${EXTRA_INCLUDES})

View File

@ -27,7 +27,7 @@
#include "inspircd_win32wrapper.h"
#include "inspircd.h"
#include <ya_getopt.c>
#include <ya_getopt/ya_getopt.c>
CWin32Exception::CWin32Exception() : exception()
{